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
252252
253253
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
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
262262
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 white point
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
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
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
36463646

Predefined sRGB space

36473647

36483648

3649-
The sRGB predefined colorspace
3649+
The sRGB 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
37153715

Predefined sRGB-linear space

37163716

37173717

3718-
The sRGB-linear predefined colorspace
3718+
The sRGB-linear predefined color space
37193719
is the same as ''srgb''
37203720
except 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
41624162
Converting between predefined RGB color spaces
41634163
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 src to dest:
@@ -4650,16 +4650,16 @@ Gamut Mapping
46504650

46514651

This section is non-normative

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 MINDE).
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+
46864686
changes in Hue are particularly 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, polar colorspace
4695+
colors are mapped in a perceptually uniform, polar color space
46964696
by holding the hue constant,
46974697
and reducing the chroma until the color falls in gamut.
46984698

46994699
47004700
In this example, Display P3 primary yellow
4701+
(color(display-p3 1 1 0))
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-
4705-
color(display-p3 1 1 0) is
4706-
color(srgb 1 1 -0.3463) which is
4707-
color(oklch 0.96476 0.24503 110.23).
4708-
4705+
color(display-p3 1 1 0)
4706+
is
4707+
color(srgb 1 1 -0.3463)
4708+
which is
4709+
<pre class="lang-css">color(oklch 0.96476 0.24503 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
4716-
color(oklch 0.96476 0.21094 110.23) which is
4717+
color(oklch 0.96476 0.21094 110.23)
4718+
which is
4719+
47174720
color(srgb 0.99116 0.99733 0.00001)
47184721
47194722
4720-
A constant-hue slice of OKLCH colorspace.
4723+
4724+
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
4732-
47334736
47344737
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
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
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 OKLCH color space,
4797+
and the color difference formula used is deltaEOK.
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
52145217

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

    Comments
     (0)