Skip to content

Commit 56c218a

Browse files
committed
[css-color-4] Gamut mapping small editorial fixes
1 parent d51a437 commit 56c218a

File tree

1 file changed

+41
-38
lines changed

1 file changed

+41
-38
lines changed

css-color-4/Overview.bs

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -252,22 +252,22 @@ Value Definitions</h3>
252252
<figure>
253253
<img src="images/UCS-display-p3.svg"
254254
width=500 height=464
255-
alt="uv chromaticity diagram of the display-p3 colorspace">
255+
alt="uv chromaticity diagram of the display-p3 color space">
256256
<figcaption>A chromaticity diagram showing
257-
(in solid colors) the ''display-p3'' colorspace
257+
(in solid colors) the ''display-p3'' color space
258258
and for comparison
259-
(faded) the ''sRGB'' colorspace.
259+
(faded) the ''sRGB'' color space.
260260
The white point (D65) is also shown.
261261
</figcaption>
262262
</figure>
263263

264-
RGB colorspaces are additive,
264+
RGB color spaces are additive,
265265
and their gamut is defined
266266
by the chromaticities of the red, green and blue primaries,
267267
plus the chromaticity of the <dfn export>white point</dfn>
268268
(the color formed by all three primaries at full intensity).
269269

270-
Most colorspaces use one of a few
270+
Most color spaces use one of a few
271271
daylight-simulating [=white points=],
272272
which are named by the color temperature
273273
of the corresponding black-body radiator.
@@ -3118,7 +3118,7 @@ Device-independent Colors: CIE Lab and LCH, OKLab and OKLCH</h2>
31183118

31193119
These deficiencies affect, for example,
31203120
creation of evenly spaced gradients,
3121-
gamut mapping from one colorspace to a smaller one,
3121+
gamut mapping from one color space to a smaller one,
31223122
and computation of the visual difference between two colors.
31233123

31243124
To compensate for this,
@@ -3162,7 +3162,7 @@ Device-independent Colors: CIE Lab and LCH, OKLab and OKLCH</h2>
31623162
and negative are the complementary blue/violet.
31633163

31643164
The illuminant is [=D65=], the same white point
3165-
as most RGB colorspaces.
3165+
as most RGB color spaces.
31663166

31673167
OKLCH has the same L axis as OKLab,
31683168
but uses polar coordinates C (chroma) and H (hue).
@@ -3646,7 +3646,7 @@ Predefined Color Spaces</h2>
36463646
<h3 id="predefined-sRGB">Predefined sRGB space</h3>
36473647

36483648

3649-
The <dfn id='sRGB-space' export>sRGB</dfn> predefined colorspace
3649+
The <dfn id='sRGB-space' export>sRGB</dfn> predefined color space
36503650
defined below
36513651
is the same as is used for legacy sRGB colors,
36523652
such as ''rgb()''.
@@ -3715,7 +3715,7 @@ Predefined Color Spaces</h2>
37153715
<h3 id="predefined-sRGB-linear">Predefined sRGB-linear space</h3>
37163716

37173717

3718-
The <dfn id='sRGB-linear-space' export>sRGB-linear</dfn> predefined colorspace
3718+
The <dfn id='sRGB-linear-space' export>sRGB-linear</dfn> predefined color space
37193719
is the same as ''srgb''
37203720
<em>except</em> that the transfer function
37213721
is linear-light (there is no gamma-encoding).
@@ -4162,7 +4162,7 @@ Converting Lab or OKLab to predefined RGB color spaces</h3>
41624162
Converting between predefined RGB color spaces
41634163
</h3>
41644164

4165-
Conversion from one predefined RGB colorspace to another
4165+
Conversion from one predefined RGB color space to another
41664166
requires multiple steps,
41674167
one of which is only needed when the whitepoints differ.
41684168
To convert from <em>src</em> to <em>dest</em>:
@@ -4650,16 +4650,16 @@ Gamut Mapping
46504650

46514651
<p><i>This section is non-normative</i></p>
46524652

4653-
When a color in an origin colorspace
4654-
is converted to another, destination colorspace
4653+
When a color in an origin color space
4654+
is converted to another, destination color space
46554655
which has a smaller gamut,
46564656
some colors will be outside the destination gamut.
46574657

46584658
For intermediate color calculations,
46594659
these out of gamut values are preserved.
46604660
However, if the destination is the display device
46614661
(a screen, or a printer)
4662-
then out of gamut values ust be converted to
4662+
then out of gamut values must be converted to
46634663
an in-gamut color.
46644664

46654665
Gamut mapping is the process of finding an in-gamut color
@@ -4668,21 +4668,21 @@ Gamut Mapping
46684668
The simplest and least acceptable method
46694669
is simply to clip the component values
46704670
to the displayable range.
4671-
This changes the proportions of (for an RGB display)
4672-
the three primary colors,
4671+
This changes the proportions of
4672+
the three primary colors (for an RGB display),
46734673
resulting in a hue shift.
46744674

4675-
A better method is to mapped colors
4676-
in a perceptually uniform colorspace,
4675+
A better method is to map colors
4676+
in a perceptually uniform color space,
46774677
by finding the closest in-gamut color
46784678
(so-called minimum ΔE or <dfn export>MINDE</dfn>).
46794679
Clearly, the sucess of this technique
46804680
depends on
4681-
the degree of uniformity of the gamut mapping colorspace
4681+
the degree of uniformity of the gamut mapping color space
46824682
and the predictive accuracy of the deltaE function used.
46834683

46844684
However, when doing gamut mapping
4685-
(and we are really talking about gamut reduction, here),
4685+
<!-- (and we are really talking about gamut reduction, here), -->
46864686
changes in Hue are <em>particularly</em> objectionable;
46874687
changes in Chroma are more tolerable,
46884688
and
@@ -4692,32 +4692,36 @@ Gamut Mapping
46924692
and thus gives suboptimal results.
46934693

46944694
To improve on MINDE algorithms,
4695-
colors are mapped in a perceptually uniform, <em>polar</em> colorspace
4695+
colors are mapped in a perceptually uniform, <em>polar</em> color space
46964696
by holding the hue constant,
46974697
and reducing the chroma until the color falls in gamut.
46984698

46994699
<div class="example" id="ex-gamutmap-p3-yellow-to-srgb">
47004700
In this example, Display P3 primary yellow
4701+
(<code>color(display-p3 1 1 0)</code>)
47014702
is being mapped to an sRGB display.
4702-
The gamut mapping colorspace is OKLCH.
4703+
The gamut mapping color space is OKLCH.
47034704

4704-
<pre class="lang-css">
4705-
color(display-p3 1 1 0) is
4706-
color(srgb 1 1 -0.3463) which is
4707-
color(oklch 0.96476 <b>0.24503</b> 110.23).
4708-
</pre>
4705+
<pre class="lang-css">color(display-p3 1 1 0)</pre>
4706+
is
4707+
<pre class="lang-css">color(srgb 1 1 -0.3463)</pre>
4708+
which is
4709+
<pre class="lang-css">color(oklch 0.96476 <b>0.24503</b> 110.23)</pre>
47094710

47104711
By progressively reducing the chroma component
47114712
until the resulting color falls inside the sRGB gamut
47124713
(has no components negative, or greater than one)
47134714
a gamut mapped color is obtained.
47144715

47154716
<pre class="lang-css">
4716-
<span class="swatch" style="--color: rgb(99.116% 99.733% 0.001%)"></span> color(oklch 0.96476 <b>0.21094</b> 110.23) which is
4717+
<span class="swatch" style="--color: rgb(99.116% 99.733% 0.001%)"></span> color(oklch 0.96476 <b>0.21094</b> 110.23)</pre>
4718+
which is
4719+
<pre class="lang-css">
47174720
<span class="swatch" style="--color: rgb(99.116% 99.733% 0.001%)"></span> color(srgb 0.99116 0.99733 0.00001)
47184721
</pre>
47194722
<figure id="gamutmap-p3-yellow">
4720-
<figcaption>A constant-hue slice of OKLCH colorspace.
4723+
<img src="./images/slice-ok-110.23.svg" alt="">
4724+
<figcaption>A constant-hue slice of OKLCH color space.
47214725
The vertical axis represents lightness,
47224726
the horizontal axis is chroma.
47234727
The color to be mapped,
@@ -4729,7 +4733,6 @@ Gamut Mapping
47294733
The gamut boundary of sRGB
47304734
is shown in green.
47314735
</figcaption>
4732-
<img src="./images/slice-ok-110.23.svg" alt="">
47334736
</figure>
47344737
</div>
47354738

@@ -4746,15 +4749,15 @@ Gamut Mapping
47464749
The line of constant lightness can skim just above the gamut boundary,
47474750
resulting in an excessively low chroma in those cases.
47484751

4749-
The choice of colorspace will affect the acceptability of the gamut mapped colors.
4752+
The choice of color space will affect the acceptability of the gamut mapped colors.
47504753

4751-
Note: Using the CIE LCH colorspace
4754+
Note: Using the CIE LCH color space
47524755
and deltaE2000 distance metric,
47534756
is known to give suboptimal results
47544757
with <a href="#CIELCH-blue-hueshift">significant hue shifts</a>,
47554758
for colors in the hue range
47564759
270° to 330°.
4757-
Using OKLCH colorspace
4760+
Using OKLCH color space
47584761
and deltaEOK distance metric
47594762
<a href="OKLCH-blue-no-hueshift">avoids this issue</a>.
47604763

@@ -4787,11 +4790,11 @@ Gamut Mapping
47874790
and detail and texture must be preserved,
47884791
a perceptual rendering intent is more appropriate
47894792
and in that case,
4790-
colors inside the destinatin gamut
4793+
colors inside the destination gamut
47914794
may well be changed.
47924795

4793-
CSS gamut mapping occurs in the OKLCH colorspace,
4794-
and the color difference formula used is deltaEOK.
4796+
CSS gamut mapping occurs in the <a href="#ok-lab">OKLCH color space</a>,
4797+
and the color difference formula used is <a href="#color-difference-OK">deltaEOK</a>.
47954798

47964799
The skimming/concavity problem is substantialy improved
47974800
by a two-stage in-gamut check.
@@ -4815,7 +4818,7 @@ Gamut Mapping
48154818
and a clipped version of that point
48164819
exceeds one JND.
48174820

4818-
For the OKLCH colorspace,
4821+
For the OKLCH color space,
48194822
one JND is is an OKLCH difference of 0.02.
48204823

48214824

@@ -5214,7 +5217,7 @@ Changes</h2>
52145217

52155218
<ul>
52165219
<li>Computed value of color(xyz ...) is color(xyz-d65 ...)</li>
5217-
<li>Added srgb-linear to interpolation colorspaces</li>
5220+
<li>Added srgb-linear to interpolation color spaces</li>
52185221
<li>Updated Changes from Colors 3 section</li>
52195222
<li>Added Resolving OKLab and OKLCH values section</li>
52205223
<!-- to 19 Nov 2021 -->
@@ -5260,7 +5263,7 @@ Changes</h2>
52605263
<li>Clarified which steps are linear combinations in RGB Lab interconversion</li>
52615264
<!-- to 20 May 2021 -->
52625265
<li>Added components descriptor to @color-profile, for use in CSS Color 5</li>
5263-
<li>All predefined RGB colorspaces are defined over the extended range</li>
5266+
<li>All predefined RGB color spaces are defined over the extended range</li>
52645267
<li>Clarified that there is no gamut mapping or gamut clipping step prior to color interpolation</li>
52655268
<li>Clarified interpolation of legacy sRGB syntaxes</li>
52665269
<li>Removed the lab option from ''color()''</li>

0 commit comments

Comments
 (0)