Skip to content

Commit

Permalink
Update srgb transfer function as per w3c/csswg-drafts#9467
Browse files Browse the repository at this point in the history
  • Loading branch information
danburzo committed Nov 11, 2023
1 parent 8430160 commit bef6fb6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lrgb/convertRgbToLrgb.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const fn = c => {
const abs = Math.abs(c);
if (abs < 0.04045) {
if (abs <= 0.04045) {
return c / 12.92;
}
return (Math.sign(c) || 1) * Math.pow((abs + 0.055) / 1.055, 2.4);
Expand Down
2 changes: 1 addition & 1 deletion test/lerp.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import tape from 'tape';
import { lerp, unlerp, blerp, trilerp } from '../src/index.js';
import { lerp, unlerp, trilerp } from '../src/index.js';

tape('lerp()', t => {
t.equal(lerp(10, 2, 0.5), 6);
Expand Down

0 comments on commit bef6fb6

Please sign in to comment.