Alex Rivera | Logout

RGB values of visible spectrum

Asked 2010-08-04T17:07:52.967
75

I need an algorithm or function to map each wavelength of visible range of spectrum to its equivalent RGB values. Is there any structural relation between the RGB System and wavelength of a light? like this image: alt text
(source: kms at www1.appstate.edu)

sorry if this was irrelevant :-]

Edit
Report

1 Answer

6

I think the answers fail to address a problem with the actual question.

RGB values are generally derived from the XYZ color space which is the combination of a standard human observer function, an illuminate and the relative power of the sample at each wavelength over the range of ~360-830.

I'm not sure of what you are trying to achieve here but it would be possible to calculate a relatively "accurate" RGB value for a sample where each discrete band of the spectrum @ say 10nm was fully saturated. The transform looks like this Spectrum ->XYZ->RGB. Check out Bruce Lindbloom's site for the math. From the XYZ you can also easily calculate hue, chroma or colorimetric values such as L*a*b*.

answered 2011-03-25T06:42:39.233

Your Answer