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

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

From: Shane Stephens <shans@google.com>
Date: Tue, 6 Sep 2011 19:52:49 -0700
Message-ID: <CAGTfzwRNjd77UAo1Y0aDhy738cLQALOkeT9R7Aht-qDANUikqg@mail.gmail.com>
To: Marat Tanalin <mtanalin@yandex.ru>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, www-style@w3.org
>
>
> 2. As for alpha opacity.
> The only reason why RGB components can be represented as hex is that each
> RGB component has exactly 256 possible values _by nature_. But this has
> NOTHING TO DO with opacity. Opacity is always specified as decimal number:
> for example in "opacity" CSS-property, opacity in "rgba()" CSS-function, or
> percentage transparency in Photoshop. So, hex representation is not only
> nonapplicable to opacity values, but just inconsistent with existing opacity
> values notation. Therefore, opacity should be kept specified as a decimal
> number and is not a subject to shorten at all.
>
>
RGB components are represented by 256 values precisely because of
representational issues - that is, each component is represented by a single
byte. Alpha components are typically represented the same way, hence the
very convenient 32-bit argb and rgba representations that one finds pretty
much everywhere.

To the extent that there's a problem here at all, it is with the fact that
the existing opacity values notation is different to the existing rgb values
notations when the underlying representations are identical, not with the
proposed 4- and 8-character hex shortenings :)

Cheers,
    -Shane
Received on Wednesday, 7 September 2011 02:53:15 GMT

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