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

Re: [css4-color] Grayscale shorthand (with alpha)

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Wed, 18 Apr 2012 08:05:14 -0700
Message-ID: <CAAWBYDBXm4p+tUpOZ28-SXBU=zLMcT0+mhkQ3Ow=FtH9H86_jw@mail.gmail.com>
To: Chris Lilley <chris@w3.org>
Cc: Rudolph Gottesheim <r.gottesheim@loot.at>, www-style@w3.org
On Wed, Apr 18, 2012 at 5:03 AM, Chris Lilley <chris@w3.org> wrote:
> On Tuesday, April 17, 2012, 11:01:17 AM, Rudolph wrote:
> RG> I find myself writing things like rgba(0, 0, 0, .5) or rgba(192, 192,
> RG> 192, .8) dozens of times a day, mostly for shadows. It's always some
> RG> shade of gray with some alpha value.
> RG> Do you think there's room for a grayscale color shorthand?
> What properties would you want it to have? For example, would 50% gray correspond to a color which is visually 50% between black and white?
> The CIE lightness (L*) has that property. L=0 is black, L=100 is the media white. L=50 is exactly a mid grey.
> It could be used by itself or as part of the CIE Lab or LCH color spaces (C and H are chroma and hue angle) - to give warm or cool greys for example.

I'm definitely interested in investigating the CIELab/LCH color spaces
at some point, and we could potentially hook gray() up to that instead
of RGB.  I wouldn't want to make a choice yet.

Received on Wednesday, 18 April 2012 15:06:09 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:14 UTC