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

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 2 Aug 2011 11:01:00 -0700
Message-ID: <CAAWBYDA5HJU6dAhmw871TxFr_4V6BMTYcn+SGu8v3uk7M3dp2Q@mail.gmail.com>
To: Markus Bruch <macinfo@arcor.de>
Cc: www-style@w3.org
On Sun, Jul 31, 2011 at 4:34 AM, Markus Bruch <macinfo@arcor.de> wrote:
> 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; }

While I'm not necessarily opposed to something like this, I question
the utility of saving two characters on a mere 16 colors.  I think the
3-digit hex is very readable and trivial to type.

I am strongly opposed to a 2-digit variant, because it has a different
expansion rule than the 3-digit hex that already exists.

If we wanted to make it easier to write grays, I'd be more in favor of
a gray(<number> | <percentage>) function.  However, it's relatively
easy to use the hsl() function to create grays already, with
"hsl(0,0%,<gray percentage>)".  50% gray is just hsl(0,0%,50%), which
is slightly more verbose than gray(50%), but much better than

Received on Tuesday, 2 August 2011 18:01:47 UTC

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