- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Tue, 22 Nov 2011 08:48:47 -0800
- To: Chris Lilley <chris@w3.org>
- Cc: Kevin Bortis <kevin@bortis.ch>, W3C Style <www-style@w3.org>
On Tue, Nov 22, 2011 at 6:40 AM, Chris Lilley <chris@w3.org> wrote: > On Monday, November 21, 2011, 6:53:09 PM, Tab wrote: > TAJ> On Mon, Nov 21, 2011 at 6:06 AM, Kevin Bortis <kevin@bortis.ch> wrote: >>> On Tue, Nov 15, 2011 at 3:56 PM, Christoph Päper >>> <christoph.paeper@crissov.de> wrote: >>>> hlc(<angle>, <percentage>, <percentage>) > >>>> hlc(240deg, 80%, 15%) >>>> hlc(0.667turn, 0.8, 0.15) >>>> hlc(267grad, 204, 38) … > >>> Degrees are the only practical solution here. I don't know anyone who >>> is using turns for color angles. The only other solution would be rad, >>> but this is not practical because PI is a never ending floating point >>> number. > > TAJ> In practice, people use degrees, sure. That doesn't mean that it's a > TAJ> good idea to force people to use degrees, > > In practice, people use only degrees, as an untyped unitless number. That doesn't mean that its a good idea to force people to use angular unit identifiers, just so that they could in theory also use radians or turns (which no-one has asked for or presented a use case for). > > TAJ> Again, hiding the unit behind a unitless number is an anti-pattern. > > Diverging from current industry practice is also an anti-pattern. In most programming languages, people use untyped unitless numbers for lengths, percentages, and everything else too, because most languages don't make it easy to attach a unit to a number. That doesn't mean that CSS should use unitless numbers everywhere. CSS has numbers with units, and they offer many benefits, the most pertinent of which here is readability. > TAJ> I support reopening those discussions and coming up with a sane color > TAJ> palette designed around base colors and optional keywords like "light" > TAJ> or "very dark", etc. I'm neutral as to whether we define this in > TAJ> terms of hlc or some other color scheme, because I don't know enough > TAJ> about the merits, but having perceptually even palette would be nice. > > It would make sense to define it in Lab, because the merit of using named colours is that you use a name not a value, so there is no particular benefit to using LCH instead of Lab. Yeah, so long as the effect you get is good, and they can be mapped back to rgba, everything's fine. ~TJ
Received on Tuesday, 22 November 2011 16:49:57 UTC