W3C home > Mailing lists > Public > www-style@w3.org > July 2014

Re: [css-color] Exposing browser color parsing to JS

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 7 Jul 2014 17:42:02 -0700
Message-ID: <CAAWBYDC5cK4fbCRfWy9GV119-R7mpZwgw3kHMmOxUddfF8g=rQ@mail.gmail.com>
To: Barry van Oudtshoorn <bvanoudtshoorn@gmail.com>
Cc: www-style list <www-style@w3.org>
On Mon, Jul 7, 2014 at 5:29 PM, Barry van Oudtshoorn
<bvanoudtshoorn@gmail.com> wrote:
> Would the intention be that this ultimately gain access to the upcoming CSS
> colour-manipulation functions in L4? I generally find that it's primarily
> necessary to parse colours as such when further manipulation is required --
> for example, to lighten, darken, or find the best contrasting colour
> (white/black -- via YIQ) for text. Or would it be expected that authors add
> such functionality by adjusting RGBAColor.prototype?

Well, it would definitely *expose* that stuff without hand-parsing,
via CSS.parseColor().  Exposing the operations more directly, via
operations that return another RGBAColor object, is definitely a
possibility.

But if we don't, authors can add those themselves, as you note.

~TJ
Received on Tuesday, 8 July 2014 00:42:49 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:23 UTC