title: RGB values of visible spectrum
body: <p>I need an algorithm or function to map each wavelength of visible range of spectrum to its equivalent RGB values. 
  Is there any structural relation between the RGB System and wavelength of a light? 
  like this image:
  <a href="https://i.stack.imgur.com/fJ0uO.gif" rel="noreferrer"><img src="https://i.stack.imgur.com/fJ0uO.gif" alt="alt text"></a><br>
  <sub>(source: <a href="http://www1.appstate.edu/~kms/classes/psy3203/Color/spectrum5.gif" rel="noreferrer">kms at www1.appstate.edu</a>)</sub>  </p>
  
  <p><em>sorry if this was irrelevant :-]</em></p>