From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: list-colors-display: display all color names Date: Wed, 5 Jan 2005 10:12:31 -0800 Message-ID: References: <874qhwzb8r.fsf@jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1104948919 32576 80.91.229.6 (5 Jan 2005 18:15:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 Jan 2005 18:15:19 +0000 (UTC) Cc: eliz@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 05 19:14:59 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 1CmFgQ-0003AC-00 for ; Wed, 05 Jan 2005 19:14:58 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CmFrg-0006Dc-6r for ged-emacs-devel@m.gmane.org; Wed, 05 Jan 2005 13:26:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CmFpb-0004mH-Ad for emacs-devel@gnu.org; Wed, 05 Jan 2005 13:24:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CmFpY-0004ks-Tu for emacs-devel@gnu.org; Wed, 05 Jan 2005 13:24:25 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CmFpY-0004kM-E8 for emacs-devel@gnu.org; Wed, 05 Jan 2005 13:24:24 -0500 Original-Received: from [141.146.126.228] (helo=agminet01.oracle.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CmFeC-0000Rb-Ld; Wed, 05 Jan 2005 13:12:41 -0500 Original-Received: from agminet01.oracle.com (localhost [127.0.0.1]) by agminet01.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id j05ICdCj024110; Wed, 5 Jan 2005 10:12:39 -0800 Original-Received: from rgmsgw301.us.oracle.com (rgmsgw301.us.oracle.com [138.1.191.50]) by agminet01.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id j05ICbkH024089; Wed, 5 Jan 2005 10:12:38 -0800 Original-Received: from rgmsgw301.us.oracle.com (localhost [127.0.0.1]) by rgmsgw301.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with ESMTP id j05ICaQq016684; Wed, 5 Jan 2005 11:12:36 -0700 Original-Received: from dradamslap (dradams-lap.us.oracle.com [130.35.177.126]) by rgmsgw301.us.oracle.com (Switch-3.1.4/Switch-3.1.0) with SMTP id j05ICVXv016613 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Wed, 5 Jan 2005 11:12:34 -0700 Original-To: "Juri Linkov" , "Stefan Monnier" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-reply-to: <874qhwzb8r.fsf@jurta.org> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 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:31901 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:31901 With #RRGGBB values printed in the *Colors* buffer it would be possible to find closer color names even without a function, simply with a regexp isearch like M-C-s #f.[fe].e. It will not find the closest color name, but it is good enough to help to find all closer colors. Even better would be if the *Colors* buffer was sorted by RGB values. I don't suggest to do that by default, but different sorting order would be useful, e.g. by color name, by color intensity. The latter is good for finding a darker or brighter color than a given color, but it is not so obvious since there are too many variants of projecting a color value from 3-D color space into a 1-D color list. Perhaps the most useful is sorting by hue into a rainbow, and inside every hue sorting by value*saturation. Great idea. There are usually so many colors in `list-colors-display' that it is hard to find a "good" ordering - what is good for one user at one time is different from what it is otherwise. Being able to sort the colors in different ways would be a definite improvement. In terms of a default order, I do think that RGB order would be generally more useful than color name. The current order is ad hoc, BTW - colors are currently not sorted by name (the order is implementation-dependent, and is essentially whatever `xw-defined-colors' returns, which is `w32-color-map' or `x-colors'). >>> gray grey bebebe >>> light gray light grey, LightGray, LightGrey d3d3d3 >> First, if we do that, I'd suggest to use #BE12BE34BE56, i.e. prefix >> with # and use 4 digits per color. > I agree on the `#'. I omitted the `#' to save more space. But OK, one character is not too much to remind the users about the proper format. The # is important for 1) recognition of what this is about and 2) copy+pasting to Lisp code or to commands that ask for a color.