[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Color themes
From: |
joakim |
Subject: |
Re: Color themes |
Date: |
Sun, 09 Aug 2009 20:51:03 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
Chong Yidong <address@hidden> writes:
> Leo <address@hidden> writes:
>
>> I also don't like color-theme, in particular, how the themes are created
>> by re-defining all faces. A comprehensive theme could easily run up to a
>> few thousand lines and it still does not offer 100% coverage, let alone
>> consistency.
>>
>> Perhaps a color theme should be defined to be something like a palette
>> and when a palette is selected defface is forced to only use colors in
>> it.
>
> This is exactly the kind of problem that Custom themes is intended to
> solve. The code for *creating* custom themes is still a little buggy,
> but the code for *using* it should work, and we ought to be able to make
> use of it to set color themes.
>
> Here's an example. Create a file called forest-theme.el, with the
> contents shown below, and put it in .emacs.d. Then do M-x enable-theme
> RET forest RET, or customize custom-enabled-themes and add `forest' to
> the list.
>
> So if we want to use this mechanism to implement color themes, it's just
> a matter of adding some *-theme.el files to the load path, and adding a
> command to add that theme to custom-enabled-themes.
>
> As you can see, (i) your existing face customizations, if any, will
> override the color theme, as they should, and (ii) it doesn't take a lot
> of code to define a color theme using this method.
While I havent tested this, it seems great!
Can we somehow create a machine translator from color-theme.el to
custom-theme?
>
>
> ======= start forest-theme.el ============
>
> (deftheme forest
> "Created 2009-08-09.")
>
> (custom-theme-set-faces
> 'forest
> '(default ((t (:foreground "wheat" :background "black"))))
> '(font-lock-comment-face ((((class color) (min-colors 88)) (:foreground
> "medium sea green"))))
> '(font-lock-constant-face ((((class color) (min-colors 88)) (:foreground
> "turquoise"))))
> '(font-lock-function-name-face ((((class color) (min-colors 88))
> (:foreground "pale green"))))
> '(font-lock-keyword-face ((((class color) (min-colors 88)) (:foreground
> "white"))))
> '(font-lock-string-face ((((class color) (min-colors 88)) (:foreground "dark
> khaki"))))
> '(font-lock-type-face ((((class color) (min-colors 88)) (:foreground "medium
> aquamarine"))))
> '(font-lock-variable-name-face ((((class color) (min-colors 88))
> (:foreground "yellow green"))))
> '(font-lock-warning-face ((((class color) (min-colors 88)) (:foreground
> "salmon1"))))
> '(font-lock-builtin-face ((((class color) (min-colors 88)) (:foreground
> "LightSteelBlue"))))
> '(region ((((class color) (min-colors 88)) (:foreground "white" :background
> "dark green"))))
> '(highlight ((((class color) (min-colors 88)) (:foreground "white"
> :background "dark green")))))
>
> (provide-theme 'forest)
>
> ======= end forest-theme.el ============
>
--
Joakim Verona
- RE: Darkening font-lock colors, (continued)
- RE: Darkening font-lock colors, Drew Adams, 2009/08/03
- Re: Darkening font-lock colors, joakim, 2009/08/03
- Re: Darkening font-lock colors, David De La Harpe Golden, 2009/08/03
- Color themes (was: Darkening font-lock colors), Juri Linkov, 2009/08/08
- Re: Color themes, joakim, 2009/08/08
- Re: Color themes, Chong Yidong, 2009/08/08
- Re: Color themes, Leo, 2009/08/09
- Re: Color themes, Chong Yidong, 2009/08/09
- Re: Color themes, CHENG Gao, 2009/08/09
- Re: Color themes, Lennart Borgman, 2009/08/09
- Re: Color themes,
joakim <=
- Re: Color themes, Leo, 2009/08/10
- Re: Color themes, Juri Linkov, 2009/08/10
- Re: Color themes, Leo, 2009/08/10
- Re: Color themes, Chong Yidong, 2009/08/10
- Re: Color themes, Dan Nicolaescu, 2009/08/11
- RE: Color themes, Drew Adams, 2009/08/11
- RE: Color themes, Drew Adams, 2009/08/11
- Re: Color themes, Leo, 2009/08/11
- Re: Color themes, address@hidden, 2009/08/11
- Re: Darkening font-lock colors, Lennart Borgman, 2009/08/03