W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: Color tweaking functions

From: Lea Verou <leaverou@gmail.com>
Date: Wed, 25 Jan 2012 14:26:41 +0200
Message-ID: <4F1FF501.4000505@gmail.com>
To: Christoph Päper <christoph.paeper@crissov.de>
CC: www-style list <www-style@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:49 GMT