I'm trying to make a converted (that takes an image and adjusts its colors to a number of predefined colors, for ex. to convert an image to an old retro computer with a fixed 16-color palette). I *think* this is done by comparing the colorvalue of each image pixel with each colorvalue from the predefined list o' colors.
I figured HSV is better for this than RGB, however, how do you calc the 'value of a color' when you know H (0..359), S (0..1) and V (0..1) ?
And is this in general a good idea anyway?
I figured HSV is better for this than RGB, however, how do you calc the 'value of a color' when you know H (0..359), S (0..1) and V (0..1) ?
And is this in general a good idea anyway?