Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have readings of colors from a spectrophotometer that records across the human visible color spectrum 390nm to 790nm intervals. I'd like to convert this into any color space, could be CIE XYZ, HSL, CIE-Lab, etc. Any color temperature is okay.

share|cite|improve this question
up vote 2 down vote accepted

The tristimulus values for CIEXYZ can be obtained by integrating the spectral curve with three distinct weight curves.

From XYZ there are documented formulas to convert to Lab, HSL, CSV, ...

share|cite|improve this answer

If you use Matlab, with Spectral and XYZ Color Functions you can obtain RGB values using the function spectrumRGB.

share|cite|improve this answer

Both Tobias' and Kris' answer are good, but depending on what you are trying to do, it's important to know that not all colors can be represented in all color spaces. For example, RGB covers only a small triangle of the CIE space (

Furthermore, different monitors will give you different colors for the same RGB values, and the weight curves differ from person to person. This means that it's not straightforward at all to measure the spectrum of an object or solution and reproduce the color you see on a screen.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.