# Wavelength to RGB [closed]

I don't know how to convert $$xyz$$ chromaticity coordinates in sRGB. For example in What {R,G,B} values would represent a 445nm monochrome lightsource color on a computer monitor? the author takes:

$$xyz = (0.145945, 0.045217, 0.808838) \rightarrow RGB = (1.47450, -178.21694, 345.59392)$$

But when I use the transfer matrix cited on wikipedia (https://en.wikipedia.org/wiki/SRGB) I find:

$$xyz = (0.145945, 0.045217, 0.808838) \rightarrow RGB = (0.000155,-0.023021, 0.854036)$$ In 8 bit, I have $$RGB =(0.04,-5.9,217.8)$$. So, it's very différent!

Is it possible to explain step by step to detect my mistake?

## closed as off-topic by Kyle Kanos, Jon Custer, GiorgioP, Feynmans Out for Grumpy Cat, ZeroTheHeroMar 9 at 1:13

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "Homework-like questions should ask about a specific physics concept and show some effort to work through the problem. We want our questions to be useful to the broader community, and to future users. See our meta site for more guidance on how to edit your question to make it better" – Kyle Kanos, Jon Custer, GiorgioP, Feynmans Out for Grumpy Cat, ZeroTheHero
If this question can be reworded to fit the rules in the help center, please edit the question.

• FWIW: The colors of many (most?) pure monochrome light sources lie outside of the color gamut of an RGB monitor. What you're actually looking for is the RGB triplet most closely approximates the color of the given pure wavelength. The colors that a monitor can reproduce, in general will be slightly less saturated than pure monochrome colors. – Solomon Slow Mar 7 at 14:23