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

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

From: Marat Tanalin <mtanalin@yandex.ru>
Date: Fri, 09 Sep 2011 19:27:28 +0400
To: Philippe Wittenbergh <ph.wittenbergh@l-c-n.com>
Cc: www-style list <www-style@w3.org>
Message-Id: <487011315582048@web123.yandex.ru>
1. Well, if we need for both features, then both features should be probably added to CSS spec. One feature (shortening hex values) just should not be confused with another one (gray() function that has nothing to do with shortening hex values): they are solutions for separate tasks, not an alternatives at all.

2. Since we are (well, trying) developing interoperable CSS, then proprietary solutions does not matter (though even MS uses decimal in -ms-filter: "alpha(opacity=70)" property). In standard CSS, opacity is specified as decimal number, and future decisions for CSS should be consistent with ones already existing in standard CSS.

07.09.2011, 06:34, "Philippe Wittenbergh" <ph.wittenbergh@l-c-n.com>:
> On Sep 7, 2011, at 4:26 AM, Marat Tanalin wrote:
>>  1. As for gray() function.
>>  I don't want gray() function, I want to shorten hex values. %) The thread author obviously wants the same. You do not want gray() function, others including topic author dont't want this too. So there is no sense to discuss something that is not of our interest at all (with same success we could discuss, say, weather or hadron collider).
> It may not be in _your_ interest, but personally I'm much more interested in having a gray() function than extending the hexadecimal notation. I suspect Tab is more interested in the the gray() function as well. But I don't live in his head to know…
> When discussing new proposals, the CSS WG should examine all options. imho.
>>  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.
> There are precedents for hexadecimal notation including opacity.
> Here is a code snippet from one of my stylesheets:
> filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#801e5799', endColorstr='#7db9e8',GradientType=0 ); /* IE6-9 */
> note the startColorstr value, equivalent to rgba(30,87,153,0.5)
> That is implemented by Microsoft. Inkscape also uses that notation, fwiw.
> (not arguing if it is good or bad to have such a notation in CSS - personally, I strikes me as very hard to read, but that is just me; I'm satisfied with rgba() and hsla()).
> Philippe
> --
> Philippe Wittenbergh
> http://l-c-n.com/
Received on Friday, 9 September 2011 15:28:18 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:03 UTC