X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/d8ad4d3ff9dcea9c581d72e1e9ec292ea18673b1..c7510f6e94a232aae19e07b7203ac068ef00773c:/lisp/color.el diff --git a/lisp/color.el b/lisp/color.el index e1563ea474..bdafdcfff8 100644 --- a/lisp/color.el +++ b/lisp/color.el @@ -1,6 +1,6 @@ ;;; color.el --- Color manipulation library -*- coding: utf-8; lexical-binding:t -*- -;; Copyright (C) 2010-2012 Free Software Foundation, Inc. +;; Copyright (C) 2010-2014 Free Software Foundation, Inc. ;; Authors: Julien Danjou ;; Drew Adams @@ -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.