[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25890: `color-values` gives wrong value
From: |
Simen Heggestøyl |
Subject: |
bug#25890: `color-values` gives wrong value |
Date: |
Sat, 04 Mar 2017 15:24:00 +0100 |
On Fri, Mar 3, 2017 at 3:08 PM, Eli Zaretskii <eliz@gnu.org> wrote:
Thanks, I installed my change with minor variations, and I'm marking
this bug done.
Thanks, Eli. The changes makes sense to me, but I've still got one
problem. I'm working with web colors, where color codes are specified
with either one or two digits per component (meaning that both "#fff"
and "#ffffff" specify the brightest possible value, named
"white"). But:
(apply #'color-rgb-to-hex `(,@(color-name-to-rgb "#ffffff") 2))
=> "#fefefe"
(apply #'color-rgb-to-hex `(,@(color-name-to-rgb "#fff") 2))
=> "#efefef"
Where I would like both to give back "#ffffff". Does this mean that I
have to ensure that input to `color-name-to-rgb' uses 4 digits per
component? Would it make sense for it to get a new optional parameter
`DIGITS-PER-COMPONENT', like `color-rgb-to-hex' did?
-- Simen
- bug#25890: `color-values` gives wrong value, Eli Zaretskii, 2017/03/03
- bug#25890: `color-values` gives wrong value, Drew Adams, 2017/03/03
- bug#25890: `color-values` gives wrong value, Eli Zaretskii, 2017/03/03
- bug#25890: `color-values` gives wrong value, Drew Adams, 2017/03/03
- bug#25890: `color-values` gives wrong value, Eli Zaretskii, 2017/03/03
- bug#25890: `color-values` gives wrong value, Drew Adams, 2017/03/03
- bug#25890: `color-values` gives wrong value, Eli Zaretskii, 2017/03/04