Colour (RGB/HSV/HSL) to wavelength.

  • Context: Undergrad 
  • Thread starter Thread starter Archeleus
  • Start date Start date
  • Tags Tags
    Colour Wavelength
Click For Summary
SUMMARY

The discussion focuses on the conversion of RGB color values to their corresponding wavelengths. It establishes that while it is possible to obtain the color of a given wavelength, the reverse process is generally not feasible due to the existence of non-spectral colors like magenta. Participants suggest creating a table of RGB values for visible wavelengths and finding the closest match to derive an approximate wavelength. The conversation also highlights the complexity of human color perception and the relevance of the CIE color space in understanding RGB transformations.

PREREQUISITES
  • Understanding of RGB color model
  • Familiarity with CIE color space
  • Basic knowledge of color perception and human vision
  • Experience with data approximation techniques
NEXT STEPS
  • Research the CIE color space and its tristimulus values
  • Explore methods for building RGB to wavelength conversion tables
  • Learn about non-spectral colors and their implications in color science
  • Investigate color distance metrics in RGB space for similarity calculations
USEFUL FOR

Color scientists, graphic designers, software developers working with color processing, and anyone interested in the relationship between RGB values and light wavelengths.

Archeleus
Messages
10
Reaction score
0
I've been searching on this topic for the past 10 minutes and then realized it'll be better just asking someone about it. Anyway yeah, the question is, are there any specific equations that will give me the wavelength when I give it the colour values? I saw some sites where each colour in the rainbow was assigned a frequency. But I want to use RGB. Any suggestions?

Thanks.
 
Science news on Phys.org
google: color value to wavelength
fourth link: http://www.filebuzz.com/findsoftware/Wavelength_Color/1.html
Might be what you want. But some of the other links look interesting too.

However there are "non-spectral" colors, e.g. magenta, that are artifacts of the eye sensor's construction so some RGB values don't have a physical embodiment.
 
No.
You can get the color of a given wavelength (more precisely, of a narrow spectrum centered on a single wavelength), but going the other way is not generally possible. Probably the best way to approach this would be to build a table of RGB values for visible wavelengths, then find the closest match to your given color, and report the wavelength and how close it was. You might do this more efficiently by concentrating on the hue.
 
In general, the colors we typically see include many wavelengths. Colors with single wavelengths are special cases.
 
ACPower said:
No.
You can get the color of a given wavelength (more precisely, of a narrow spectrum centered on a single wavelength), but going the other way is not generally possible. Probably the best way to approach this would be to build a table of RGB values for visible wavelengths, then find the closest match to your given color, and report the wavelength and how close it was. You might do this more efficiently by concentrating on the hue.

Hmm okay I'll give this a shot and like Dr Lotts o'Watts said, colours are of many wavelengths I guess, stupid of me to forget it. So basically if I use this method it means that it won't be that accurate. Though, if I calculate similarity based on distances on a RGB cube it might still be worth it.
 
I don't understand why the RGB->wavelength transform wold not be reversible, aside from the non-spectral-color issue, accounting for all the weird-and-wonderful strangeness of non-linear eye response in brightness, etc?

As to "colors containing many wavelengths"... It is possible for the eye to "see" a particular color in two ways, both of which involve excitation of particular cone sensors. One way is to tickle each sensor, say red and green, in just the right amount with two distinct wavelengths, so we "see" yellow. The other is to tickle the sensors by the same relative amounts with a single yellow wavelength. I think the latter is what the OP was getting at in doing the RGB conversion, yes?
 
Wavelength implies monochromatic light, so it strictly only includes colors along the standard rainbow spectrum. Do you see any pastels on that spectrum? What is the wavelength of white light?
If you are interested in the rigorous treatment of RGB color space and the human visual system, then you will end up becoming familiar with the CIE color space, which is a color model based on decomposing a given spectral distribution of wavelengths (i.e. a color) into a sum of three well-defined spectra corresponding to the spectral response of the 3 perception mechanisms in the human eye. The weights of these 3 curves are the CIE tristimulus values that express a color in CIE space. The process of converting an arbitrary distribution of visual wavelengths into an RGB color begins by integrating the spectrum with each of the tristimulus spectra to get a CIE color, then converting that to RGB given a certain definition of white.
 
ACPower said:
If you are interested in the rigorous treatment of RGB color space and the human visual system, then you will end up becoming familiar with the CIE color space, which is a color model based on decomposing a given spectral distribution of wavelengths (i.e. a color) into a sum of three well-defined spectra corresponding to the spectral response of the 3 perception mechanisms in the human eye. The weights of these 3 curves are the CIE tristimulus values that express a color in CIE space. The process of converting an arbitrary distribution of visual wavelengths into an RGB color begins by integrating the spectrum with each of the tristimulus spectra to get a CIE color, then converting that to RGB given a certain definition of white.

Thank you very much. I think I may have to use this.

And schip666, it may be possible but very inaccurate.
 
Ok,ok,ok... conversion is reversible where it is possible at all then? Being an engineer at heart, I'll take what ever works.

Thanks for the further info!
 

Similar threads

  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 31 ·
2
Replies
31
Views
4K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 8 ·
Replies
8
Views
8K
Replies
2
Views
742
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K