mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
added link to original algorithm source
This commit is contained in:
parent
46483ee431
commit
e1a61e1d95
1 changed files with 4 additions and 0 deletions
|
@ -168,6 +168,8 @@ var Color = this.Color = Base.extend(new function() {
|
|||
},
|
||||
|
||||
'rgb-hsl': function(color) {
|
||||
// Code taken from
|
||||
// http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript
|
||||
var r = color._red,
|
||||
g = color._green,
|
||||
b = color._blue,
|
||||
|
@ -191,6 +193,8 @@ var Color = this.Color = Base.extend(new function() {
|
|||
},
|
||||
|
||||
'hsl-rgb': function(color) {
|
||||
// this code is a slightly modified version of this source:
|
||||
// http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript
|
||||
var s = color._saturation,
|
||||
h = color._hue / 360,
|
||||
l = color._lightness,
|
||||
|
|
Loading…
Reference in a new issue