A renderer that uses a spectral representation must at some point convert to some image format. One can keep spectral curves in each pixel but most think that is overkill. Instead people usually convert to tristimulous values XYZ. These approximate the human response to spectra and there are a couple of versions of the standard with different viewing conditions. But all of the components of them are computed using some integrated weighting function:
Response = INTEGRAL weightingFunction * spectral radiance
The weighting function is typically some big ugly table prone to typos. Here is the first small fraction of such a table from my old code.
I whined about this a lot to Chris Wyman who found a very nice analytic approximation to the XYZ weighting functions he published in this paper (the only paper I have ever been on where my principle contribution was complaining). His simplest approximation has an RMS error of about 1% (and errors in the data itself and however almost all monitors are calibrated is much worse than that so I think the simple approximation is plenty):
However, his multilobe approximation is more accurate and makes for pretty nice code: