- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Sat, 15 Mar 2014 10:12:15 -0700
- To: Christoph Päper <christoph.paeper@crissov.de>
- Cc: www-style list <www-style@w3.org>
On Fri, Mar 14, 2014 at 3:29 AM, Christoph Päper <christoph.paeper@crissov.de> wrote: > Alex Sexton <alexsexton@gmail.com>: >> Sorry for the short delay in responding to this, > > Is this really a reply to a thread from May 2002? > <http://lists.w3.org/Archives/Public/www-style/2002May/0131.html> Hahaha, yep. > This reminded me of an idea I had a while ago: turn color names into pseudo functions, e.g. ‘gray’: > > ‘gray0’ = gray(0%) /* = ‘black’ */ > … > ‘gray50’ = gray(50%) > … > ‘gray’ = gray() /* = ‘gray(50%)’ in CSS, but ‘gray75’ in X11 */ > … > ‘gray75’ = gray(75%) /* = ‘silver’ = ‘silver()’ */ > … > ‘gray100’ = gray(100%) /* = ‘white’ */ > > I think this notation has been suggested before as a shortcut for repeated triplets in RGB functions or as an alias to also proposed single-value RGB function or as the lightness in otherwise zeroed HSL (and HSV) values. gray() is already in the Colors 4 draft: <http://dev.w3.org/csswg/css-color/#grays> > Let’s not stop there. We could put basically anything inside those parentheses and it would work nicely even within shorthand properties. This includes CNS keywords! [snip CNS system proposal] I did a good bit of research and gave a lot of thought to this 2 years ago, and came up with a slightly modified CNS as well: <http://www.xanthir.com/blog/b4Jp0> I haven't put it into Colors 4 yet, but I plan to do so eventually (or more likely, Colors 5). ~TJ
Received on Saturday, 15 March 2014 17:13:02 UTC