summaryrefslogtreecommitdiffstats
path: root/src/curve.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-02-16 23:38:22 +0100
committerMattias Andrée <maandree@operamail.com>2014-02-16 23:38:22 +0100
commitcf523b5430e433292734af7141a850bc5392380a (patch)
tree4193b102115f0b21dec28aa117552712c629421f /src/curve.py
parentcolour tempurature does not work correctly, otherwise all curves work (diff)
downloadblueshift-cf523b5430e433292734af7141a850bc5392380a.tar.gz
blueshift-cf523b5430e433292734af7141a850bc5392380a.tar.bz2
blueshift-cf523b5430e433292734af7141a850bc5392380a.tar.xz
the tempurations are actually correct, suggest in doc to use divide_by_maximum
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/curve.py')
-rw-r--r--src/curve.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/curve.py b/src/curve.py
index b87e90f..74beb41 100644
--- a/src/curve.py
+++ b/src/curve.py
@@ -98,6 +98,8 @@ def cmf_2deg(temperature):
'''
Calculate the colour for a blackbody temperature using raw CIE 1931 2 degree CMF data with interpolation
+ Using `lambda t : divide_by_maximum(cmf_2deg(t))` as the colour algorithm is better than just `cmf_2deg`
+
@param temperature:float The blackbody temperature in kelvins, clipped to [1000, 40000]
@return :(float, float, float) The red, green and blue components of the white point
'''
@@ -127,6 +129,8 @@ def cmf_10deg(temperature):
'''
Calculate the colour for a blackbody temperature using raw CIE 1964 10 degree CMF data with interpolation
+ Using `lambda t : divide_by_maximum(cmf_10deg(t))` as the colour algorithm is better than just `cmf_10deg`
+
@param temperature:float The blackbody temperature in kelvins, clipped to [1000, 40000]
@return :(float, float, float) The red, green and blue components of the white point
'''