emacs-devel
[Top][All Lists]
Advanced

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

Re: Question: How does color-lighten-name work?


From: Robert Pluim
Subject: Re: Question: How does color-lighten-name work?
Date: Fri, 28 Oct 2022 10:09:48 +0200

>>>>> On Fri, 28 Oct 2022 10:09:34 +0300, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Pedro Andres Aranda Gutierrez <paaguti@gmail.com>
    >> Date: Fri, 28 Oct 2022 08:23:16 +0200
    >> 
    >> (require 'color)
    >> (let ((newbg "#102030"))
    >> (message "newbg: %s" newbg)
    >> (setq newbg (color-lighten-name newbg 10))
    >> (message "newbg: %s" newbg))
    >> 
    >> evaluated in the *scratch* buffer. will print the following:
    >> 
    >> newbg: #102030
    >> newbg: #11ab23563501
    >> 
    >> Shouldn't the second colour spec have only 3 bytes?

    Eli> No, it uses the default format of 4 digits per component.

    Eli> We could perhaps add an additional optional argument to specify how
    Eli> many digits per component to produce.

By the principle of least surprise, perhaps default to the same number
of digits as the input?

Robert
-- 



reply via email to

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