code: def RgbToPil(r, g, b):
      '''Convert the color from RGB to a PIL-compatible integer.
  
      Parameters:
        :r:
          The Red component value [0...1]
        :g:
          The Green component value [0...1]
        :b:
          The Blue component value [0...1]
  
      Returns:
        A PIL compatible integer (0xBBGGRR).
  
      >>> '0x%06x' % Color.RgbToPil(1, 0.5, 0)
      '0x0080ff'
  
      '''
      r, g, b = [min(int(round(v*255)), 255) for v in (r, g, b)]
      return (b << 16) + (g << 8) + f RgbToPil(r, g, b):
      '''Convert the color from RGB to a PIL-compatible integer.
  
      Parameters:
        :r:
          The Red component value [0...1]
        :g:
          The Green component value [0...1]
        :b:
          The Blue component value [0...1]
  
      Returns:
        A PIL compatible integer (0xBBGGRR).
  
      >>> '0x%06x' % Color.RgbToPil(1, 0.5, 0)
      '0x0080ff'
  
      '''
      r, g, b = [min(int(round(v*255)), 255) for v in (r, g, b)]
      return (b << 16) + (g << 8) + r
docs: Convert the color from RGB to a PIL-compatible integer.
  
      Parameters:
        :r:
          The Red component value [0...1]
        :g:
          The Green component value [0...1]
        :b:
          The Blue component value [0...1]
  
      Returns:
        A PIL compatible integer (0xBBGGRR).
  
      >>> '0x%06x' % Color.RgbToPil(1, 0.5, 0)
      '0x0080ff'