all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: David Rogoff <david@therogoffs.com>
To: Drew Adams <drew.adams@oracle.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: function to get inverse color name?
Date: Thu, 24 Apr 2014 11:08:52 -0700	[thread overview]
Message-ID: <C49AF0CA-5830-48FB-B60E-F885E2F1FAF8@therogoffs.com> (raw)
In-Reply-To: <844d627d-1229-485a-8038-2993b826cb7e@default>

Thanks Drew!


On Apr 24, 2014, at 6:44 AM, Drew Adams <drew.adams@oracle.com> 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.
>> 
>> 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.
>> 
>> 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




  reply	other threads:[~2014-04-24 18:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-24  3:03 function to get inverse color name? unfrostedpoptart
2014-04-24 13:44 ` Drew Adams
2014-04-24 18:08   ` David Rogoff [this message]
2014-04-24 17:51 ` Emanuel Berg
2014-04-24 22:58 ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C49AF0CA-5830-48FB-B60E-F885E2F1FAF8@therogoffs.com \
    --to=david@therogoffs.com \
    --cc=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.