Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions mediaqueries/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1447,6 +1447,49 @@ inverted-colors</h3>
</pre>
</div>

<h3 id="color-gamut">
color-gamut</h3>

<pre class='descdef mq'>
Name: color-gamut
Value: srgb | p3 | rec2020
For: @media
Type: range
</pre>

The 'color-gamut' media feature describes the approximate range of colors that are
supported by the browser and display device. That is, if the browser receives content
with colors in the specified space it can cause the display to render the appropriate
color, or something appropriately close enough.

The query uses approximate ranges for a few reasons. Firstly, there are a lot of differences in

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"a lot" -> "many"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p3 or dci_p3, slightly more descriptive (but longer)?
if shorter is preferred, maybe change rec2020 to 2020?

display hardware. For example, a device might claim to support "Rec 2020", but actually
renders a significantly lower range of the full gamut. Secondly, there are a lot of different
color ranges that different devices support, and enumerating them all would be tedious.
In most cases the author does not need to know the exact capabilities of the display, just
whether it is better than sRGB, or significantly better than sRGB. That way they can serve
appropriate images, tagged with color profiles, to the user.

The value 'srgb' represents a display that corresponds to the sRGB Color Space [[!SRGB]].
It is expected that the vast majority of color displays will be able to return true
to a query of this type.

The value 'p3' represents a display that can handle colors in approximately the gamut
specified by the DCI P3 Color Space.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reference to DCI P3 Color Space definition/spec?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I wasn't sure how references get into Bikeshed. Do you know?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tabatkins knows.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably want to add the canonical URL to SpecRef; I can do that for you if you can point me to it. Then you can just add a biblio ref to this paragraph.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tabatkins.

The reference for BT.2020 is available here:

"BT.2020 : Parameter values for ultra-high definition television systems for production and international programme exchange". International Telecommunication Union. 2012-08-23.
https://www.itu.int/rec/R-REC-BT.2020-0-201208-S/en

Unfortunately DCI P3 isn't as direct, but this might do:

EG 432-1:2010 - Digital Source Processing — Color Processing for D-Cinema. Institute of Electrical and Electronics Engineers. 2010-11-10
http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=7289763

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bt.2020 has been superseded, apparently. You sure that's the right reference?


The value 'rec2020' represents a display that can handle colors in approximately the gamut
specified by the ITU-R Recommendation BT.2020 Color Space.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reference to the ITU-R Recommendation BT.2020 Color Space definition/spec?


<div class="example">
For example, this media query applies when the display supports colors
in the range of DCI P3:

<pre>
@media (color-gamut: p3) { … }
</pre>
</div>



<!--
████ ██ ██ ████████ ████████ ████████ ███ ██████ ████████ ████ ███████ ██ ██
Expand Down