Is it possible to obtain the light frequency of a colour from a RGB representation? I've found the opposite process [1] but I don't know if it's possible this way.
[1] http://www.fourmilab.ch/documents/specrend/
You can convert the RGB to HSV (Hue Saturation Value) and then the transformation from Hue to Wavelength should be rather straight forward. For most of the R,G,B triplets there is no monochromatic spectrum with one wavelength. For a given R,G,B triplet an infinite number of spectra can be found.
You can convert all 16,777,216 possible RGB colors to HSV and back again to RGB. Unfortunately, using this algorithm you will find that some colors will not roundtrip well.
Answer and Explanation: The given wavelength is 589 nm 589 n m at which the color of the light shows the yellow appearance.
Violet has a 380–450 nm wavelength, & Blue has a 450–495 nm wavelength, & Green has a 495–570 nm wavelength, & Yellow has a 570–590 nm wavelength, & Orange has a 590–620 nm wavelength, & Red has a 620–750 nm wavelength, then you just need to check if it is in those ranges, then you can classify it. Hope this helps!
AFAIK, there is no direct answer because multiple wavelengths can combine to give the same color right? So you have the wavelengths that map to pure colors and then their combinations can give many other and the same colors. And there are several combinations that can give the same color. This is because of inteference. So you essentially are asking for a one to many mapping.
To answer your question: There is no fixed formula. The reverse formulas will give you a range. That is the best it can get.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With