Skip to content

Commit 0dc8a83

Browse files
nex3svgeesus
authored andcommitted
[css-color] Use absolute value in lin_ProPhoto
This matches the behavior of the other color conversions and avoids returning `NaN` if `val < -Et2`, which I assume was not the intention.
1 parent fdcdb90 commit 0dc8a83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

css-color-4/conversions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function lin_ProPhoto(RGB) {
129129
return val / 16;
130130
}
131131

132-
return sign * Math.pow(val, 1.8);
132+
return sign * Math.pow(abs, 1.8);
133133
});
134134
}
135135

0 commit comments

Comments
 (0)