Skip to content

Commit

Permalink
[css-color-hdr][editorial] Added an example, needs calculated result …
Browse files Browse the repository at this point in the history
…added once that section is there.
  • Loading branch information
svgeesus committed Feb 26, 2025
1 parent 2eac325 commit 3b4ef61
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion css-color-hdr-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,8 @@ Mixing Dynamic Range Limits: the ''dynamic-range-limit-mix()'' function {#dynami
It does this by specifying two <<color>> values,
each with an associated level of HDR headroom.
The actual value is computed by interpolating between these two colors,
based on the current amount of HDR headroom.
based on the current amount of HDR headroom,
as described in [#headroom-interpolation].

<div class="informative">
This is a similar mechanism to gain maps,
Expand All @@ -480,6 +481,31 @@ Mixing Dynamic Range Limits: the ''dynamic-range-limit-mix()'' function {#dynami
<dfn>hdr-color()</dfn> = color-hdr([ <<color>> && <<number [1,infinity]>>? ]#{2})
</pre>

<div class="example" id="ex-hdr-color-simple">
Consider the color:

<pre class="lang-css">
color-hdr(
color(rec2100-linear 0.9 1.0 0.8) 0,
color(rec2100-linear 1.8 2.0 1.5) 2);
</pre>

On a display with [=HDR headroom=] &lt;= 0,
this color will display as

<pre class="lang-css">color(rec2100-linear 0.9 1.0 0.8)</pre>

On a display with [=HDR headroom=] &gt;= 2,
this color will display as

<pre class="lang-css">color(rec2100-linear 1.8 2.0 1.5) 2);</pre>

For displays whose headroom lies between 0 and 2, the color is
interpolated. For example, on a display with HDR headroom 1:

@@ Add to the example with the calculated result at headroom 1 @@

</div>

<h2 id="color-function">
Specifying Predefined and Custom Color Spaces: the ''color()'' Function
Expand Down

0 comments on commit 3b4ef61

Please sign in to comment.