From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Rogoff Newsgroups: gmane.emacs.help Subject: Re: function to get inverse color name? Date: Thu, 24 Apr 2014 11:08:52 -0700 Message-ID: References: <2c7e7b5b-73ec-45ae-9bf5-b638aad861ff@googlegroups.com> <844d627d-1229-485a-8038-2993b826cb7e@default> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1398397662 10239 80.91.229.3 (25 Apr 2014 03:47:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 25 Apr 2014 03:47:42 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 25 05:47:37 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 1WdX6u-0007dj-L1 for geh-help-gnu-emacs@m.gmane.org; Fri, 25 Apr 2014 05:47:36 +0200 Original-Received: from localhost ([::1]:55160 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdX6u-0008OM-AR for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Apr 2014 23:47:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33471) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WdUaH-0008P3-93 for help-gnu-emacs@gnu.org; Thu, 24 Apr 2014 21:06:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WdOUr-0007ri-8c for help-gnu-emacs@gnu.org; Thu, 24 Apr 2014 14:35:53 -0400 Original-Received: from [2605:dc00:100:2::a5] (port=52074 helo=gproxy5-pub.mail.unifiedlayer.com) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1WdOUq-0007rJ-Os for help-gnu-emacs@gnu.org; Thu, 24 Apr 2014 14:35:45 -0400 Original-Received: (qmail 4383 invoked by uid 0); 24 Apr 2014 18:08:59 -0000 Original-Received: from unknown (HELO cmgw4) (10.0.90.85) by gproxy5.mail.unifiedlayer.com with SMTP; 24 Apr 2014 18:08:59 -0000 Original-Received: from box775.bluehost.com ([66.147.244.75]) by cmgw4 with id tu8v1n01T1eKdhN01u8ywT; Thu, 24 Apr 2014 12:08:59 -0600 X-Authority-Analysis: v=2.1 cv=CpMsLBID c=1 sm=1 tr=0 a=5/zNnaQT9t/sO4OIeGhKjQ==:117 a=5/zNnaQT9t/sO4OIeGhKjQ==:17 a=cNaOj0WVAAAA:8 a=f5113yIGAAAA:8 a=q1UFHNiqFRMA:10 a=9WDsSnLxJ6YA:10 a=kj9zAlcOel0A:10 a=A9F8YJjxAAAA:8 a=rMyRurQWVHEA:10 a=1Vl2yItenpkA:10 a=yPCof4ZbAAAA:8 a=xY1_shhyAAAA:8 a=Kt0cZDsusioJGWHoUVUA:9 a=CjuIK1q_8ugA:10 a=RVy87Xg6K0EA:10 a=7DSvI1NPTFQA:10 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=therogoffs.com; s=default; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Content-Type:Mime-Version:Subject; bh=0GBBoN9nE9fFNZJXiV/WVwW5+0QRC2CCdgDYM6tSHV0=; b=j2wURMgRE/ZPOvS7VnHexi/0JXjaNbkoLMlT6md/VI/sDytiE9ufgs8hy1VDMCuwcL/BZrWFyubfbRs8ab9QlhTslIsr//4DNZB/fXYv95UWB7zqj8SGA52zd8ir7sC2; Original-Received: from [68.99.177.206] (port=36509 helo=[192.168.2.5]) by box775.bluehost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.82) (envelope-from ) id 1WdO4t-0001jl-Oo; Thu, 24 Apr 2014 12:08:55 -0600 X-Priority: 3 In-Reply-To: <844d627d-1229-485a-8038-2993b826cb7e@default> X-Mailer: Apple Mail (2.1874) X-Identified-User: {1656:box775.bluehost.com:therogof:therogoffs.com} {sentby:smtp auth 68.99.177.206 authed with david@therogoffs.com} X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2605:dc00:100:2::a5 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:97365 Archived-At: Thanks Drew! On Apr 24, 2014, at 6:44 AM, Drew Adams wrote: >> 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, = subtract >> each 8-bit value from 256, and then convert back to a name. >>=20 >> Thanks for any help and/or pointers to useful functions! >=20 > Library hexrgb.el has this (`hexrgb-complement') and many other such > utility functions for colors. >=20 > Library palette.el provides a WYSIWYG color palette for working with > colors. In the palette, `~' picks the complement of the current = color. >=20 > 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 >=20 > You can see the color palette here: > http://www.emacswiki.org/emacs/ColorPalette