Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/chroma-js/src/conversions/lch2lab.coffee')
-rw-r--r--node_modules/chroma-js/src/conversions/lch2lab.coffee10
1 files changed, 10 insertions, 0 deletions
diff --git a/node_modules/chroma-js/src/conversions/lch2lab.coffee b/node_modules/chroma-js/src/conversions/lch2lab.coffee
new file mode 100644
index 0000000000..735be27f4c
--- /dev/null
+++ b/node_modules/chroma-js/src/conversions/lch2lab.coffee
@@ -0,0 +1,10 @@
+
+lch2lab = () ->
+ ###
+ Convert from a qualitative parameter h and a quantitative parameter l to a 24-bit pixel. These formulas were invented by David Dalrymple to obtain maximum contrast without going out of gamut if the parameters are in the range 0-1.
+ A saturation multiplier was added by Gregor Aisch
+ ###
+ [l,c,h] = unpack arguments
+ h = h * Math.PI / 180
+ [l, Math.cos(h) * c, Math.sin(h) * c]
+