I'm trying to get the correct representation of visible spectrum to render on the screen. My current progress is with using CIE 1931 standard observer color matching functions analytically approximated by the equations given in this paper. Current image is like this:
Here the background is not ideally black to make it possible to introduce the negative contributions from the color matching functions:
But the problem with it is that the image seems to have a dip in intensity somewhere around 490 nm. I guess that this is related to the sum of the three functions having a minimum there. See the sum plotted against wavelength:
So my question is now: how do I fix the intensity of the image? Is there any standard for taking spectral sensitivity into account when converting wavelength to RGB/XYZ representation?