aboutsummaryrefslogtreecommitdiff
path: root/util/ColorOps.py
diff options
context:
space:
mode:
authorGravatar rcoh <rcoh@mit.edu>2010-12-29 13:09:19 -0500
committerGravatar rcoh <rcoh@mit.edu>2010-12-29 13:09:19 -0500
commit8cb4e9ebab1fce088d729711a1bcf1bb32550a36 (patch)
tree12e54c6ec667d89863bb6c909397f25452cef20d /util/ColorOps.py
parent3036cc366e992c451d783635cbe9a50a606c8fce (diff)
parentc8209d01f9ddf4c6670caee08073924cb33e447f (diff)
Merge branch 'configimprovements' into performance
Conflicts: util/ColorOps.py
Diffstat (limited to 'util/ColorOps.py')
-rw-r--r--util/ColorOps.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/ColorOps.py b/util/ColorOps.py
index 9da27fb..f1d3741 100644
--- a/util/ColorOps.py
+++ b/util/ColorOps.py
@@ -8,6 +8,8 @@ def safeColor(c):
return [min(channel,255) for channel in c]
def combineColors(c1,c2):
return safeColor([c1[i]+c2[i] for i in range(min(len(c1),len(c2)))])
+def colorToInt(color):
+ return [int(channel) for channel in color]
def multiplyColor(color, percent):
return safeColor([fastMultiply(channel, percent, 1) for channel in color])