[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inclusion of naquadah-theme
From: |
Chong Yidong |
Subject: |
Re: Inclusion of naquadah-theme |
Date: |
Sat, 30 Jun 2012 10:15:23 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) |
Julien Danjou <address@hidden> 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?