Skip to content

Commit d920f07

Browse files
committed
[css-color-4] redo calc in example
1 parent 3bd924f commit d920f07

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

css-color-4/Overview.bs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4484,11 +4484,10 @@ Interpolating with alpha</h3>
44844484

44854485
The midpoint of linearly interpolating these,
44864486
along the shorter hue arc (the default) would be
4487-
[29.4365% 40.563 63.64]
4487+
[29.4365% 40.563 31.82]
44884488
which, with an alpha value of 0.5,
4489-
is lch(58.873% 81.126 127.28) / 0.5)
4490-
when premultiplication is undone. This is within the display-p3 gamut, at color(display-p3 0.3535 0.6271 0.1369 / 0.5) but outside sRGB; the closest in-gamut color is
4491-
<span class="swatch oog" style="--color: rgb(87.604%, 38.956%, 51.753%, 0.5)"></span> rgb(23.92% 63.55% 0% / 0.5)
4489+
is <span class="swatch" style="--color: rgb(83.918% 44.583% 0% / 0.5)"></span> lch(58.873% 81.126 63.64) / 0.5)
4490+
when premultiplication is undone.
44924491

44934492
</div>
44944493

css-color-4/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
box-shadow: 1px 1px 1px rgba(0,0,0,.15)
1111
}
1212

13+
.swatch.oog {
14+
border: 2px solid red;
15+
}
16+
1317
.swatch:hover {
1418
transform: scale(3);
1519
border-radius: 2px;

0 commit comments

Comments
 (0)