From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: cieluv <-> rgb conversion Date: Fri, 31 Jul 2009 16:07:17 -0700 Message-ID: <1C78C5D68DDE469AB7DF278122D161F4@us.oracle.com> References: <87746D765FEB4107A5A37140C29370D1@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1249081678 20425 80.91.229.12 (31 Jul 2009 23:07:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Jul 2009 23:07:58 +0000 (UTC) Cc: 'emacs help' To: "'Lennart Borgman'" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 01 01:07:51 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MX1CY-00026s-8D for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Aug 2009 01:07:50 +0200 Original-Received: from localhost ([127.0.0.1]:36643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MX1CX-0003gh-F8 for geh-help-gnu-emacs@m.gmane.org; Fri, 31 Jul 2009 19:07:49 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MX1C8-0003fA-Rr for help-gnu-emacs@gnu.org; Fri, 31 Jul 2009 19:07:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MX1C4-0003ei-43 for help-gnu-emacs@gnu.org; Fri, 31 Jul 2009 19:07:24 -0400 Original-Received: from [199.232.76.173] (port=37612 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MX1C3-0003ef-V6 for help-gnu-emacs@gnu.org; Fri, 31 Jul 2009 19:07:19 -0400 Original-Received: from rcsinet12.oracle.com ([148.87.113.124]:58196 helo=rgminet12.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MX1C3-0007eO-Fn for help-gnu-emacs@gnu.org; Fri, 31 Jul 2009 19:07:19 -0400 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n6VN7EZM009444 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 31 Jul 2009 23:07:16 GMT Original-Received: from abhmt001.oracle.com (abhmt001.oracle.com [141.146.116.10]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n6VN7Fok019689; Fri, 31 Jul 2009 23:07:15 GMT Original-Received: from dradamslap1 (/141.144.98.141) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 31 Jul 2009 16:07:13 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcoSMTGzo90J60AxQFu9PjT7/OKbfwAAZY2A X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-Source-IP: abhmt001.oracle.com [141.146.116.10] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010206.4A737922.00B0:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66596 Archived-At: > >> Anyone have algorithms in elisp for color conversions > >> cieluv <-> rgb? > > > > Dunno. But HSV is perhaps close enough? If so: > > http://www.emacswiki.org/cgi-bin/wiki/hexrgb.el > > > > Even if not, you can probably adapt the code there by > > adapting the HSV <-> RGB conversion algorithms. > > Thanks, but I am looking for a color representation where you could > easily measure the color difference as we see them as humans. CIE Luv > is one such that seems good. 1. I didn't suggest using a different color representation from CIE Luv (but see #2). What I tried to suggest was to find a CIE Luv <-> RGB conversion algorithm on the Web, and then adapt the code in hexrgb.el to use that algorithm. I'm guessing that any such algorithm wouldn't be too different from HSV <-> RGB. And hexrgb.el handles the rest, beyond the basic conversion. 2. Are you sure CIE Luv is well suited to use with a CRT or LCD screen? Human color perception is one thing; what screens emit is another thing. Anyway, I'm no expert on this. Good luck.