Display hue to wavelength

Is there an algorithm for determining the color wavelength taking into account the hue value (from 0 to 360 degrees). Is there a built-in function in MATLAB for the same?

+7
source share
3 answers

While Marc Ransom and Franco Callari are absolutely right that you cannot reconstruct the perceptual color spectrum or unambiguously display the hue values ​​of the wavelength, you could definitely put something together if you only want the corresponding monochromatic wavelength.

Part of the hue cycle between 270 and 360 is another problem. There is nothing suitable for magenta in the light spectrum, so suppose we use only hue values ​​from 0 to 270.

Estimating that the used part of the visible spectrum is 450-620 nm, with a wavelength of L (in nm) and a hue value of H (in degrees), you can improvise:

  L = 620 - 170 / 270 * H 

620 is the maximum wavelength, 170 is the wavelength range, and 270 is the range of shades.

I think it should be in the right direction, but I checked only 4 or 5 colors. You can get better results by comparing the input hues and the corresponding colors on the visible spectrum diagram , and then change the values ​​a little.

+7
source

Short answer: NO. This shade can generally be formed by a triple infinity of wavelengths.

0
source

I cannot provide a simple solution, but you need to consider something:

  • The visible portion of the screen is approximately 380 nm (UV border) and 780 nm (IR border). But what you see (hue) depends on the operation of the cone cells. Above 660 nm, the M-cone does not start at all, so everything between 660 and 780 nm is a 0 ° hue.
  • At 580 nm, you have a yellow color with a hue of 60 °, the purest green is about 535 nm, so it's 120 °, and the purest blue (240 °) is about 457 nm.
  • If you use a linear function, the yellow color should be at the level of 597 nm, but this is not so, so you will need a more complex approach.
  • above blue, the red cone still fires until we see purple, but we will not be red again at higher frequencies, so you can’t go up about 300 ° above.
  • the hue range from 300 ° to 360 ° has no visible spectrum; it can only be modeled by mixing high-frequency light (blue or violet) with red light, which leads to something between magenta and red on the violet line.
0
source

All Articles