triplet_to_pmwrgb(): New function

This commit is contained in:
Barry Warsaw 1998-02-13 21:27:56 +00:00
parent 315b5d8a7f
commit 2662e15f58
1 changed files with 5 additions and 0 deletions

View File

@ -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