## Hue to wavelength mapping

wavelength to hue
hue color
hue wavelength psychology
hue definition in art
wavelength colour
pixel to wavelength conversion
how to find the color of a wavelength
color and wavelength relationship

Is there an algorithm to find out the wavelength of the color given the hue value (between 0 degree to 360 degree). Is there any built-in function in MATLABfor the same?

While Mark Ransom and Franco Callari are completely right that you cannot recover the spectrum of a perceptual color, nor unambiguously map hue values to wavelengths, you could definitely piece something together if you just want the corresponding monochromatic wavelength.

The part of the hue cycle between 270 and 360 is another problem. There is nothing corresponding to magenta in the light spectrum, so let's assume that we only use hue values between 0 and 270.

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

``` L = 620 - 170 / 270 * H
```

620 is the maximum wavelength, 170 is the wavelength range and 270 is the hue range.

I think this should be in the right direction but I have only checked 4 or 5 colors. You might be able to get better results comparing between input hues and corresponding colors on a visible spectrum chart, and then adjusting the values somewhat.

matlab - Hue to wavelength mapping, While Mark Ransom and Franco Callari are completely right that you cannot recover the spectrum of a perceptual color, nor unambiguously map hue values to  Hue is the wavelength within the visible-light spectrum at which the energy output from a source is greatest. This is shown as the peak of the curves in the accompanying graph of intensity versus wavelength. In this example, all three colors have the same hue, with a wavelength slightly longer than 500 nanometers,

Color wave length and hue - MATLAB Answers, Both indigo and violet fall below this limit, but the CIE model that defines the theoretical map of wavelength to hue has to treat colors in that range separately,​  Visible light is about 400 to 700 nm, with 650 nm being the frequency of red. 475 is blue. Both indigo and violet fall below this limit, but the CIE model that defines the theoretical map of wavelength to hue has to treat colors in that range separately, and it could be that 475 nm is the effective limit for standard Hue calculation,

Short answer: NO. A given hue can in general be produced by a triple infinity of wavelengths.

A "physical color" is a combination of pure spectral colors (in the visible range). In principle there exist infinitely many distinct spectral colors, and so the set of all physical colors may be thought of as an infinite-dimensional vector space (a Hilbert space). This space is typically notated Hcolor. More technically, the space of physical colors may be considered to be the topological cone over the simplex whose vertices are the spectral colors, with white at the centroid of the simplex, black at the apex of the cone, and the monochromatic color associated with any given vertex somewhere along the line from that vertex to the apex depending on its brightness.

##### . . .

This system implies that for any hue or non-spectral color not on the boundary of the chromaticity diagram, there are infinitely many distinct physical spectra that are all perceived as that hue or color. So, in general there is no such thing as the combination of spectral colors that we perceive as (say) a specific version of tan; instead there are infinitely many possibilities that produce that exact color. The boundary colors that are pure spectral colors can be perceived only in response to light that is purely at the associated wavelength, while the boundary colors on the "line of purples" can each only be generated by a specific ratio of the pure violet and the pure red at the ends of the visible spectral colors.

The CIE chromaticity diagram is horseshoe-shaped, with its curved edge corresponding to all spectral colors (the spectral locus), and the remaining straight edge corresponding to the most saturated purples, mixtures of red and violet.

(Source)

Hue, In color science, the dominant wavelength are ways of characterizing any light mixture in terms of the monochromatic spectral light that evokes an identical (and the corresponding opposite) perception of hue. For many power distributions of natural light, the set of spectra mapping to the same color perception also  The frequency of wavelength range for indigo is around 425-450 nm and frequency of 670-700 THz. In the above color spectrum chart, indigo is made a subset of violet color. The low range of the color explains why it is difficult to distinguish this color in the spectral band.

There's no conversion because they don't overlap.

Hue moves you around an RGB colour space, usually sRGB that almost all consumer digital equipment uses. That's a subset of the colours that our visual systems recognise under normal conditions (defined by CIE 1931), and does not overlap the vibrant line of colours perceived at monochromatic wavelengths of light at all.

Though Hue from 0-120 (reddish orange to yellowish green) and near 240 (indigo) are reasonably close, sRGB is quite functional if you don't care about all the washed out greens and blues, and you can fake the violet and red ends of the full spectrum by making them darker Hue around 270 or 330 respectively, and the only place you can't really approximate is around 180, computer cyan just isn't close at all to the monochromatic vibrant blue-greens.

Dominant wavelength, You can convert the RGB to HSV (Hue Saturation Value) and then the need to decompose the HSV mapping into the hue angle of 0°-300°,  Near infrared wavelengths become visible as red while red wavelengths appear as green and green as blue. Blue wavelengths are shifted out of the visible portion of the spectrum and so they appear as black.

It is possible to find the dominant wavelength of a color/hue. But as said most colors arn’t monochromatic and the same color can be constructed with different "mixes" of wavelengths. I.e. metamerism. Also, for the extra spectral magenta and violet colors only a complementary wavelength can be specified. I.e. the hue/dominant wavelength that additively mixes to white. Also white must be specified, since the is no absolute white due to adaption. Also psychologically our perception of hues doesn’t follow dominant hue lines. Se the Munsell and NCS systems.

Here you can calulate dominant wavelength from RGB values or different CIE systems: http://www.brucelindbloom.com/index.html?Calc.html I don’t have the formula though.

You can then transform RGB to/from HSL and similar. And to/from Munsell or NCS perceptual hues (NCS values are proprietary, so you have to pay and use their software).

What is a good way to convert a RGB pixel to a wavelength ?, How is the wavelength of a colour image pixel in the Hue Saturation Value colour space computed in The pdf attached probably gives the mapping you want! To get a 464nm light you can't just mix some 400nm and some 500nm lights in the right ratio. The eye will see the desired color but whatever electrochemical processes that 464nm light triggers to be effective agains SAD would probably not be fooled. Perhaps you should look for LED's that have the wavelength you need.

How is the wavelength of a colour image pixel in the Hue Saturation , If anybody's wondering, for the intensity, I am using using the HSV colour space, and the XYZ values came out fuzzy, so, mapping them to the Colour Matching  A simple tool to convert a wavelength in nm to an RGB or hexadecimal colour. Physics Light Colour Over the course of millions of years, the human eye has evolved to detect light in the range 380—780nm, a portion of the electromagnetic spectrum known as visible light , which we perceive as colour.

Convert RGB color to wavelength/frequency? : learnprogramming, A simple tool to convert a wavelength in nm to an RGB or hexadecimal colour. is no unique mapping that definitively converts a wavelength to a colour, and as  These other colors are also processed by retina & brain, but are assigned a non-pure mapping, so that there is more than just one of the components of RGB in the color mapping. Light that is of a single wavelength is called a spectral color, and all visible light is made up of some combination of all these spectral colors at some relative intensity.

Wavelength to Colour Relationship, For example, using a primarily red color in your map can elicit anger in your come from a small portion of those wavelengths that are spectral hues of light. You achieve this by limiting the color map to reasonably bright colors. Because this reduces the total range of brightness in the color map, I find it most effective to use a diverging (double-ended) color map. Smooth Cool Warm. This color map uses the techniques based on "Diverging Color Maps for Scientific Visualization" by Kenneth Moreland. It is a diverging (double-ended) color map with a smooth transition in the middle to prevent artifacts at the midpoint.