aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulian Scheid2012-10-05 19:20:36 -0700
committerGlenn Morris2012-10-05 19:20:36 -0700
commit123ec157692a9e776056d66f447c5fee59b72b13 (patch)
tree28339e540b4357e6dcc93e20a92369fd15bdb156
parent24636b2633c00ac63cc023f8b6e76e416fa1728a (diff)
downloademacs-123ec157692a9e776056d66f447c5fee59b72b13.tar.gz
emacs-123ec157692a9e776056d66f447c5fee59b72b13.zip
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
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/color.el4
2 files changed, 7 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1010fc0ae11..861022aae88 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-10-06 Julian Scheid <julians37@gmail.com> (tiny change)
2
3 * color.el (color-hsl-to-rgb): Fix incorrect results for
4 small and large hue values. (Bug#12559)
5
12012-10-05 Fabián Ezequiel Gallina <fgallina@cuca> 62012-10-05 Fabián Ezequiel Gallina <fgallina@cuca>
2 7
3 Enhancements to docstring formatting when filling paragraphs. 8 Enhancements to docstring formatting when filling paragraphs.
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."
113 (- (+ L S) (* L S)))) 113 (- (+ L S) (* L S))))
114 (m1 (- (* 2.0 L) m2))) 114 (m1 (- (* 2.0 L) m2)))
115 (list 115 (list
116 (color-hue-to-rgb m1 m2 (+ H (/ 1.0 3))) 116 (color-hue-to-rgb m1 m2 (mod (+ H (/ 1.0 3)) 1))
117 (color-hue-to-rgb m1 m2 H) 117 (color-hue-to-rgb m1 m2 H)
118 (color-hue-to-rgb m1 m2 (- H (/ 1.0 3))))))) 118 (color-hue-to-rgb m1 m2 (mod (- H (/ 1.0 3)) 1))))))
119 119
120(defun color-complement-hex (color) 120(defun color-complement-hex (color)
121 "Return the color that is the complement of COLOR, in hexadecimal format." 121 "Return the color that is the complement of COLOR, in hexadecimal format."