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: Thu, 4 Aug 2011 13:40:01 +0100
Message-Id: <1D14578C-C314-465B-9182-D41EA3752274@silversquid.com>
Cc: www-style@w3.org
To: Markus Bruch <macinfo@arcor.de>
Exactly right.

And I still think the savings are worth it.

On 3 Aug 2011, at 16:29, Markus Bruch wrote:

> 
> Am 02.08.2011 um 11:32 schrieb Antony Kennedy:
> 
>> I like this idea. To extend it to 255 shades of grey you could also use two characters, like #ac.
> 
> Ah great idea, I didn't think of that!
> 
> If I understand it right you intend it to work like this:
> 
> 
> 	.gray { color: #acacac; } 	-->  	 	.gray { color: #ac }
> 
> 
> (Just store one of the 3 equal rgb-channnel bytes; at rendering put this one value back in any of the r-, g- and b-channels.)
> 
> This addition would round the idea off nicely to render either 16-shade or 256-shade gray color.
> 
> 
> 
>> 
>> Could a similar implementation be used with RGB()? Although easier to read, it is a more verbose format.
>> 
>> A
>> 
>> On 31 Jul 2011, at 12:34, Markus Bruch wrote:
>> 
>>> Hi, I'm new to this list, so please forgive if this topic has been
>>> talked about before.
>>> 
>>> 
>>> I'd like to propose to further shorten the css hex color notation.
>>> 
>>> Known notation:
>>> 
>>> 	.orange { color: #ff6600; }
>>> 
>>> to:
>>> 
>>> 	.orange { color: #f60; }
>>> 
>>> I would suggest that for a specific set of 16 grayscale shades,
>>> to reduce the rgb-values to one single character:
>>> 
>>> 	.gray { color: #ccc; }
>>> 
>>> to:
>>> 
>>> 	.gray { color: #c; }
>>> 
>>> In addition to it's only marginal bandwith or space saving it
>>> would have the benefit of being concise and easily visible to
>>> the reader, that this code assigns a grayscale color (from a
>>> set of 16 shades, #0 - #f).
>>> 
>>> What do you think?
>>> 
>>> Regards,
>>> 
>>> Markus Bruch
>>> 
>>> -- 
>>> macinfo@arcor.de
>>> 
>>> 
>>> 
>> 
>> 
> 
Received on Thursday, 4 August 2011 12:40:35 GMT

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