Skip to content

Commit

Permalink
Re: #129 / clampChroma(): when C:0 is not displayable, return rgb-cla…
Browse files Browse the repository at this point in the history
…mped achromatic
  • Loading branch information
danburzo committed Jul 26, 2021
1 parent 1df80c6 commit 9a452fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clamp.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const clampChroma = (color, mode = 'lch') => {
// if not even chroma = 0 is displayable
// fall back to RGB clamping
if (!displayable(clamped)) {
return conv(fixup_rgb(color));
return conv(fixup_rgb(clamped));
}

// By this time we know chroma = 0 is displayable and our current chroma is not.
Expand Down

0 comments on commit 9a452fb

Please sign in to comment.