title: Generating spectrum color palettes
body: <p>Is there an easy way to convert between color models in Java (RGB, HSV and Lab). </p>
  
  <p>Assuming RGB color model:</p>
  
  <ul>
  <li>How do I calculate black body spectrum color palette? I want to use it for a heatmap chart.</li>
  <li>How about single-wavelength spectrum?</li>
  </ul>
  
  <p><strong>Edit:</strong> I found that the <a href="http://java.sun.com/javase/6/docs/api/java/awt/color/ColorSpace.html" rel="nofollow noreferrer">ColorSpace</a> class can be used for conversions between RGB/CIE and many other color models.</p>