@@ -558,6 +558,7 @@ Mixing Dynamic Range Limits: the ''dynamic-range-limit-mix()'' function {#dynami
558
558
559
559
It does this by specifying two <<color>> values,
560
560
each with an associated level of HDR headroom.
561
+ (The two headroom values must not be the same).
561
562
The actual value is computed by interpolating between these two colors,
562
563
based on the current amount of HDR headroom,
563
564
as described in [[#headroom-interpolation]] .
@@ -567,7 +568,7 @@ Mixing Dynamic Range Limits: the ''dynamic-range-limit-mix()'' function {#dynami
567
568
in raster images conforming to [[ISO_21496-1]] .
568
569
</div>
569
570
570
- The actual calculated color is not exposed,
571
+ For privacy reasons, the actual calculated color is not exposed,
571
572
nor is the actual HDR headroom,
572
573
as this is a fingerprinting vector.
573
574
@@ -598,9 +599,10 @@ Mixing Dynamic Range Limits: the ''dynamic-range-limit-mix()'' function {#dynami
598
599
<pre class="lang-css"> color(rec2100-linear 1.8 2.0 1.5) 2);</pre>
599
600
600
601
For displays whose headroom lies between 0 and 2, the color is
601
- interpolated. For example, on a display with HDR headroom 1:
602
+ interpolated. For <a href="#ex-hdr-interpolate">example</a> ,
603
+ on a display with HDR headroom 1:
602
604
603
- @@ Add to the example with the calculated result at headroom 1 @@
605
+ X = 243.664, Y = 275.713, Z = 244.000
604
606
605
607
</div>
606
608
@@ -613,24 +615,27 @@ Mixing Dynamic Range Limits: the ''dynamic-range-limit-mix()'' function {#dynami
613
615
giving result color <var> cxyz</var> ,
614
616
when the target headroom is <var> H</var> :
615
617
616
- 1. Let <var> c1xyz</var> be <var> c1</var> converted to D65 CIE XYZ
617
- 2. Let <var> c2xyz</var> be <var> c2</var> converted to D65 CIE XYZ
618
+ 1. Let <var> c1xyz</var> be <var> c1</var> converted to Absolute D65 CIE XYZ
619
+ 2. Let <var> c2xyz</var> be <var> c2</var> converted to Absolute D65 CIE XYZ
618
620
3. Let <var> w1</var> = clamp((<var> H</var> - <var> H2</var> ) / (<var> H1</var> - <var> H2</var> ), 0, 1)
619
621
4. Let <var> w2</var> = clamp((<var> H</var> - <var> H1</var> ) / (<var> H2</var> - <var> H1</var> ), 0, 1)
620
622
Note that <var> w2</var> = 1 - <var> w1</var>
621
623
5. Let <var> eps</var> = 0.001 (one JND in linear-light space)
622
- 6. Let <var> cxyz</var> = pow(<var> c1xyz</var> + <var> eps</var> , <var> w1</var> ) * pow(<var> c2xyz</var> + <var> eps</var> , <var> w2</var> ) - <var> eps</var>
624
+ 6. Let <var> cxyz</var> = Array(3)
625
+ 7. For i from 0 to 2:
626
+ Let <var> cxyz</var> [i] = pow(<var> c1xyz</var> [i] + <var> eps</var> , <var> w1</var> ) * pow(<var> c2xyz</var> [i] + <var> eps</var> , <var> w2</var> ) - <var> eps</var>
623
627
624
628
<div class="example" id="ex-hdr-interpolate">
625
629
For example, given c1 = color(rec2100-linear 0.9 1.0 0.8)
626
630
c2 = color(rec2100-linear 1.8 2.0 1.5),
627
631
H1 = 0, H2 = 2, and H = 1:
628
632
629
633
<pre class="lang-css">
630
- c1xyz = color(xyz-d65 0.853 0.9619 0.8769)
631
- c2xyz = color(xyz-d65 1.689 1.918 1.648)
632
- w1 =
633
- w2 =
634
+ c1xyz = [ 173.156, 195.260, 178.003 ]
635
+ c2xyz = [ 342.883, 389.315, 334.467 ]
636
+ w1 = 0.5
637
+ w2 = 0.5
638
+ cxyz = [ 243.664, 275.713, 244.000 ]
634
639
</pre>
635
640
</div>
636
641
0 commit comments