-
Notifications
You must be signed in to change notification settings - Fork 794
[mediaqueries] Add the 'color-gamut' query function #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
| 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. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reference to DCI P3 Color Space definition/spec?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tabatkins knows.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. 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
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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> | ||
|
|
||
|
|
||
|
|
||
| <!-- | ||
| ████ ██ ██ ████████ ████████ ████████ ███ ██████ ████████ ████ ███████ ██ ██ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"a lot" -> "many"
There was a problem hiding this comment.
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?