The science of colorimetry is important in computer graphics. Among other things, it provides us with objective ways to identify colors and methods to convert spectral energy distributions to RGB triplets. This is the topic of a short text I've written. You can download it here:
I've written a library of C functions that can be used to convert spectral energy distributions to RGB triplets. The development was done on a Linux box, but the code should run on most platforms. You can download it here:
I've included a short sample program that illustrates how to use some of the functions in the library. The program multiplies the CIE illuminant D spectra with a filter and calculates the corresponding RGB values. The result is meant to look like the sky on a rainy day.

