title: Convert an int to a CSS colour
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2262100/rgb-int-to-rgb-python">RGB Int to RGB - Python</a>  </p>
  </blockquote>
  
  
  
  <p>Using Python I need to convert an int to a six digit hex that I can use as a background colour in CSS. Any ideas how to do that?</p>
  
  <p>The int is a primary key of a model in Django.</p>