From 9a452fb11a6c3642c10b8443a09a383cc2411210 Mon Sep 17 00:00:00 2001 From: Dan Burzo Date: Mon, 26 Jul 2021 16:46:54 +0300 Subject: [PATCH] Re: #129 / clampChroma(): when C:0 is not displayable, return rgb-clamped achromatic --- src/clamp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clamp.js b/src/clamp.js index c01ea914..10a85b83 100644 --- a/src/clamp.js +++ b/src/clamp.js @@ -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.