From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Eli Zaretskii" Newsgroups: gmane.emacs.devel Subject: Re: list-colors-display: display all color names Date: Wed, 05 Jan 2005 20:59:16 +0200 Message-ID: <01c4f358$Blat.v2.2.2$cd1cb9e0@zahav.net.il> References: <87d5wwsuly.fsf@jurta.org> <87brc5a99w.fsf@jurta.org> <01c4f2a1$Blat.v2.2.2$dde14140@zahav.net.il> <87d5wkzbi3.fsf@jurta.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: deer.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7BIT X-Trace: sea.gmane.org 1104952771 12699 80.91.229.6 (5 Jan 2005 19:19:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 Jan 2005 19:19:31 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 05 20:19:21 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CmGQK-00080V-00 for ; Wed, 05 Jan 2005 20:02:24 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CmGba-0002x5-R8 for ged-emacs-devel@m.gmane.org; Wed, 05 Jan 2005 14:14:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CmGbT-0002wY-3c for emacs-devel@gnu.org; Wed, 05 Jan 2005 14:13:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CmGbQ-0002v9-P6 for emacs-devel@gnu.org; Wed, 05 Jan 2005 14:13:52 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CmGbQ-0002v6-M9 for emacs-devel@gnu.org; Wed, 05 Jan 2005 14:13:52 -0500 Original-Received: from [192.114.186.66] (helo=romy.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CmGPj-0005TE-45 for emacs-devel@gnu.org; Wed, 05 Jan 2005 14:01:47 -0500 Original-Received: from zaretski (IGLD-83-130-250-9.inter.net.il [83.130.250.9]) by romy.inter.net.il (MOS 3.5.6-GR) with ESMTP id AFG94254 (AUTH halo1); Wed, 5 Jan 2005 21:01:33 +0200 (IST) Original-To: Juri Linkov X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 2.2.2 In-reply-to: <87d5wkzbi3.fsf@jurta.org> (message from Juri Linkov on Wed, 05 Jan 2005 07:32:52 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:31906 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:31906 > Cc: emacs-devel@gnu.org > From: Juri Linkov > Date: Wed, 05 Jan 2005 07:32:52 +0200 > > > How about adding a function color-values-hex, which calls color-values > > and then transforms the result into the hex #RGB notation? Would that > > fix this problem? > > A function is not a problem. A simple piece of code like this > > (apply 'format " #%02x%02x%02x" > (mapcar (lambda (c) (lsh c -8)) (color-values color))) > > can do that. Creating a special function with this code will not > fix this problem since users might not be aware of such a function. Users might be oblivious to the existence of `list-colors-display' as well. This kind of arguments will not lead us anywhere. Also, we could add more text to the *Colors* buffer telling users about related facilities. But I doubt that this is a grave problem. Someone who wouldn't hesitate to modify colors one bit at a time is probably a hacker anyway, and hackers could well be expected to look for related functions. > Adding #RGB to every color name displayed by `list-colors-display' > in the *Colors* buffer is a more practical solution. But it clutters the display and creates a problem with long lines. So I think we need a good reason for adding that. One idea that I like better is to add tooltips to the colors which show the hex RGB values. How about this? > >> Also, users might want to find the color name corresponding to > >> the known RGB value. > > > > For more-or-less standard RGB values, the ones listed in > > tty-colors.el, doing that is simply a matter of searching the alist > > returned by tty-color-alist; if trhat is what you want, does this > > justify a new feature? > > RGB values returned by tty-color-alist are represented as integers > 0-65535 while the most widespread format for specifying color triplets > is hexadecimal #RRGGBB. Sure, but converting to hex is trivial, more or less. > 4 digits per color? Why? So that we could support more than 8 bits per principal color. Since X supports that, when tty-colors was written, we anticipated that someone might use a 12-digit spec on a tty. > what I want to say is that using any format longer than #RRGGBB is > too impractical. What's impractical about it? You can compute 12 hex digits as practically as you can 3 or 6.