syholloway/mrcolor — pull request #4 by Dobby007 (2014-09-01 14:09:08+00:00)
Title: - BUG: Color was not created correctly when only hsl color properties ar...

There were a few bugs in the "master" branch. At first, color was not created correctly when only hsl color properties are supplied. Because of RGB to HSL convert algorithm's nature, HSL properties "hue" and "saturation" are always equal to 0, even if you tell them not to. This is because lightness is 0. The output color will always be "#000" till you tell the lightness property. And consequently, the output color was wrong until now. You can check it with the following code:
> $color12 = Color::create(
> array(
> 'hue' => 60,
> 'saturation' => 0.48,
> 'lightness' => 0.59
> )
> );

The correct result is: rgba(201, 201, 100, 1).
Also there was a bug when color is supplied in a hex format. Properties were not updated. You can see it in your last example. I solved it by adding a "virtual" hex format. I think, that's all what I fixed...