jquery / jquery-color

jQuery plugin for color manipulation and animation support.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HSL Setters do not work

MadLittleMods opened this issue · comments

See Demo: jsFiddle

If you create a rgb color, then modify the color via hsl setters, no change will occur.

var myColor =  $.Color(50, 200, 50);

// Change the color
myColor.saturation(.39);
myColor.lightness(.69);

Even creating a HSLA color and trying to use the setters doesn't seem to work (in demo).

var anotherColor =  $.Color({ hue: 120, saturation: .60, lightness: .49, alpha: 1 });
// Change the color
anotherColor.saturation(.39);
anotherColor.lightness(.69);

Am I just misusing it?

Each "setter" returns a new color:

myColor = myColor.saturation(.39).lightness(.69);

http://jsfiddle.net/wE7Pj/3/