[Top][All Lists]

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

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

From: Drew Adams
Subject: bug#25890: `color-values` gives wrong value
Date: Fri, 3 Mar 2017 11:20:44 -0800 (PST)

> > > 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.

You seem to be just repeating yourself, without answering my
questions.  Are you saying that hex conversion of decimal 57568
should not be E0E0?  If so, why?  Why should it be E000?

reply via email to

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