From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: color.el Date: Sat, 19 Feb 2011 19:19:57 -0800 Message-ID: <3028FDD10C5A4C1A8BF109BAA0CA773B@us.oracle.com> References: <87sjvjj2mz.fsf@stupidchicken.com> <8762sfv7c6.fsf@catnip.gol.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1298172093 27651 80.91.229.12 (20 Feb 2011 03:21:33 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 Feb 2011 03:21:33 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Miles Bader'" , "'Chong Yidong'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 20 04:21:29 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PqzrT-0004rY-Kk for ged-emacs-devel@m.gmane.org; Sun, 20 Feb 2011 04:21:27 +0100 Original-Received: from localhost ([127.0.0.1]:46459 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PqzrT-0005FR-3T for ged-emacs-devel@m.gmane.org; Sat, 19 Feb 2011 22:21:27 -0500 Original-Received: from [140.186.70.92] (port=33464 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PqzrO-0005CX-39 for emacs-devel@gnu.org; Sat, 19 Feb 2011 22:21:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PqzrN-00080l-39 for emacs-devel@gnu.org; Sat, 19 Feb 2011 22:21:21 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:23413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PqzrL-00080V-JD; Sat, 19 Feb 2011 22:21:19 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p1K3LGTh013734 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 20 Feb 2011 03:21:18 GMT Original-Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p1K3LGcR016288; Sun, 20 Feb 2011 03:21:16 GMT Original-Received: from abhmt007.oracle.com by acsmt354.oracle.com with ESMTP id 1021268281298171999; Sat, 19 Feb 2011 19:19:59 -0800 Original-Received: from dradamslap1 (/10.159.34.67) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 19 Feb 2011 19:19:58 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <8762sfv7c6.fsf@catnip.gol.com> Thread-Index: AcvQmwVxbU1wviQkSGii3rqXK/TNPgAEPHtg X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-Source-IP: acsmt353.oracle.com [141.146.40.153] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090207.4D6088AC.018A:SCFMA4539814,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 148.87.113.121 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: news.gmane.org gmane.emacs.devel:136259 Archived-At: > Radians seem cleaner; an argument range of 0-360 only seems > useful if an interface is primarily user-level (e.g. a spec > in a web page or something). Cleaner than what? than [0,360]? than [0,1]? than both? And why? In particular, why would [0,2*pi] be cleaner than [0,1]? I agree (if you are saying this) that the input and return values of these functions should not assume only or even primarily user-level use cases (e.g. web-page color spec). They should be general functions. This is essentially a utility library of building-block functions. IMO, the values should be of the same type (a) for all components (r,g,b,h,s,v), and (b) for both input and return values. We should not be sometimes passing in [0,1] for RGB and other times passing in [0,255] for RGB. Similarly for return values. And we should not use [0,360] for H but [0,1] for S and V.