From: Chong Yidong <cyd@gnu.org>
To: emacs-devel@gnu.org
Subject: Re: Inclusion of naquadah-theme
Date: Sat, 30 Jun 2012 10:15:23 +0800 [thread overview]
Message-ID: <874nptk0jo.fsf@gnu.org> (raw)
In-Reply-To: <874npvk990.fsf@zelenka.enovance.com> (Julien Danjou's message of "Thu, 28 Jun 2012 12:42:51 +0200")
Julien Danjou <julien@danjou.info> writes:
>> I'm not sure I understand. If you specify a face with a color like
>> "#252A2B", doesn't Emacs display the closest matching color on terminals
>> with limited colors?
>
> It does try, but the result is not always good. Some colors are
> correctly picked up as closest/best choice, others aren't fine. We're
> doing a better job manually.
Well, first of all there are really only two cases that need to be
handled: terminals that can handle #rrggbb, and 16-color terminals. In
my experience, 256-color xterms give a rather good approximation of the
desired colors automatically, without manual color placement.
As for matching color names to faces, the approach that we've used in
tango-theme.el and others is to do something like this:
(let ((class '((class color) (min-colors 89)))
;; Tango palette colors.
(butter-1 "#fce94f")
...)
(custom-theme-set-faces
'tango-dark
...
`(cursor ((,class (:background ,butter-1))))
Apart from handling multiple terminals, naquadah-simple-face-to-multiple
aims to do the same thing, right? I'm guessing the reason is that you
feel that having explicit functions is more structured/less ad-hoc than
the above let-form. If that's the case, maybe the solution is to add a
new macro to custom.el, which does something like this:
(custom-theme-set-faces-with-color-names THEME TERMINALS COLORS FACES...)
(custom-theme-set-faces-with-color-names
'tango-dark
((term-1 ((class color) (min-colors 4096)))
(term-2 ((class color) (min-colors 16))))
((butter (term-1 "#fce94f") (term-2 "yellow")))
(cursor :background butter)
...)
WDYT?
next prev parent reply other threads:[~2012-06-30 2:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-25 10:13 Inclusion of naquadah-theme Julien Danjou
2012-06-25 13:49 ` Chong Yidong
2012-06-26 10:48 ` Julien Danjou
2012-06-28 7:36 ` Chong Yidong
2012-06-28 10:42 ` Julien Danjou
2012-06-30 2:15 ` Chong Yidong [this message]
2012-07-02 21:02 ` Julien Danjou
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=874nptk0jo.fsf@gnu.org \
--to=cyd@gnu.org \
--cc=emacs-devel@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.