summaryrefslogtreecommitdiffstats
path: root/src/colour.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-14 17:53:04 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-14 17:53:04 +0100
commitb3d4c5e1159e56a90af7e40ad3c5866241b3da09 (patch)
tree55546afc74ed6731c2b468322ac54082dd06fe1d /src/colour.py
parenttypo (diff)
downloadblueshift-b3d4c5e1159e56a90af7e40ad3c5866241b3da09.tar.gz
blueshift-b3d4c5e1159e56a90af7e40ad3c5866241b3da09.tar.bz2
blueshift-b3d4c5e1159e56a90af7e40ad3c5866241b3da09.tar.xz
m doc
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/colour.py')
-rw-r--r--src/colour.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/colour.py b/src/colour.py
index 7cbfc8b..b71f325 100644
--- a/src/colour.py
+++ b/src/colour.py
@@ -20,9 +20,7 @@ def linear_to_standard(*colour):
'''
Convert [0, 1] linear RGB to [0, 1] sRGB
- @param r:float The red component
- @param g:float The green component
- @param b:float The blue component
+ @param colour:*float The red component, the green component, and the blue component
@return :[float, float, float] The red, green and blue components
'''
return [12.92 * c if c <= 0.0031308 else (1 + 0.055) * c ** (1 / 2.4) - 0.055 for c in colour]
@@ -31,9 +29,7 @@ def standard_to_linear(*colour):
'''
Convert [0, 1] sRGB to linear [0, 1] RGB
- @param r:float The red component
- @param g:float The green component
- @param b:float The blue component
+ @param colour:*float The red component, the green component, and the blue component
@return :[float, float, float] The red, green and blue components
'''
return [c / 12.92 if c <= 0.04045 else ((c + 0.055) / (1 + 0.055)) ** 2.4 for c in colour]