Skip to content

Commit

Permalink
Revert "Add srgb-linear, display-p3-linear, and rec2020-linear color …
Browse files Browse the repository at this point in the history
…spaces (#42)" (#43)

This reverts commit e9ad5e5.

I apologize - I merged this before Mozilla had a chance to review the last set of changes.
  • Loading branch information
kenrussell authored Jan 22, 2021
1 parent e9ad5e5 commit 724aa51
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions CanvasColorSpaceProposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,8 @@ IDL:

enum CanvasColorSpaceEnum {
"srgb", // default
"srgb-linear",
"display-p3",
"display-p3-linear",
"rec2020",
"rec2020-linear",
"rec-2020",
};

enum CanvasStorageFormatEnum {
Expand All @@ -53,11 +50,8 @@ enum CanvasStorageFormatEnum {

interface CanvasColorSpace {
const CanvasColorSpaceEnum srgb = "srgb";
const CanvasColorSpaceEnum srgbLinear = "srgb-linear";
const CanvasColorSpaceEnum displayP3 = "display-p3";
const CanvasColorSpaceEnum displayP3Linear = "display-p3-linear";
const CanvasColorSpaceEnum rec2020 = "rec2020";
const CanvasColorSpaceEnum rec2020Linear = "rec2020-linear";
const CanvasColorSpaceEnum rec2020 = "rec-2020";
};

interface CanvasStorageFormat {
Expand Down Expand Up @@ -240,7 +234,7 @@ The ``getImageData`` method is responsible for converting the data from the canv

#### Selecting the best color space match for the user agent's display device
<pre>
var colorSpace = window.matchMedia("(color-gamut: rec2020)").matches ? "rec2020" :
var colorSpace = window.matchMedia("(color-gamut: rec2020)").matches ? "rec-2020" :
(window.matchMedia("(color-gamut: p3)").matches ? "display-p3" : "srgb");
</pre>

Expand All @@ -263,9 +257,7 @@ Authors of games and imaging apps are expected to be enthusiastic adopters.

* Should context creation throw on an unrecognized, non-undefined creation attribute?

* The [Media Query APIs](https://www.w3.org/TR/mediaqueries-4/) use the names "srgb" and "p3", while the [CSS Color Module Level 4](https://www.w3.org/TR/css-color-4/#predefined) uses the names "sRGB" and "display-p3". This divergence could be confusing.

* The [CSS Color Module Level 4](https://www.w3.org/TR/css-color-4/#predefined) specification does not include srgb-linear, display-p3-linear, or rec2020-linear.
* The [Media Query APIs](https://www.w3.org/TR/mediaqueries-4/) use the names "p3" and "rec2020", while the [CSS Color Module Level 4](https://www.w3.org/TR/css-color-4/#predefined) uses the names "display-p3" and "rec-2020". This divergence could be confusing.

## Proposal History

Expand Down

0 comments on commit 724aa51

Please sign in to comment.