Hello,

I’m new to these forums and colorimetry in general, but I’ve done a bit of research over the past few days and understand the general concept of color spaces, device-dependent color gamuts, CIE XYZ, CIE RGB, sRGB, etc. However, I’m still stuck on a seemingly simple problem…

I have a material that I am imaging in a microscope with a standard digital microscope camera. I’m trying to theoretically reproduce the color I’m seeing in the pictures using its theoretical reflection spectrum.

All I want to do is convert a reflection spectrum to (R,G,B) values so that I can tell MATLAB to display this color on screen. So far I’ve tried integrating over the CIE RGB color matching functions, but of course I get negative numbers. If I instead integrate over CIE XYZ color matching functions and convert to sRGB I still get negative number (out of gamut I guess). How do I fix this problem?

I’m guessing I either have to…

- Find some sort of algorithm that converts out of gamut sRGB into sRGB; or…
- Instead integrate over my microscope camera’s sensitivity spectra for R,G,B

Can anyone help??