Right, vector images would make the process easier, the program would just have to search the image.
What I meant about the image filetype was that let's say you wanted to recognize the color vermilion as rgb(227, 66, 52)
using that color in a jpg would be hazardous because jpgs don't keep exact colors, so your color 227, 66, 52 may turn into a similar but not exactly the same color in compression, for example 226, 66, 53. Now, the program that was supposed to recognize 227, 66, 52 doesn't realize that those pixels are vermilion because the rgb value of those pixels are slightly off. PNGs on the other hand will preserve that color with the exact same rgb values, so the program can still search for exactly 227, 66, 52 rather than have to search for a color close to it.