Colour (RGB/HSV/HSL) to wavelength.

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

Discussion Overview

The discussion revolves around the conversion of color values in RGB format to their corresponding wavelengths. Participants explore the feasibility of such conversions, the implications of non-spectral colors, and the complexities involved in the relationship between color perception and wavelength.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants inquire about specific equations for converting RGB values to wavelengths, noting that some colors, like magenta, do not have a physical embodiment due to being non-spectral.
  • It is suggested that while one can determine the color of a given wavelength, the reverse process (wavelength to RGB) is generally not possible, and building a table of RGB values for visible wavelengths may be a practical approach.
  • One participant expresses uncertainty about the irreversibility of the RGB to wavelength transformation, questioning the impact of non-linear eye response and the nature of color perception.
  • Another participant emphasizes that wavelength implies monochromatic light and discusses the CIE color space as a more rigorous model for understanding color perception and conversion.
  • There is a mention of the potential inaccuracy of any conversion method, especially when dealing with non-spectral colors.

Areas of Agreement / Disagreement

Participants generally agree on the complexity of converting RGB values to wavelengths, with multiple competing views on the feasibility and accuracy of such conversions. The discussion remains unresolved regarding the exact nature and limitations of these transformations.

Contextual Notes

Limitations include the dependence on definitions of color and the challenges posed by non-spectral colors, as well as the unresolved mathematical steps involved in the conversion process.

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
1K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K