I need to check if a pixel (RGB) is contained in the color scale ranging from very light pink to dark purple. Using the RGB scheme can I do a check like this:
IF image [x, y] [R]> threshold and image [x, y] [G]> threshold image [x, y] [B]> threshold and \
image [x, y] [R] <threshold and image [x, y] [G] < threshold image [x, y] [B] <threshold THAN ...
?
If not, I also have available the option of having the pixel in HSV.
Thanks!
You probably want to work in HSV, because it maps much more intuitively to human perception than RGB. If you get a human to mark colors as "in range" or "out of range", and map them in HSV, you'll be able to find a bound on the H, S, and V values that indicates in and out.
Then you can use a simple range check like you've outlined about to determine if a color is in or out. If you need Python help with the color space conversions, the standard library module
colorsys
will do it for you.