@@ -798,7 +798,7 @@ Representing Colors: the <<color>> type</h2>
798
798
* ''oklch()'' ,
799
799
which specifies an Oklab color
800
800
by Oklab Lightness, Chroma, and hue
801
- using the [[#ok-lab|OKLCH ]] cylindrical coordinate model.
801
+ using the [[#ok-lab|Oklch ]] cylindrical coordinate model.
802
802
<!--
803
803
* ''device-cmyk()'' ,
804
804
which specifies a device-specific CMYK color
@@ -2761,7 +2761,7 @@ Examples of HWB Colors</h3>
2761
2761
-->
2762
2762
2763
2763
<h2 id='lab-colors'>
2764
- Device-independent Colors: CIE Lab and LCH, Oklab and OKLCH </h2>
2764
+ Device-independent Colors: CIE Lab and LCH, Oklab and Oklch </h2>
2765
2765
2766
2766
<h3 id="cie-lab">CIE Lab and LCH</h3>
2767
2767
@@ -2910,11 +2910,11 @@ Device-independent Colors: CIE Lab and LCH, Oklab and OKLCH</h2>
2910
2910
2911
2911
This does not help with hue curvature, however.
2912
2912
2913
- <h3 id="ok-lab">Oklab and OKLCH </h3>
2913
+ <h3 id="ok-lab">Oklab and Oklch </h3>
2914
2914
2915
2915
Recently, <dfn value export for="oklab()">Oklab</dfn> ,
2916
2916
an improved Lab-like space has been developed [[!Oklab]] .
2917
- The corresponding polar form is called <dfn value export for="oklch()">OKLCH </dfn> .
2917
+ The corresponding polar form is called <dfn value export for="oklch()">Oklch </dfn> .
2918
2918
It was produced by numerical optimisation
2919
2919
of a large dataset of visually similar colors,
2920
2920
and has improved hue linearity,
@@ -2941,12 +2941,12 @@ Device-independent Colors: CIE Lab and LCH, Oklab and OKLCH</h2>
2941
2941
The illuminant is [=D65=] , the same white point
2942
2942
as most RGB color spaces.
2943
2943
2944
- OKLCH has the same L axis as Oklab,
2944
+ Oklch has the same L axis as Oklab,
2945
2945
but uses polar coordinates C (chroma) and H (hue).
2946
2946
2947
2947
Note: Unlike CIE LCH, where Chroma can reach values of 200 or more,
2948
- OKLCH Chroma ranges to 0.5 or so.
2949
- The hue angles between CIE LCH and OKLCH are broadly similar,
2948
+ Oklch Chroma ranges to 0.5 or so.
2949
+ The hue angles between CIE LCH and Oklch are broadly similar,
2950
2950
but not identical.
2951
2951
2952
2952
<figure id="CIELCH-blue-hueshift">
@@ -2958,10 +2958,10 @@ Device-independent Colors: CIE Lab and LCH, Oklab and OKLCH</h2>
2958
2958
</figcaption>
2959
2959
</figure>
2960
2960
2961
- <figure id="OKLCH -blue-no-hueshift">
2961
+ <figure id="Oklch -blue-no-hueshift">
2962
2962
<img src="images/OKLCH-blue-slice.png" width="2485" height="1824"
2963
- alt="diagram showing hue constancy in OKLCH ">
2964
- <figcaption> A constant OKLCH hue slice,
2963
+ alt="diagram showing hue constancy in Oklch ">
2964
+ <figcaption> A constant Oklch hue slice,
2965
2965
showing the sRGB gamut around primary blue.
2966
2966
The visual hue remains constant.
2967
2967
</figcaption>
@@ -3156,10 +3156,10 @@ Specifying Lab and LCH: the ''lab()'' and ''lch()'' functional notations</h3>
3156
3156
Using commas inside these functions is an error.
3157
3157
3158
3158
<h3 id="specifying-oklab-oklch">
3159
- Specifying Oklab and OKLCH : the ''oklab()'' and ''oklch()'' functional notations</h3>
3159
+ Specifying Oklab and Oklch : the ''oklab()'' and ''oklch()'' functional notations</h3>
3160
3160
3161
3161
3162
- CSS allows colors to be directly expressed in Oklab and OKLCH .
3162
+ CSS allows colors to be directly expressed in Oklab and Oklch .
3163
3163
3164
3164
<pre class='prod'>
3165
3165
<dfn>oklab()</dfn> = oklab( [ <<percentage>> | <<number>> | none]
@@ -3268,7 +3268,7 @@ Specifying Lab and LCH: the ''lab()'' and ''lch()'' functional notations</h3>
3268
3268
parsing/color-valid.html
3269
3269
</wpt>
3270
3270
3271
- The first argument specifies the OKLCH Lightness,
3271
+ The first argument specifies the Oklch Lightness,
3272
3272
interpreted identically to the Lightness argument of ''oklab()'' .
3273
3273
3274
3274
The second argument is the chroma.
@@ -3292,9 +3292,9 @@ Specifying Lab and LCH: the ''lab()'' and ''lch()'' functional notations</h3>
3292
3292
separated by a slash,
3293
3293
representing the [=alpha component=] .
3294
3294
3295
- If the chroma of an OKLCH color is ''0%'' ,
3295
+ If the chroma of an Oklch color is ''0%'' ,
3296
3296
the hue component is [=powerless=] .
3297
- If the lightness of an OKLCH color is ''0%'' ,
3297
+ If the lightness of an Oklch color is ''0%'' ,
3298
3298
both the hue and chroma components are [=powerless=] .
3299
3299
3300
3300
@@ -3317,7 +3317,7 @@ Specifying Lab and LCH: the ''lab()'' and ''lch()'' functional notations</h3>
3317
3317
3318
3318
3319
3319
<h3 id='lab-to-lch'>
3320
- Converting Lab or Oklab colors to LCH or OKLCH colors</h3>
3320
+ Converting Lab or Oklab colors to LCH or Oklch colors</h3>
3321
3321
3322
3322
Conversion to the polar form is trivial:
3323
3323
@@ -3332,11 +3332,11 @@ although the visual color does not change from being on the neutral axis,
3332
3332
small changes to the values can result in the reported hue angle swinging about wildly
3333
3333
and being essentially random.
3334
3334
In CSS, this means the hue is [=powerless=] ,
3335
- and treated as [=missing=] when converted into LCH or OKLCH ;
3335
+ and treated as [=missing=] when converted into LCH or Oklch ;
3336
3336
in non-CSS contexts this might be reflected as a missing value, such as NaN.
3337
3337
3338
3338
<h3 id='lch-to-lab'>
3339
- Converting LCH or OKLCH colors to Lab or Oklab colors</h3>
3339
+ Converting LCH or Oklch colors to Lab or Oklab colors</h3>
3340
3340
3341
3341
Conversion to the rectangular form is trivial:
3342
3342
@@ -4321,7 +4321,7 @@ Color Space for Interpolation</h3>
4321
4321
* If colors need to be evenly spaced perceptually (such as in a gradient),
4322
4322
the Oklab color space (and the older Lab), are designed to be perceptually uniform.
4323
4323
* If avoiding graying out in color mixing is desired, i.e. maximizing chroma throughout the transition,
4324
- OKLCH (and the older LCH) work well for that.
4324
+ Oklch (and the older LCH) work well for that.
4325
4325
* Lastly, compatibility with legacy Web content may be the most important consideration.
4326
4326
The sRGB color space, which is neither linear-light nor perceptually uniform, is the choice here,
4327
4327
even though it produces poorer results (overly dark or greyish mixes).
@@ -4449,13 +4449,13 @@ Interpolating with Missing Components</h3>
4449
4449
4450
4450
<div class="example" id="ex-analogous-hue">
4451
4451
For example, if these two colors
4452
- are to be interpolated in OKLCH ,
4452
+ are to be interpolated in Oklch ,
4453
4453
the missing hue in the CIE LCH color
4454
- is analogous to the hue component of OKLCH
4454
+ is analogous to the hue component of Oklch
4455
4455
and will be carried forward
4456
4456
while the missing blue component
4457
4457
in the second color
4458
- is not analogous to any OKLCH component
4458
+ is not analogous to any Oklch component
4459
4459
and will not be carried forward:
4460
4460
4461
4461
<pre>
@@ -4799,13 +4799,13 @@ Clipping</h4>
4799
4799
the amount of blue light is three times the amount of green,
4800
4800
while the amount of red light is half that of green.
4801
4801
There is six times as much blue primary as red.
4802
- In OKLCH , this color has a hue angle of 265.1°
4802
+ In Oklch , this color has a hue angle of 265.1°
4803
4803
4804
4804
If we now clip this color
4805
4805
to bring it into gamut for sRGB,
4806
4806
we get <code> color(srgb-linear 0.5 1 1)</code> .
4807
4807
The amount of blue light is the same as green.
4808
- In OKLCH , this color has a hue angle of 196.1°,
4808
+ In Oklch , this color has a hue angle of 196.1°,
4809
4809
a substantial change of 69°.
4810
4810
</div>
4811
4811
@@ -4843,7 +4843,7 @@ Chroma Reduction</h4>
4843
4843
In this example, Display P3 primary yellow
4844
4844
(<code> color(display-p3 1 1 0)</code> )
4845
4845
is being mapped to an sRGB display.
4846
- The gamut mapping color space is OKLCH .
4846
+ The gamut mapping color space is Oklch .
4847
4847
4848
4848
<pre class="lang-css"> color(display-p3 1 1 0)</pre>
4849
4849
is
@@ -4864,7 +4864,7 @@ Chroma Reduction</h4>
4864
4864
</pre>
4865
4865
<figure id="gamutmap-p3-yellow">
4866
4866
<img src="./images/slice-ok-110.23.svg" alt="" width="776" height="565" >
4867
- <figcaption> A constant-hue slice of OKLCH color space.
4867
+ <figcaption> A constant-hue slice of Oklch color space.
4868
4868
The vertical axis represents lightness,
4869
4869
the horizontal axis is chroma.
4870
4870
The color to be mapped,
@@ -4917,9 +4917,9 @@ Excessive Chroma Reduction</h4>
4917
4917
Simple gamut mapping in CIE LCH would give unsatisfactory results.
4918
4918
</div>
4919
4919
4920
- <div class="example" id="OKLCH -p3-yellow-noclip">
4920
+ <div class="example" id="Oklch -p3-yellow-noclip">
4921
4921
In this example, Display P3 primary yellow (<code> color(display-p3 1 1 0</code> )
4922
- has the chroma progressively reduced, but this time in OKLCH color space.
4922
+ has the chroma progressively reduced, but this time in Oklch color space.
4923
4923
<figure>
4924
4924
<img src="./images/p3-yellow-oklab.svg" alt="" width="700">
4925
4925
<figcaption>
@@ -4931,7 +4931,7 @@ Excessive Chroma Reduction</h4>
4931
4931
the Display P3 red, green and blue components.
4932
4932
</figcaption>
4933
4933
</figure>
4934
- It can be seen that reduction in OKLCH chroma is better behaved.
4934
+ It can be seen that reduction in Oklch chroma is better behaved.
4935
4935
Colors do not go outside the Display P3 gamut, and the resulting
4936
4936
gamut-mapped yellow has good chroma.
4937
4937
Simple gamut mapping in OK LCH would give acceptable results.
@@ -4974,9 +4974,9 @@ Chroma Reduction with Local Clipping</h4>
4974
4974
Gamut mapping in CIE LCH with local clip would give acceptable results.
4975
4975
</div>
4976
4976
4977
- <div class="example" id="OKLCH -p3-yellow-clip">
4977
+ <div class="example" id="Oklch -p3-yellow-clip">
4978
4978
In this example, Display P3 primary yellow (<code> color(display-p3 1 1 0</code> )
4979
- has the chroma progressively reduced, but this time in OKLCH color space
4979
+ has the chroma progressively reduced, but this time in Oklch color space
4980
4980
and with the local clip modification.
4981
4981
<figure>
4982
4982
<img src="./images/p3-yellow-oklab-clip.svg" alt="" width="700">
@@ -4989,7 +4989,7 @@ Chroma Reduction with Local Clipping</h4>
4989
4989
the Display P3 red, green and blue components.
4990
4990
</figcaption>
4991
4991
</figure>
4992
- It can be seen that reduction in OKLCH chroma,
4992
+ It can be seen that reduction in Oklch chroma,
4993
4993
which was already good,
4994
4994
is further improved by the local clip modification.
4995
4995
Simple gamut mapping in CIE LCH with local clip would give excellent results.
@@ -5019,15 +5019,15 @@ Deviations from Perceptual Uniformity: Hue Curvature</h4>
5019
5019
</figcaption>
5020
5020
</figure>
5021
5021
5022
- Using OKLCH color space
5022
+ Using Oklch color space
5023
5023
and deltaEOK distance metric
5024
5024
avoids this issue
5025
5025
at all hue angles.
5026
5026
5027
5027
<figure>
5028
5028
<img src="./images/OKLCH-blue-slice.png" alt="">
5029
5029
<figcaption>
5030
- A constant-hue slice of OKLCH color space,
5030
+ A constant-hue slice of Oklch color space,
5031
5031
at a hue angle of 264.06°
5032
5032
corresponding to sRGB primary blue.
5033
5033
The vertical axis is Lightness, the horizontal axis is Chroma.
@@ -5072,7 +5072,7 @@ CSS Gamut Mapping to an RGB Destination</h3>
5072
5072
colors inside the destination gamut
5073
5073
could be changed.
5074
5074
5075
- CSS gamut mapping occurs in the <a href="#ok-lab">OKLCH color space</a> ,
5075
+ CSS gamut mapping occurs in the <a href="#ok-lab">Oklch color space</a> ,
5076
5076
and the color difference formula used is <a href="#color-difference-OK">deltaEOK</a> .
5077
5077
The local-MINDE improvement is used.
5078
5078
@@ -5100,8 +5100,8 @@ CSS Gamut Mapping to an RGB Destination</h3>
5100
5100
exceeds one JND.
5101
5101
Then returned the clipped version of the color as the mapped result.
5102
5102
5103
- For the OKLCH color space,
5104
- one JND is is an OKLCH difference of 0.02.
5103
+ For the Oklch color space,
5104
+ one JND is is an Oklch difference of 0.02.
5105
5105
5106
5106
<h4 id="binsearch">
5107
5107
Sample Pseudocode for the Binary Search Gamut Mapping Algorithm with Local MINDE</h4>
@@ -5112,18 +5112,18 @@ Sample Pseudocode for the Binary Search Gamut Mapping Algorithm with Local MINDE
5112
5112
to be in gamut of a destination color space |destination|:
5113
5113
5114
5114
<ol>
5115
- <li> if |destination| has no gamut limits (XYZ-D65, XYZ-D50, Lab, LCH, Oklab, OKLCH ) return |origin|
5116
- <li> let |origin_OKLCH | be |origin| converted
5117
- from |origin color space| to the OKLCH color space</li>
5118
- <li> if the Lightness of |origin_OKLCH | is greater than or equal to 100%,
5115
+ <li> if |destination| has no gamut limits (XYZ-D65, XYZ-D50, Lab, LCH, Oklab, Oklch ) return |origin|
5116
+ <li> let |origin_Oklch | be |origin| converted
5117
+ from |origin color space| to the Oklch color space</li>
5118
+ <li> if the Lightness of |origin_Oklch | is greater than or equal to 100%,
5119
5119
return { 1 1 1 origin.alpha } in |destination|</li>
5120
- <li> if the Lightness of |origin_OKLCH | is less than than or equal to 0%,
5120
+ <li> if the Lightness of |origin_Oklch | is less than than or equal to 0%,
5121
5121
return { 0 0 0 origin.alpha } in |destination|</li>
5122
5122
<li> let inGamut(|color|) be a function which returns true if, when passed a color,
5123
5123
that color is inside the gamut of |destination|.
5124
5124
For HSL and HWB, it returns true if the color is inside the gamut of sRGB.
5125
5125
</li>
5126
- <li> if inGamut(|origin_OKLCH |) is true, convert |origin_OKLCH | to |destination| and return it as the gamut mapped color</li>
5126
+ <li> if inGamut(|origin_Oklch |) is true, convert |origin_Oklch | to |destination| and return it as the gamut mapped color</li>
5127
5127
<li> otherwise, let delta(|one|, |two|) be a function which returns the deltaEOK of color |one| compared to color |two|</li>
5128
5128
<li> let |JND| be 0.02</li>
5129
5129
<li> let |epsilon| be 0.0001</li>
@@ -5134,12 +5134,12 @@ Sample Pseudocode for the Binary Search Gamut Mapping Algorithm with Local MINDE
5134
5134
and returns the result
5135
5135
</li>
5136
5136
<li> set |min| to zero</li>
5137
- <li> set |max| to the OKLCH chroma of |origin_OKLCH |</li>
5137
+ <li> set |max| to the Oklch chroma of |origin_Oklch |</li>
5138
5138
<li> let |min_inGamut| be a boolean that represents when |min| is still in gamut, and set it to true
5139
5139
<li> while (|max| - |min| is greater than |epsilon|) repeat the following steps
5140
5140
<ol>
5141
5141
<li> set |chroma| to (|min| + |max|) /2</li>
5142
- <li> set |current| to |origin_OKLCH | and then set the chroma component to |chroma|</li>
5142
+ <li> set |current| to |origin_Oklch | and then set the chroma component to |chroma|</li>
5143
5143
<li> if |min_inGamut| is true and also if inGamut(|current|) is true, set |min| to |chroma| and continue to repeat these steps</li>
5144
5144
<li> otherwise, if inGamut(|current|) is false carry out these steps:
5145
5145
<ol>
@@ -5267,12 +5267,12 @@ Resolving Lab and LCH values</h3>
5267
5267
</div>
5268
5268
5269
5269
<h3 id="resolving-oklab-oklch-values">
5270
- Resolving Oklab and OKLCH values</h3>
5270
+ Resolving Oklab and Oklch values</h3>
5271
5271
5272
5272
This applies to ''oklab()'' and ''oklch()'' values.
5273
5273
5274
5274
The computed and used value
5275
- is the corresponding Oklab or OKLCH color
5275
+ is the corresponding Oklab or Oklch color
5276
5276
paired with the specified alpha channel
5277
5277
(as a <<number>> , not a <<percentage>> ;
5278
5278
and defaulting to opaque if unspecified).
@@ -5626,7 +5626,7 @@ Serializing Lab and LCH values</h3>
5626
5626
</div>
5627
5627
5628
5628
<h3 id="serializing-oklab-oklch">
5629
- Serializing Oklab and OKLCH values</h3>
5629
+ Serializing Oklab and Oklch values</h3>
5630
5630
5631
5631
The serialized form of ''oklch()'' and ''oklab()'' values
5632
5632
is derived from the [=computed value=]
@@ -6353,11 +6353,11 @@ Changes</h2>
6353
6353
</h3>
6354
6354
6355
6355
<ul>
6356
- <li> Added gamut mapping section and defined a CSS gamut mapping algorithm as chroma reduction in OKLCH with local MINDE.</li>
6356
+ <li> Added gamut mapping section and defined a CSS gamut mapping algorithm as chroma reduction in Oklch with local MINDE.</li>
6357
6357
<li> Computed value of color(xyz ...) is color(xyz-d65 ...)</li>
6358
6358
<li> Added srgb-linear to interpolation color spaces</li>
6359
6359
<li> Updated Changes from Colors 3 section</li>
6360
- <li> Added Resolving Oklab and OKLCH values section</li>
6360
+ <li> Added Resolving Oklab and Oklch values section</li>
6361
6361
<!-- to 19 Nov 2021 -->
6362
6362
<li> Added srgb-linear color space</li>
6363
6363
<li> Moved @color-profile and device-cmyk to level 5 per CSSWG resolution</li>
@@ -6370,9 +6370,9 @@ Changes</h2>
6370
6370
<li> Removed fallback colors from device-cmyk</li>
6371
6371
<li> Host syntax that does not declare a default now uses Oklab by default</li>
6372
6372
<li> Added sample code for deltaE OK</li>
6373
- <li> Added sample conversion code for OKlab and OKLCH </li>
6373
+ <li> Added sample conversion code for OKlab and Oklch </li>
6374
6374
<li> Added oklab() and oklch() functions</li>
6375
- <i> Added description of Oklab and OKLCH </i>
6375
+ <i> Added description of Oklab and Oklch </i>
6376
6376
<li> Added description of CIE LCH deficiencies</li>
6377
6377
<li> Allowed all components of a color to be "missing" via the ''none'' keyword,
6378
6378
defined when components are "powerless" and automatically become missing in some cases,
0 commit comments