Commit 2662e15f authored by Barry Warsaw's avatar Barry Warsaw

triplet_to_pmwrgb(): New function

parent 315b5d8a
......@@ -164,6 +164,11 @@ def triplet_to_rrggbb(rgbtuple):
return '#%s%s%s' % tuple(map(hexify, rgbtuple))
def triplet_to_pmwrgb(rgbtuple, MAX=256.0):
r, g, b = rgbtuple
return r/MAX, g/MAX, b/MAX
if __name__ == '__main__':
import string
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment