bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#25890: `color-values` gives wrong value


From: Eli Zaretskii
Subject: bug#25890: `color-values` gives wrong value
Date: Fri, 03 Mar 2017 20:32:13 +0200

> Date: Fri, 3 Mar 2017 07:49:33 -0800 (PST)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: michael_heerdegen@web.de, 25890@debbugs.gnu.org, rasmus@gmx.us
> 
> > The code in hexrgb.el produces strange results in this regard (e.g.,
> > it produces "#FFFFFFFFE0E0" instead of "#FFFFFFFFE000" for the color
> > mentioned by the OP).
> 
> Not clear what you are saying.  What color mentioned by the OP?
> Do you mean "light yellow"?  What sexp using hexrgb.el did you try?  
> 
> If I do (hexrgb-color-name-to-hex "light yellow") I do get
> "#FFFFFFFFE0E0".  That comes from `x-color-values' returning
> (65535 65535 57568) and `hexrgb-int-to-hex' converting 57568
> to "E0E0".  That's from (format "%04X" 57568).  Hex conversion
> of decimal 57568 _should_ be E0E0, AFAIK.  Where is the bug?

The bug is in hexrgb-int-to-hex: it incorrectly assumes that it should
produce the LSB part of the number, while it actually should produce
the MSB part.





reply via email to

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