title: TypeError for >> on float and int
body: <p>I have some code below:</p>
  
  <pre><code>color = complexity * (255 / iterationCap)
  r = (color &gt;&gt; 16) &amp; 255
  g = (color &gt;&gt; 8) &amp; 255
  b = (color &gt;&gt; 0) &amp; 255
  </code></pre>
  
  <p>I am trying to calculate the color from a floating point number I get from the <code>color</code> variable.</p>
  
  <p>Currently, I am using python 3.3 to try to shift the bits and <code>and</code> them with 255 to get the correct <code>r</code>, <code>g</code>, and <code>b</code> values.</p>
  
  <p>The error I am getting is:</p>
  
  <pre><code>TypeError: unsupported operand type(s) for &gt;&gt;: 'float' and 'int'
  </code></pre>
  
  <ol>
  <li>Is there an easy way to fix this? Like, can I shift floats with an int? And,</li>
  <li>If not, is there an easy way to calculate color from a number?</li>
  </ol>
  
  <p>Currently I am using the image library to draw pixels to a file and I just tack my color tuple on to an array, which I then feed into <code>Image.putdata(..)</code>.</p>