From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <837fjgkkr8.fsf@gnu.org> References: <5692CAF6.20304@live.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1452538643 24439 80.91.229.3 (11 Jan 2016 18:57:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Jan 2016 18:57:23 +0000 (UTC) Cc: 22343@debbugs.gnu.org To: =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 11 19:57:11 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aIheQ-0000H6-NA for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Jan 2016 19:57:10 +0100 Original-Received: from localhost ([::1]:56334 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIheQ-0001nW-7p for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Jan 2016 13:57:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIheL-0001ki-2F for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2016 13:57:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIheH-0003Oo-Sx for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2016 13:57:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:58542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIheH-0003Ok-Or for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2016 13:57:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aIheH-0002Sr-Jq for bug-gnu-emacs@gnu.org; Mon, 11 Jan 2016 13:57:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Jan 2016 18:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22343 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22343-submit@debbugs.gnu.org id=B22343.14525386089450 (code B ref 22343); Mon, 11 Jan 2016 18:57:01 +0000 Original-Received: (at 22343) by debbugs.gnu.org; 11 Jan 2016 18:56:48 +0000 Original-Received: from localhost ([127.0.0.1]:46762 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aIhe3-0002SL-Uu for submit@debbugs.gnu.org; Mon, 11 Jan 2016 13:56:48 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:36318) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aIhe3-0002S5-2k for 22343@debbugs.gnu.org; Mon, 11 Jan 2016 13:56:47 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIhdu-0003J8-05 for 22343@debbugs.gnu.org; Mon, 11 Jan 2016 13:56:42 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:47373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIhdt-0003J4-TF; Mon, 11 Jan 2016 13:56:37 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2447 helo=HOME-C4E4A596F7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aIhds-0004D5-Vb; Mon, 11 Jan 2016 13:56:37 -0500 In-reply-to: <5692CAF6.20304@live.com> (message from =?UTF-8?Q?Cl=C3=A9ment?= Pit--Claudel on Sun, 10 Jan 2016 16:19:50 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:111519 Archived-At: > From: Clément Pit--Claudel > 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?