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

> If such hexadecimal notation was added, it would have to map the same as #rgb currently works. So #0 would equal #000000, #7 would equal #777777 and #f would equal #ffffff.

I think this is exactly what was suggested.

> 256 different shade to be exact.

Of course, apologies.

#ab would equal #ababab, #cd would equal #cdcdcd and #f5 would equal #f5f5f5.

To clarify:

#000000
#000
#00
#0

All of the above values would evaluate to #000000.

> 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

On 2 Aug 2011, at 11:54, Alan Gresley wrote:

> I have sent this as a new message for a new thread.
> 
> 
>> 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.
> 
> 
> Welcome. It would be good to start a new topic instead of piggybacking on top of an existing thread.
> 
> 
>>> 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
> 
> 
> If such hexadecimal notation was added, it would have to map the same as #rgb currently works. So #0 would equal #000000, #7 would equal #777777 and #f would equal #ffffff.
> 
> 
> On 2/08/2011 7:32 PM, Antony Kennedy wrote:
>> I like this idea. To extend it to 255 shades of grey you could also use two characters, like #ac.
> 
> 
> 256 different shade to be exact.
> 
> 
>> Could a similar implementation be used with RGB()? Although easier to read, it is a more verbose format.
>> 
>> A
> 
> 
> 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.
> 
> 
> 
> -- 
> Alan Gresley
> http://css-3d.org/
> http://css-class.com/
> 

Received on Tuesday, 2 August 2011 12:24:24 UTC