tags:

views:

139

answers:

2

Hi all,

After downloading an image and getting the rgb color code is there any algorithm to find in which range of VIBGYOR that particular rgb color code match?

regards

Arun

+1  A: 

The color range for VIBGYOR (or spectral colors) isn't the same as RGB.

Check out wikipedia on color: http://en.wikipedia.org/wiki/Color

Pay special attention to "Spectral colors and color reproduction"

An example of the issue is that pink and magenta are nonspectral colors. In addition, the spectral color doesn't take into account intensity while RGB does.

ablerman
I am having an rgb combination so i need to know which general color does it belongs to.for example identify the shades of brown or shades of red etc..
Brown (like pink) is not in the spectrum.
S.Lott
A: 

You can use colorsys.rgb_to_hsv() to convert it, then take the hue from that.

Ignacio Vazquez-Abrams