diff --git a/lisp/color.el b/lisp/color.el index f68cf5e6b17..a251b1a24a0 100644 --- a/lisp/color.el +++ b/lisp/color.el @@ -407,7 +407,7 @@ color-lighten-hsl Given a color defined in terms of hue, saturation, and luminance \(arguments H, S, and L), return a color that is PERCENT lighter. Returns a list (HUE SATURATION LUMINANCE)." - (list H S (color-clamp (+ L (* L (/ percent 100.0)))))) + (list H S (color-clamp (+ L (* (if (> L 0) L 1) (/ percent 100.0)))))) (defun color-lighten-name (name percent) "Make a color with a specified NAME lighter by PERCENT.