W3C home > Mailing lists > Public > www-style@w3.org > August 2011

Re: [css] Proposal: making Shorthand Hex Colors even shorter (16 grayscale shades)

From: Antony Kennedy <antony@silversquid.com>
Date: Tue, 2 Aug 2011 14:02:09 +0100
Cc: Markus Bruch <macinfo@arcor.de>, CSS 3 W3C Group <www-style@w3.org>
Message-Id: <E76140C1-F2A8-4F96-BC14-8904742266B3@silversquid.com>
To: Alan Gresley <alan@css-class.com>
Ah, yes, of course. We would probably want to allow alpha channels too, but gsa() and graya() do not feel especially intuitive…

On 2 Aug 2011, at 13:41, Alan Gresley wrote:

> On 2/08/2011 10:23 PM, Antony Kennedy wrote:
>> On 2 Aug 2011, at 11:54, Alan Gresley wrote:
> 
>>> Possibly but it would be not rgb() anymore. You would want
>>> grayscale() but this is counter to saving bandwidth. Possibly gs()
>>> with a range of '0' to '255'. I presume you are thinking of using
>>> this on handheld devices.
>> 
>> I'm not sure why it wouldn't be rgb(). rgb(100) would be the same as
>> rgb(100,100,100) – it would still have values for all three channels.
>> gs() or gray() both offer more clarity, though. Yes, for handheld
>> devices or just as a best practise, for reducing bandwidth and file
>> sizes.
>> 
>> AK
> 
> 
> It would have to be gs() or gray() for forward compatibility since rgb(100) or something similar has to throw a parsing error since it is an invalid value in rgb().
> 
> 
> 
> 
> -- 
> Alan Gresley
> http://css-3d.org/
> http://css-class.com/
> 
Received on Tuesday, 2 August 2011 13:02:46 GMT

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