Skip to content

Commit 6a26fbf

Browse files
committed
[css-color-4] Correct sRGB (and display-p3) transfer function, #9467
1 parent 04f87ed commit 6a26fbf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

css-color-4/Overview.bs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3747,7 +3747,7 @@ The Predefined sRGB Color Space: the ''sRGB'' keyword</h3>
37473747
let sign = c < 0? -1 : 1;
37483748
let abs = Math.abs(c);
37493749

3750-
if (abs < 0.04045) {
3750+
if (abs <= 0.04045) {
37513751
cl = c / 12.92;
37523752
}
37533753
else {

css-color-4/conversions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function lin_sRGB(RGB) {
2020
let sign = val < 0? -1 : 1;
2121
let abs = Math.abs(val);
2222

23-
if (abs < 0.04045) {
23+
if (abs <= 0.04045) {
2424
return val / 12.92;
2525
}
2626

0 commit comments

Comments
 (0)