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

On Thu, Apr 19, 2012 at 6:38 AM, Chris Lilley <chris@w3.org> wrote:

> On Wednesday, April 18, 2012, 9:07:46 PM, Rik wrote:
>
> RC> Since sRGB is the colorspace of choice, sGray is probably the
> RC> colorspace for grayscale. This makes the conversion
> RC> straightforward since xx% Gray will always results in xx% R, xx% G and
> xx%B
>
> Yes, that is an advantage, if the grey is seen purely as a syntactic
> shortcut. It becomes less useful if you want warming or cooling tints.
>
> RC> Going the Lab route will result in unexpected results for the
> RC> user since 50% L will result in 62% RGB.
>
> I'm not sure where 62% comes from.
>

I must have clicked wrong on the slider in Photoshop. You are right that
the difference is not that big.


>
> To get a mid gray the magic value is 46.6% not 50%; to get a quarter gray
> its 23.3% not 25%, and a three-quarters gray is 72.3% not 75% (with a D50
> reference white and a Bradford CAT).


If we're going to add colorspaces, we should also consider adding Lab.
Not only will gradients look better if you interpolate in the Lab
colorspace (see attached), it will also allow designers to use the modern
high gamut displays.


>
> RC> On Wed, Apr 18, 2012 at 8:44 AM, Chris Lilley <chris@w3.org> wrote:
> RC>  On Wednesday, April 18, 2012, 5:05:14 PM, Tab wrote:
> RC>
>
>  TAJ>> 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:
> RC>
>  >>> 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.
> RC>
>  >>> RG> Do you think there's room for a grayscale color shorthand?
> RC>
>  >>> 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?
> RC>
>  >>> The CIE lightness (L*) has that property. L=0 is black, L=100 is the
> media white. L=50 is exactly a mid grey.
> RC>
>  >>> 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.
> RC>
> RC>
> TAJ>> I'm definitely interested in investigating the CIELab/LCH color
> spaces
>  TAJ>> at some point,
> RC>
> RC>  What do you want to know about them?
> RC>
> RC>  (Rudolph, note by the way that LCH is not the same as HSV or HSL)
> RC>
>  TAJ>> and we could potentially hook gray() up to that instead
>  TAJ>> of RGB.  I wouldn't want to make a choice yet.
> RC>
> RC>  Yes, it really depends on what the requirements are.
> RC>
> RC>  Whatever we decide on has to have a defined colorimetric
> RC> interpretation, though (so defining it as L*, or alternatively as
> RC> the neutral axis of sRGB, would work; defining it as "your mileage
> RC> may vary" device gray would not).
> RC>
>
> RC>  --
> RC>   Chris Lilley   Technical Director, Interaction Domain
> RC>   W3C Graphics Activity Lead, Fonts Activity Lead
> RC>   Co-Chair, W3C Hypertext CG
> RC>   Member, CSS, WebFonts, SVG Working Groups
> RC>
> RC>
> RC>
>
>
> RC>
>
>
>
> --
>  Chris Lilley   Technical Director, Interaction Domain
>  W3C Graphics Activity Lead, Fonts Activity Lead
>  Co-Chair, W3C Hypertext CG
>  Member, CSS, WebFonts, SVG Working Groups
>
>

Received on Thursday, 19 April 2012 16:36:41 UTC