Re: Color tweaking functions

On 22/1/12 00:20, Christoph Päper wrote:
> Pete Boere (2012-01-21 10:56):
>
>> h-adjust( red 10% ) =>  rotate hue 10%
>> s-adjust( hotpink -100% )  =>  desaturate
>> l-adjust( #f00 15% ) =>  lighten 10%
>> a-adjust( rgb(0,0,255) -10% ) =>  reduce opacity 10%
>
> Ain’t that what we got ‘hsla()’ for?
>
> That being said, I’m all for a systematic keyword-based color system … and, actually, have been for almost ten years now.

How does hsla() help with hue rotation or (de)saturation?
Even with lightening, it depends on what's underneath, which isn't 
always helpful. For example, lightening text color with a text-shadow is 
present. Since the shadow isn't clipped under the text, with an HSLA 
text color it shows through, resulting to a result that's very different 
than the intended.

-- 
Lea Verou (http://lea.verou.me | @LeaVerou)

Received on Wednesday, 25 January 2012 12:27:12 UTC