title: How to render a rainbow spectrum?
body: <p>I have the need to programmatically generate the approximation of a rainbow spectrum, in a rectangular image, as shown below:</p>
  
  <p><img src="https://i.stack.imgur.com/CvmIF.jpg" alt="rainbow spectrum"></p>
  
  <p>I know how to draw the pixmap, what I'm looking for is how to generate the values of the colors.</p>