W3C home > Mailing lists > Public > www-style@w3.org > February 2014

Re: CSS3 lighten/darken suggestion

From: Jon Rimmer <jon.rimmer@gmail.com>
Date: Mon, 24 Feb 2014 18:21:37 +0000
Message-ID: <CA+ZDCiCck6KEG7Hkr_+Yfje+G65dar4KOhf=bJPCFBqLLKi40A@mail.gmail.com>
To: Simon Sapin <simon.sapin@exyr.org>
Cc: www-style list <www-style@w3.org>
My knowledge of colour theory is pretty weak, but as I understand it,
a problem with transforming colours in RGB/HSL etc. is that
equal-sized changes do not have perceptually uniform results
throughout the colour space[1]. Is there scope to allow
transformations that are done in the Lab colour space[2]?

[1] http://vis4.net/blog/posts/avoid-equidistant-hsv-colors/
[2] http://en.wikipedia.org/wiki/Lab_color_space


On 24 February 2014 16:22, Simon Sapin <simon.sapin@exyr.org> wrote:
> On 24/02/2014 16:13, Dub wrote:
>>
>> Hello,
>>
>> I am wondering if this has ever been brought up before now that we have
>> calc and such in the mix what are peoples thoughts on perhaps RGB/HEX
>> functions such as
>>
>> lighten(#000000, 20%);
>>
>> darken(#ffffff, 30%);
>>
>> Thoughts?
>
>
> Hi,
>
> We have a proposal for this in CSS Color 4:
>
> http://dev.w3.org/csswg/css-color-4/#modifying-colors
> http://dev.w3.org/csswg/css-color-4/#tint-shade-adjusters
>
> The syntax for your examples would be:
>
>   color(#000000 tint(20%))
>   color(#ffffff shade(30%))
>
> Feel free to send feedback on this here.
>
> --
> Simon Sapin
>
Received on Monday, 24 February 2014 18:22:04 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:19 UTC