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

> 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 :)


Received on Wednesday, 7 September 2011 02:53:15 UTC