diff options
-rw-r--r-- | Tools/pynche/ColorDB.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Tools/pynche/ColorDB.py b/Tools/pynche/ColorDB.py index 33dfe02..f9ba27e 100644 --- a/Tools/pynche/ColorDB.py +++ b/Tools/pynche/ColorDB.py @@ -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 |