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

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