<Confusion about applying hue to a grey value> Try this: >>> import colorsys as cs >>> grey = (.7, .7, .7) >>> blue = (0., 0., 1.) >>> hsv_grey = cs.rgb_to_hsv(*grey) >>> hsv_blue = cs.rgb_to_hsv(*blue) >>> hsv_grey (0.0, 0.0, 0.69999999999999996) >>> hsv_blue (0.66666666666666663, 1.0, 1.0)
The problem is that the saturation of the grey is 0. There is no Hue to anything between black and white. Maybe you want something like: def apply_hue(color, rgb): hue, _saturation, _value = cs.rgb_to_hsv(*color) _hue, saturation, value = cs.rgb_to_hsv(*rgb) return cs.hsv_to_rgb(hue, max(.1, saturation), value) Or: def apply_hs(color, rgb): hue, saturation, value = cs.rgb_to_hsv(*color) _hue, _saturation, value = cs.rgb_to_hsv(*rgb) return cs.hsv_to_rgb(hue, saturation, value) --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list