[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#22343: 25.0.50; Incorrect rounding (?) when loading the Emacs.backgr
From: |
Eli Zaretskii |
Subject: |
bug#22343: 25.0.50; Incorrect rounding (?) when loading the Emacs.background attribute from Xresources |
Date: |
Mon, 11 Jan 2016 20:56:43 +0200 |
> From: Clément Pit--Claudel <clement.pitclaudel@live.com>
> Date: Sun, 10 Jan 2016 16:19:50 -0500
>
> This is a cute bug. Run the following two commands (in bash):
>
> # Set Emacs.background in Xresources
> $ xrdb <(echo "Emacs.background: #2e3436")
> # Run Emacs with same background on default face
> $ emacs -q --eval "(set-face-attribute 'default nil :background \"#2e3436\")"
>
> On my machine, the two colors are not rendered the same. I've attached a
> screenshot. What essentially happens is that anywhere where text is drawn the
> background is indeed #2e3436, but on the rest of the frame it's #2d3335.
> Amusingly, these two colors have distinct RGB and HSL values, but their CMYK
> and HSB values are the same (or so says http://rgb.to/hex/2d3335 and
> http://rgb.to/hex/2e3436, at least).
>
> The reason I came across this is that I use Emacs' tango-dark theme, which
> uses that background color. Since I didn't like Emacs popping up with a white
> background and immediately switching, I set the same background in my
> .Xresources.
>
> To observe the bug more clearly, just take a screenshot and open it in your
> favourite image editor, then use the magic wand with a tolerance of 0 (see
> other screenshot). Or use the color picker.
>
> What could cause this problem? A roundtripping issue with color conversions?
Could this be the distant-background feature at work?