* bug#12558: Incorrect docstrings for color-rgb-to-hsl and color-hsl-to-rgb
@ 2012-10-02 12:43 Julian Scheid
2012-10-05 7:18 ` Glenn Morris
0 siblings, 1 reply; 2+ messages in thread
From: Julian Scheid @ 2012-10-02 12:43 UTC (permalink / raw)
To: 12558
The docstrings for `color-rgb-to-hsl' and `color-hsl-to-rgb' both state
that the HUE component is given in radians, but in fact it's in range
0..1 in both cases.
It's easy to see that the value returned by `color-rgb-to-hsl' for hue
is the result of (mod N 1.0), and `color-hsl-to-rgb' uses the same
representation:
(apply 'color-hsl-to-rgb
(color-rgb-to-hsl 0.7 0.8 0.9))
;; -> (0.7000000000000001 0.7999999999999999 0.9)
2012-10-02 Julian Scheid <julians37@gmail.com>
* color.el (color-rgb-to-hsl, color-hsl-to-rgb): Fix docstring.
=== modified file 'lisp/color.el'
*** lisp/color.el 2012-08-13 19:10:35 +0000
--- lisp/color.el 2012-10-02 11:49:04 +0000
*************** resulting list."
*** 102,110 ****
(t v1)))
(defun color-hsl-to-rgb (H S L)
! "Convert H S L (HUE, SATURATION, LUMINANCE) , where HUE is in
! radians and both SATURATION and LUMINANCE are between 0.0 and
! 1.0, inclusive to their RGB representation.
Return a list (RED, GREEN, BLUE) which each be numbers between
0.0 and 1.0, inclusive."
--- 102,110 ----
(t v1)))
(defun color-hsl-to-rgb (H S L)
! "Convert H S L (HUE, SATURATION, LUMINANCE), where H S L should
! each be numbers between 0.0 and 1.0 inclusive, to their RGB
! representation.
Return a list (RED, GREEN, BLUE) which each be numbers between
0.0 and 1.0, inclusive."
*************** inclusive."
*** 159,167 ****
RED, GREEN, and BLUE should each be numbers between 0.0 and 1.0,
inclusive.
! Return a list (HUE, SATURATION, LUMINANCE), where HUE is in radians
! and both SATURATION and LUMINANCE are between 0.0 and 1.0,
! inclusive."
(let* ((r red)
(g green)
(b blue)
--- 159,166 ----
RED, GREEN, and BLUE should each be numbers between 0.0 and 1.0,
inclusive.
! Return a list (HUE, SATURATION, LUMINANCE) which each be numbers
! between 0.0 and 1.0, inclusive."
(let* ((r red)
(g green)
(b blue)
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#12558: Incorrect docstrings for color-rgb-to-hsl and color-hsl-to-rgb
2012-10-02 12:43 bug#12558: Incorrect docstrings for color-rgb-to-hsl and color-hsl-to-rgb Julian Scheid
@ 2012-10-05 7:18 ` Glenn Morris
0 siblings, 0 replies; 2+ messages in thread
From: Glenn Morris @ 2012-10-05 7:18 UTC (permalink / raw)
To: 12558-done
Version: 24.3
Thanks; corrected in emacs-24 branch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-05 7:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-02 12:43 bug#12558: Incorrect docstrings for color-rgb-to-hsl and color-hsl-to-rgb Julian Scheid
2012-10-05 7:18 ` Glenn Morris
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.