Skip to content

Commit c728bfa

Browse files
authored
update color-helpers (#1168)
1 parent 3f89182 commit c728bfa

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

packages/color-helpers/dist/index.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
*
4242
* @see https://en.wikipedia.org/wiki/SRGB
4343
*/
44-
function lin_sRGB(t){return t.map((function(t){const _=t<0?-1:1,o=Math.abs(t);return o<.04045?t/12.92:_*Math.pow((o+.055)/1.055,2.4)}))}
44+
function lin_sRGB(t){return t.map((function(t){const _=t<0?-1:1,o=Math.abs(t);return o<=.04045?t/12.92:_*Math.pow((o+.055)/1.055,2.4)}))}
4545
/**
4646
* Simple matrix (and vector) multiplication
4747
* Warning: No error handling for incompatible dimensions!

packages/color-helpers/dist/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ function clip(t){return t.map((t=>t<0?0:t>1?1:t))}
4141
*
4242
* @see https://en.wikipedia.org/wiki/SRGB
4343
*/
44-
function lin_sRGB(t){return t.map((function(t){const _=t<0?-1:1,o=Math.abs(t);return o<.04045?t/12.92:_*Math.pow((o+.055)/1.055,2.4)}))}
44+
function lin_sRGB(t){return t.map((function(t){const _=t<0?-1:1,o=Math.abs(t);return o<=.04045?t/12.92:_*Math.pow((o+.055)/1.055,2.4)}))}
4545
/**
4646
* Simple matrix (and vector) multiplication
4747
* Warning: No error handling for incompatible dimensions!
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[
22
"384d52db3fcd98381e18743e1eba590a",
3-
"6014c79b98dfe166e3e02232d8c3beaa",
3+
"f736dea5b83ebcd853449a02255f747e",
44
"094c9859b0960c4e394947cc4832b54f",
55
"c9e2f2a3b2cba543a01cb8aa5d77c04a",
6-
"f28e9d179704b95a9cd40fbf5b5f1164",
7-
"a0b388982712b1849c991ce0e323828e"
6+
"840ef26f992267c924230a26f939eaad",
7+
"f912dea8d7d9813556f3ece0730f5392"
88
]

packages/color-helpers/src/conversions/lin-srgb.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export function lin_sRGB(RGB: Color): Color {
1818
const sign = val < 0 ? -1 : 1;
1919
const abs = Math.abs(val);
2020

21-
if (abs < 0.04045) {
21+
if (abs <= 0.04045) {
2222
return val / 12.92;
2323
}
2424

0 commit comments

Comments
 (0)