WICG / canvas-color-space

Proposed web platform feature to add color management, wide gamut and high bit-depth support to the <canvas> element.
Other
81 stars 19 forks source link

Why only for Canvas? #14

Open lrosenthol opened 7 years ago

lrosenthol commented 7 years ago

How would these same concepts also be applied to standard HTML elements (eg. text) or SVG or MathML or any other content found in the Open Web Platform? Why not do this in CSS, where everyone/thing would benefit?

junov commented 7 years ago

I think what you are looking for is in CSS color module level 4. The CSS color() function will allow colors to be specified in any color space. See: https://drafts.csswg.org/css-color-4/#funcdef-color

In HTML+CSS there is no direct control over the rendering pipeline. The CSS+HTML provide a language for describing document content, and browsers have to figure out the optimal way to display it on the user's hardware (display or printing device). The choice of intermediate colorspace, pixel resolution and color bit depths are automatic.

Canvas, on the other hand is not a document description API. That is why the proposal found here is orthogonal. The canvas provides an isolated rendering environment, where it makes sense to provide more low level controls for configuring the rendering pipeline.

lrosenthol commented 7 years ago

On Thu, May 18, 2017 at 1:47 AM, Justin Novosad notifications@github.com wrote:

In HTML+CSS there is no direct control over the rendering pipeline

Isn't that one of the things that Houdini (< https://github.com/w3c/css-houdini-drafts/wiki>) is looking to correct? If so, shouldn't this work align with that?

junov commented 7 years ago

cc @bfgeek