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: function to get inverse color name? Date: Thu, 24 Apr 2014 06:44:07 -0700 (PDT) Message-ID: <844d627d-1229-485a-8038-2993b826cb7e@default> References: <2c7e7b5b-73ec-45ae-9bf5-b638aad861ff@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1398399590 32104 80.91.229.3 (25 Apr 2014 04:19:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Apr 2014 04:19:50 +0000 (UTC) To: unfrostedpoptart , help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 25 06:19:43 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WdXbz-00069Q-Qz for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Apr 2014 06:19:43 +0200 Original-Received: from localhost ([::1]:53175 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdV9K-0006Cp-0f for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Apr 2014 21:41:58 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdUl7-00050j-4E for help-gnu-emacs@gnu.org; Thu, 24 Apr 2014 21:18:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WdJwi-0007xz-5j for help-gnu-emacs@gnu.org; Thu, 24 Apr 2014 09:44:19 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:16597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdJwh-0007xo-Vc for help-gnu-emacs@gnu.org; Thu, 24 Apr 2014 09:44:12 -0400 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s3ODi9rs012857 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 24 Apr 2014 13:44:10 GMT Original-Received: from aserz7021.oracle.com (aserz7021.oracle.com [141.146.126.230]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s3ODi8Mf018318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 24 Apr 2014 13:44:09 GMT Original-Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s3ODi8id007229; Thu, 24 Apr 2014 13:44:08 GMT In-Reply-To: <2c7e7b5b-73ec-45ae-9bf5-b638aad861ff@googlegroups.com> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6691.5000 (x86)] X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:97368 Archived-At: > I'm doing a major overhaul of my emacs 24 init.el files. I'm trying to > convert a lot of faces from dark to light to set up alternate themes. I > know I can just invert everything with invert-all-faces, but I want to do > them individually and have the correct name. >=20 > Does anyone have a function that takes a named color (e.g. "Red") and > returns the inverse? I guess it would convert the name to RRGGBB, subtra= ct > each 8-bit value from 256, and then convert back to a name. >=20 > Thanks for any help and/or pointers to useful functions! Library hexrgb.el has this (`hexrgb-complement') and many other such utility functions for colors. Library palette.el provides a WYSIWYG color palette for working with colors. In the palette, `~' picks the complement of the current color. Both libraries are on Emacs Wiki and MELPA: http://www.emacswiki.org/emacs-en/download/hexrgb.el http://www.emacswiki.org/emacs-en/download/palette.el You can see the color palette here: http://www.emacswiki.org/emacs/ColorPalette