emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110379: color-hsl-to-rgb fix (tiny c


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110379: color-hsl-to-rgb fix (tiny change)
Date: Fri, 05 Oct 2012 19:20:36 -0700
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110379
fixes bug: http://debbugs.gnu.org/12559
author: Julian Scheid <address@hidden>
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Fri 2012-10-05 19:20:36 -0700
message:
  color-hsl-to-rgb fix (tiny change)
  
  * lisp/color.el (color-hsl-to-rgb): Fix incorrect results for small
  and large hue values.
modified:
  lisp/ChangeLog
  lisp/color.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-10-05 13:42:08 +0000
+++ b/lisp/ChangeLog    2012-10-06 02:20:36 +0000
@@ -1,3 +1,8 @@
+2012-10-06  Julian Scheid  <address@hidden>  (tiny change)
+
+       * color.el (color-hsl-to-rgb): Fix incorrect results for
+       small and large hue values.  (Bug#12559)
+
 2012-10-05  Fabián Ezequiel Gallina  <address@hidden>
 
        Enhancements to docstring formatting when filling paragraphs.

=== modified file 'lisp/color.el'
--- a/lisp/color.el     2012-10-05 07:38:05 +0000
+++ b/lisp/color.el     2012-10-06 02:20:36 +0000
@@ -113,9 +113,9 @@
                 (- (+ 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."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]