From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Newsgroups: gmane.emacs.bugs Subject: bug#25890: `color-values` gives wrong value Date: Sat, 04 Mar 2017 15:24:00 +0100 Message-ID: <1488637440.20657.0@smtp.gmail.com> References: <87zih7n2yt.fsf@pank.eu> <83r32jpr8b.fsf@gnu.org> <87bmtnryqr.fsf@drachen> <87d1e2tzt5.fsf@pank.eu> <8337eypb5l.fsf@gnu.org> <87r32hs4mt.fsf@gmx.us> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed X-Trace: blaine.gmane.org 1488637515 4455 195.159.176.226 (4 Mar 2017 14:25:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 4 Mar 2017 14:25:15 +0000 (UTC) Cc: 25890-done@debbugs.gnu.org To: Eli Zaretskii , 25890@debbugs.gnu.org, eliz@gnu.org, rasmus@gmx.us Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Mar 04 15:25:07 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 1ckAcN-0000F8-NW for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Mar 2017 15:25:07 +0100 Original-Received: from localhost ([::1]:35562 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckAcT-0004iA-SD for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Mar 2017 09:25:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ckAcL-0004gl-UQ for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2017 09:25:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ckAcI-0004Qq-FN for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2017 09:25:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41089) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ckAcI-0004Qm-Ag for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2017 09:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ckAcI-0005jA-5S for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2017 09:25:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Simen =?UTF-8?Q?Heggest=C3=B8yl?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Mar 2017 14:25: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-done@debbugs.gnu.org id=D25890.148863745121933 (code D ref 25890); Sat, 04 Mar 2017 14:25:02 +0000 Original-Received: (at 25890-done) by debbugs.gnu.org; 4 Mar 2017 14:24:11 +0000 Original-Received: from localhost ([127.0.0.1]:39287 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckAbT-0005hd-5P for submit@debbugs.gnu.org; Sat, 04 Mar 2017 09:24:11 -0500 Original-Received: from mail-lf0-f66.google.com ([209.85.215.66]:33462) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ckAbQ-0005hJ-Lx; Sat, 04 Mar 2017 09:24:09 -0500 Original-Received: by mail-lf0-f66.google.com with SMTP id r36so9913677lfi.0; Sat, 04 Mar 2017 06:24:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:message-id:in-reply-to:references :mime-version; bh=N1fR8G1OPgrT8srRbV7euF6YKD+lbKA7BDgm2F12+3U=; b=eFcruLMqR3Ejz8atY3jifwXxGZ26iXjQSHERQglGzivDFNSCq7Oz7oI9UOTzPhxMQ5 2p/PuBve3r0+HFAWhQ0uSmmd/nXdi+lgj7/A1+xeg82wfV+ogbpZtx6U08hskPnlWkQI JMfGBgp8mGdUVCCKsvfuKXhmgMX6Y5PjM4xEjRmtD85xotxnkzph6HvW/GqL1xXVCg0H qoAiSf/PQS0p7J2cqyT+1yfShcM0SjvwTmK3FZ8hHjuA3EMi2byS4F/Kv5XTRTVQOMw4 +FyPXjrJB2ENvcn0WlX5QS4YQBh9LsM/RzkJF6Gb3duuJQy8dFBQwVVFRCl4vNfZNuhR fgxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:message-id:in-reply-to :references:mime-version; bh=N1fR8G1OPgrT8srRbV7euF6YKD+lbKA7BDgm2F12+3U=; b=NgB6fTni2gifQDS6BcMx8YEuMoDPBsXuS1BMFqk9qG4LF40n/lcDNM0OmH13qDkfIO 9zj/dOTx1k4+51Bhh8lpxzjX4GBjpnzFMu6bRwK1MnJ/h8EJnofeOaBJ03t8oLeFEu0Q eEdaRt6BVBkDjaRN4pZty+sTanOqlsJjh/k7FM6ARLx9dLaFSRiDWTY9NcY4i1frXhe4 gcoXoqe5J2/wyhUvBQTHHB6fTgaAFv0/jWODx3Xz7YRxN4P+//75N6kxNHlqrzg5V4Hu jgfzRm0jME9yJYfNBjr1gYElvGfOVDpTdMwwJzSPliBiCCY8IWVbZqGvPyTZZ+byfZYa cKPw== X-Gm-Message-State: AMke39nxI1fyeKam78+GiIqwAiYedpG2b5g85H6xf94AK2kBt9a6qwvIrEAjWTOJvzbbQg== X-Received: by 10.46.84.78 with SMTP id y14mr2654652ljd.63.1488637442726; Sat, 04 Mar 2017 06:24:02 -0800 (PST) Original-Received: from [192.168.4.204] ([171.23.6.106]) by smtp.gmail.com with ESMTPSA id q30sm1662054lfa.20.2017.03.04.06.24.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 04 Mar 2017 06:24:01 -0800 (PST) In-Reply-To: <83y3wmlafw.fsf@gnu.org> X-Mailer: geary/0.11.3 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:130177 Archived-At: On Fri, Mar 3, 2017 at 3:08 PM, Eli Zaretskii wrote: > Thanks, I installed my change with minor variations, and I'm marking > this bug done. Thanks, Eli. The changes makes sense to me, but I've still got one problem. I'm working with web colors, where color codes are specified with either one or two digits per component (meaning that both "#fff" and "#ffffff" specify the brightest possible value, named "white"). But: (apply #'color-rgb-to-hex `(,@(color-name-to-rgb "#ffffff") 2)) => "#fefefe" (apply #'color-rgb-to-hex `(,@(color-name-to-rgb "#fff") 2)) => "#efefef" Where I would like both to give back "#ffffff". Does this mean that I have to ensure that input to `color-name-to-rgb' uses 4 digits per component? Would it make sense for it to get a new optional parameter `DIGITS-PER-COMPONENT', like `color-rgb-to-hex' did? -- Simen