Skip to content

Commit

Permalink
More appropriate epsilon
Browse files Browse the repository at this point in the history
  • Loading branch information
LeaVerou committed May 24, 2024
1 parent 5462422 commit a8a2b64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/spaces/lch.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default new ColorSpace({
base: Lab,
fromBase (Lab) {
// Convert to polar form
const ε = Number.EPSILON * 2;
const ε = Number.EPSILON * 3;
let [L, a, b] = Lab;
let isAchromatic = Math.abs(a) < ε && Math.abs(b) < ε;
let h = isAchromatic ? null : constrainAngle(Math.atan2(b, a) * 180 / Math.PI);
Expand Down

0 comments on commit a8a2b64

Please sign in to comment.