diff options
author | Julien Danjou <julien@danjou.info> | 2013-01-11 15:04:24 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2013-01-11 15:04:24 +0000 |
commit | 43b2e2e71ab2e9748cc879bb784d9337535a35d3 (patch) | |
tree | 3837ac7e3c91a8d07fe4d63da4daa86d63772115 /lisp/color.el | |
parent | 6020559a093bf243be6cd6a866933b4368ea67cc (diff) |
color.el: fix color-rgb-to-hsv computing
Diffstat (limited to 'lisp/color.el')
-rw-r--r-- | lisp/color.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/color.el b/lisp/color.el index 63326e7c5b3..50f6675bf4b 100644 --- a/lisp/color.el +++ b/lisp/color.el @@ -130,7 +130,7 @@ inclusive." (max (max r g b)) (min (min r g b))) (if (< (- max min) 1e-8) - (list 0.0 0.0 0.0) + (list 0.0 0.0 min) (list (/ (* 2 float-pi (cond ((and (= r g) (= g b)) 0) @@ -146,7 +146,7 @@ inclusive." (+ 240 (* 60 (/ (- r g) (- max min))))))) 360) (if (= max 0) 0 (- 1 (/ min max))) - (/ max 255.0))))) + max)))) (defun color-rgb-to-hsl (red green blue) "Convert RGB colors to their HSL representation. |