Skip to content

Commit 133fcc7

Browse files
svgeesusclaude
andcommitted
[css-color-4][editorial] Add Oklab a,b plane diagrams for predefined RGB color spaces
Replace the CIE Lab primaries/secondaries diagrams with new ones plotted on the Oklab a,b plane (computed via colorjs.io), for sRGB, display-p3, a98-rgb, prophoto-rgb, and rec2020. Each diagram keeps the sRGB gamut as a dashed comparison overlay (except the sRGB diagram itself) and adds an 8-column L/C/H legend table below the plot. The old CIE Lab figures are left in place as HTML comments for reference. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent dc3101a commit 133fcc7

6 files changed

Lines changed: 584 additions & 55 deletions

File tree

css-color-4/Overview.bs

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4037,11 +4037,19 @@ The Predefined sRGB Color Space: the ''sRGB'' keyword</h3>
40374037
c is the gamma-encoded red, green or blue component.
40384038
cl is the corresponding linear-light component.
40394039

4040+
<!--
40404041
<figure id="fig-srgb-lch">
40414042
<img src="images/sRGB-prim-sec.svg" width=540 height=520
40424043
alt="diagram of sRGB primaries and secondaries in LCH">
40434044
<figcaption>Visualization of the sRGB color space in LCH. The primaries and secondaries are shown.</figcaption>
40444045
</figure>
4046+
-->
4047+
4048+
<figure id="fig-srgb-oklch">
4049+
<img src="images/sRGB-prim-sec-oklch.svg" width=700 height=567
4050+
alt="diagram of sRGB primaries and secondaries in Oklch">
4051+
<figcaption>Visualization of the sRGB color space in Oklch. The primaries and secondaries are shown.</figcaption>
4052+
</figure>
40454053

40464054
</dl>
40474055

@@ -4169,6 +4177,7 @@ The Predefined Display P3 Color Space: the ''display-p3'' keyword</h3>
41694177
</tr>
41704178
</table>
41714179

4180+
<!--
41724181
<figure id="fig-displayp3-lch">
41734182
<img src="images/P3-prim-sec.svg" width=580 height=560
41744183
alt="diagram of P3 primaries and secondaries in LCH">
@@ -4180,6 +4189,19 @@ The Predefined Display P3 Color Space: the ''display-p3'' keyword</h3>
41804189
P3 primaries have higher Chroma.
41814190
</figcaption>
41824191
</figure>
4192+
-->
4193+
4194+
<figure id="fig-displayp3-oklch">
4195+
<img src="images/P3-prim-sec-oklch.svg" width=700 height=557
4196+
alt="diagram of P3 primaries and secondaries in Oklch">
4197+
<figcaption>Visualization of the P3 color space in Oklch.
4198+
The primaries and secondaries are shown
4199+
(but in sRGB, not in the correct colors).
4200+
For comparison, the sRGB primaries and secondaries
4201+
are also shown, as dashed circles.
4202+
P3 primaries have higher Chroma.
4203+
</figcaption>
4204+
</figure>
41834205

41844206
</dl>
41854207

@@ -4314,6 +4336,7 @@ The Predefined A98 RGB Color Space: the ''a98-rgb'' keyword</h3>
43144336
</tr>
43154337
</table>
43164338

4339+
<!--
43174340
<figure id="fig-a89-lch">
43184341
<img src="images/a98-prim-sec.svg" width=640 height=560
43194342
alt="diagram of a98 primaries and secondaries in LCH">
@@ -4326,6 +4349,20 @@ The Predefined A98 RGB Color Space: the ''a98-rgb'' keyword</h3>
43264349
especially the yellow, green and cyan.
43274350
</figcaption>
43284351
</figure>
4352+
-->
4353+
4354+
<figure id="fig-a89-oklch">
4355+
<img src="images/a98-prim-sec-oklch.svg" width=700 height=563
4356+
alt="diagram of a98 primaries and secondaries in Oklch">
4357+
<figcaption>Visualization of the A98 color space in Oklch.
4358+
The primaries and secondaries are shown
4359+
(but in sRGB, not in the correct colors).
4360+
For comparison, the sRGB primaries and secondaries
4361+
are also shown, as dashed circles.
4362+
a98 primaries have higher Chroma,
4363+
especially the yellow, green and cyan.
4364+
</figcaption>
4365+
</figure>
43294366

43304367
</dl>
43314368
<wpt>
@@ -4415,6 +4452,7 @@ The Predefined ProPhoto RGB Color Space: the ''prophoto-rgb'' keyword</h3>
44154452
c is the gamma-encoded red, green or blue component.
44164453
cl is the corresponding linear-light component.
44174454

4455+
<!--
44184456
<figure id="fig-prophoto-lch">
44194457
<img src="images/prophoto-prim-sec.svg" width=780 height=760
44204458
alt="diagram of prophoto primaries and secondaries in LCH">
@@ -4427,6 +4465,20 @@ The Predefined ProPhoto RGB Color Space: the ''prophoto-rgb'' keyword</h3>
44274465
does not correspond to physically realizable colors.
44284466
</figcaption>
44294467
</figure>
4468+
-->
4469+
4470+
<figure id="fig-prophoto-oklch">
4471+
<img src="images/prophoto-prim-sec-oklch.svg" width=700 height=382
4472+
alt="diagram of prophoto primaries and secondaries in Oklch">
4473+
<figcaption>Visualization of the prophoto-rgb color space in Oklch. The primaries and secondaries are shown
4474+
(but in sRGB, not in the correct colors).
4475+
For comparison, the sRGB primaries and secondaries
4476+
are also shown, as dashed circles.
4477+
prophoto-rgb primaries and secondaries have much higher Chroma,
4478+
but much of this ultrawide gamut
4479+
does not correspond to physically realizable colors.
4480+
</figcaption>
4481+
</figure>
44304482

44314483

44324484
</dl>
@@ -4488,6 +4540,7 @@ The Predefined ITU-R BT.2020-2 Color Space: the ''rec2020'' keyword</h3>
44884540
</tr>
44894541
</table>
44904542

4543+
<!--
44914544
<figure id="fig-rec2020-lch">
44924545
<img src="images/2020-prim-sec.svg" width=670 height=580
44934546
alt="diagram of rec2020 primaries and secondaries in LCH">
@@ -4498,6 +4551,18 @@ The Predefined ITU-R BT.2020-2 Color Space: the ''rec2020'' keyword</h3>
44984551
rec2020 primaries have much higher Chroma.
44994552
</figcaption>
45004553
</figure>
4554+
-->
4555+
4556+
<figure id="fig-rec2020-oklch">
4557+
<img src="images/2020-prim-sec-oklch.svg" width=700 height=594
4558+
alt="diagram of rec2020 primaries and secondaries in Oklch">
4559+
<figcaption>Visualization of the rec2020 color space in Oklch. The primaries and secondaries are shown
4560+
(but in sRGB, not in the correct colors).
4561+
For comparison, the sRGB primaries and secondaries
4562+
are also shown, as dashed circles.
4563+
rec2020 primaries have much higher Chroma.
4564+
</figcaption>
4565+
</figure>
45014566

45024567
</dl>
45034568
<wpt>
@@ -8283,7 +8348,10 @@ Changes</h2>
82838348
<a href="https://www.w3.org/TR/2025/CRD-css-color-4-20250424/">Candidate Recommendation Draft of 24 April 2025</a></h3>
82848349

82858350
<ul>
8286-
<li>Avoid referencing "prepare for conversion", just state directly
8351+
<li>Added Oklab a,b plane diagrams for the sRGB, display-p3, a98-rgb, prophoto-rgb,
8352+
and rec2020 predefined color spaces, alongside the existing CIE Lab diagrams
8353+
</li>
8354+
<li>Avoid referencing "prepare for conversion", just state directly
82878355
(<a href="https://github.com/w3c/csswg-drafts/issues/14049">Issue 14049</a>)
82888356
</li>
82898357
<li>Clarified that the computed value of a deprecated system color
Lines changed: 110 additions & 0 deletions
Loading
Lines changed: 110 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)