summaryrefslogtreecommitdiff
path: root/lisp/color.el
diff options
context:
space:
mode:
authorJulian Scheid <julians37@gmail.com>2012-10-05 19:20:36 -0700
committerGlenn Morris <rgm@gnu.org>2012-10-05 19:20:36 -0700
commit123ec157692a9e776056d66f447c5fee59b72b13 (patch)
tree28339e540b4357e6dcc93e20a92369fd15bdb156 /lisp/color.el
parent24636b2633c00ac63cc023f8b6e76e416fa1728a (diff)
downloademacs-123ec157692a9e776056d66f447c5fee59b72b13.tar.gz
color-hsl-to-rgb fix (tiny change)
* lisp/color.el (color-hsl-to-rgb): Fix incorrect results for small and large hue values. Fixes: debbugs:12559
Diffstat (limited to 'lisp/color.el')
-rw-r--r--lisp/color.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/color.el b/lisp/color.el
index f618d47a540..b915beacb0a 100644
--- a/lisp/color.el
+++ b/lisp/color.el
@@ -113,9 +113,9 @@ inclusive."
(- (+ L S) (* L S))))
(m1 (- (* 2.0 L) m2)))
(list
- (color-hue-to-rgb m1 m2 (+ H (/ 1.0 3)))
+ (color-hue-to-rgb m1 m2 (mod (+ H (/ 1.0 3)) 1))
(color-hue-to-rgb m1 m2 H)
- (color-hue-to-rgb m1 m2 (- H (/ 1.0 3)))))))
+ (color-hue-to-rgb m1 m2 (mod (- H (/ 1.0 3)) 1))))))
(defun color-complement-hex (color)
"Return the color that is the complement of COLOR, in hexadecimal format."