From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#25890: 26.0.50; `color-values` gives wrong value Date: Mon, 27 Feb 2017 17:51:00 +0200 Message-ID: <83r32jpr8b.fsf@gnu.org> References: <87zih7n2yt.fsf@pank.eu> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1488211091 10469 195.159.176.226 (27 Feb 2017 15:58:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 27 Feb 2017 15:58:11 +0000 (UTC) Cc: 25890@debbugs.gnu.org To: Rasmus Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 27 16:58:05 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciNgW-0001oB-Qi for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Feb 2017 16:58:00 +0100 Original-Received: from localhost ([::1]:53874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciNgc-00027M-N2 for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Feb 2017 10:58:06 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciNap-0005Bt-NR for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2017 10:52:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciNak-0001He-T8 for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2017 10:52:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:60259) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ciNak-0001Ha-PD for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2017 10:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ciNak-00081r-FX for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2017 10:52:02 -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, 27 Feb 2017 15:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 25890 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 25890-submit@debbugs.gnu.org id=B25890.148821067730815 (code B ref 25890); Mon, 27 Feb 2017 15:52:02 +0000 Original-Received: (at 25890) by debbugs.gnu.org; 27 Feb 2017 15:51:17 +0000 Original-Received: from localhost ([127.0.0.1]:58458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciNa0-00080x-Kp for submit@debbugs.gnu.org; Mon, 27 Feb 2017 10:51:16 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:41216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciNZy-00080i-UU for 25890@debbugs.gnu.org; Mon, 27 Feb 2017 10:51:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciNZo-0000IO-RH for 25890@debbugs.gnu.org; Mon, 27 Feb 2017 10:51:09 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59876) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciNZo-0000IA-Nu; Mon, 27 Feb 2017 10:51:04 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2752 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ciNZo-0007tE-26; Mon, 27 Feb 2017 10:51:04 -0500 In-reply-to: <87zih7n2yt.fsf@pank.eu> (message from Rasmus on Mon, 27 Feb 2017 15:05:46 +0100) 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" Xref: news.gmane.org gmane.emacs.bugs:129882 Archived-At: > From: Rasmus > Date: Mon, 27 Feb 2017 15:05:46 +0100 > > I try to get the color value of my background, "light yellow", with > color.el. However, `color-values` from faces.el returns the wrong value. > > (color-values "#ffffff") => (65280 65280 65280) ; The max values. Are you sure? What does the below produce? (color-values "#fffffffff") > (color-values "#ffffe0") => (65280 65280 57344) ; Light yellow hex. > (color-values "light yellow") => (65535 65535 57568) ; The potential bug. On my system, I get these results: (color-values "#ffffff") => (65535 65535 65535) (color-values "#ffffe0") => (65535 65535 57568) (color-values "light yellow") => (65535 65535 57568) > That is the color value of "light yellow" exceeds the maximum value as > defined by the color values of white (cf. `color-rgb-to-hex'). This means > that the color.el functions won't work. I think this means your color resolution is greater than 24 bits. Or maybe I don't understand how the above affects your code.