From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: color-complement for defface (was: Eliminating a couple of independent face definitions) Date: Fri, 04 Feb 2011 11:57:30 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87aaibisxh.fsf_-_@lifelogs.com> References: <87oc6vm67v.fsf@stupidchicken.com> <87vd12z77n.fsf@stupidchicken.com> <87ipx289cu.fsf@nzebook.haselwarter.org> <871v3onlhy.fsf@keller.adm.naquadah.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1296842280 25608 80.91.229.12 (4 Feb 2011 17:58:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 4 Feb 2011 17:58:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 04 18:57:56 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 1PlPuu-0008ID-M6 for ged-emacs-devel@m.gmane.org; Fri, 04 Feb 2011 18:57:56 +0100 Original-Received: from localhost ([127.0.0.1]:45574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PlPuu-0005tW-4Z for ged-emacs-devel@m.gmane.org; Fri, 04 Feb 2011 12:57:56 -0500 Original-Received: from [140.186.70.92] (port=36926 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PlPuj-0005py-7H for emacs-devel@gnu.org; Fri, 04 Feb 2011 12:57:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PlPuh-0003Nm-5k for emacs-devel@gnu.org; Fri, 04 Feb 2011 12:57:44 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:41408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PlPug-0003NM-V1 for emacs-devel@gnu.org; Fri, 04 Feb 2011 12:57:43 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1PlPue-0008Ag-Px for emacs-devel@gnu.org; Fri, 04 Feb 2011 18:57:40 +0100 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Feb 2011 18:57:40 +0100 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 04 Feb 2011 18:57:40 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:3mGnyOM9GHKiYnvq6ERp9p66rps= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 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:135579 Archived-At: On Fri, 04 Feb 2011 11:26:49 +0100 Julien Danjou wrote: JD> On Thu, Feb 03 2011, Drew Adams wrote: >> FWIW, for this I simply use the complements of the light-background default >> colors as the dark-background colors. That is not necessarily ideal, but it at >> least is reasonable and consistent. It is also very quick to do, given some >> code (e.g. hexrgb.el or palette.el) that quickly gives you color complements. JD> color.el included in Emacs 24 as `color-complement' so you can even use JD> it in your defface directly, I think. It would be nice if an example of that usage was part of the manual. Even better would be if defining a face could automatically use the complement (e.g. by setting the background to 'complement). Julien, do you want to propose a patch to the manual? Does anyone have comments on a defface modification to let color-complement pick the background automatically if requested? I don't know how hard that would be to write, but I want to know if it's even acceptable. Thanks Ted