def RGBToYIQ(red, green, blue): return colorsys.rgb_to_yiq( float(red) / 0xff, float(green) / 0xff, float(blue) / 0xff)