all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo <sdl.web@googlemail.com>
To: Chong Yidong <cyd@stupidchicken.com>
Cc: David De La Harpe Golden <david@harpegolden.net>,
	Lennart Borgman <lennart.borgman@gmail.com>,
	joakim@verona.se, emacs-devel@gnu.org,
	Juri Linkov <juri@jurta.org>, Dan Nicolaescu <dann@ics.uci.edu>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	Leo <sdl.web@gmail.com>, Drew Adams <drew.adams@oracle.com>,
	Miles Bader <miles@gnu.org>
Subject: Re: Color themes
Date: Mon, 10 Aug 2009 10:12:38 +0100	[thread overview]
Message-ID: <20a0c1020908100212p32dd463ao8a9a33d7edbf960f@mail.gmail.com> (raw)
In-Reply-To: <874oshx8p2.fsf@cyd.mit.edu>

2009/8/9 Chong Yidong <cyd@stupidchicken.com>:
> Leo <sdl.web@gmail.com> 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.
>
>
> ======= 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 ============

Thank you Chong.

I failed to see how consistency can be reached through this.

For example, if a package define faces that do not inherit from the
faces in the theme, then enabling the theme won't affect them, right?

I am thinking about if each buffer is an icon, how to make sure they
look like, for example, tango by using the 28 colors in its style
guide only.

Leo




  parent reply	other threads:[~2009-08-10  9:12 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-30 21:12 Darkening font-lock colors Chong Yidong
2009-07-30 21:39 ` Dan Nicolaescu
2009-07-30 21:51   ` Drew Adams
2009-07-30 22:00     ` Chong Yidong
2009-07-30 21:57   ` Chong Yidong
2009-07-30 22:21     ` Dan Nicolaescu
2009-07-30 23:40       ` David De La Harpe Golden
2009-07-31  0:18         ` Lennart Borgman
2009-07-31  0:55           ` Chong Yidong
2009-07-31  3:01             ` Lennart Borgman
2009-07-31 15:39               ` Lennart Borgman
2009-08-02 20:22               ` Lennart Borgman
2009-08-02 22:36                 ` Chong Yidong
2009-08-02 22:40                   ` Lennart Borgman
2009-08-03  0:16                   ` Juri Linkov
2009-08-03  1:09                     ` Lennart Borgman
2009-08-10  0:14                       ` Juri Linkov
2009-08-10  2:37                         ` Dan Nicolaescu
2009-08-10  3:28                           ` Miles Bader
2009-08-10 23:56                             ` Juri Linkov
2009-08-03  2:14                     ` David De La Harpe Golden
2009-08-03  2:28                       ` Lennart Borgman
2009-08-03  4:34                         ` David De La Harpe Golden
2009-08-03  5:13                         ` Miles Bader
2009-08-03  5:22                           ` Drew Adams
2009-08-03  9:54                             ` Juri Linkov
2009-08-03 11:58                               ` Daniel Clemente
2009-08-03 13:49                               ` Drew Adams
2009-08-03 23:32                                 ` Juri Linkov
2009-08-03 23:46                                   ` Drew Adams
2009-08-03 13:59                               ` joakim
2009-08-03 20:42                                 ` David De La Harpe Golden
2009-08-08 20:56                                 ` Color themes (was: Darkening font-lock colors) Juri Linkov
2009-08-08 21:16                                   ` Color themes joakim
2009-08-09  3:04                                   ` Chong Yidong
2009-08-09  4:28                                     ` Leo
2009-08-09 16:18                                       ` Chong Yidong
2009-08-09 17:28                                         ` CHENG Gao
2009-08-09 18:05                                         ` Lennart Borgman
2009-08-09 18:51                                         ` joakim
2009-08-10  9:12                                         ` Leo [this message]
2009-08-10 23:48                                           ` Juri Linkov
2009-08-11  1:32                                             ` Leo
2009-08-11  3:58                                           ` Chong Yidong
2009-08-11  4:26                                             ` Dan Nicolaescu
2009-08-11  5:52                                               ` Drew Adams
2009-08-11  5:52                                             ` Drew Adams
2009-08-11  8:59                                             ` Leo
2009-08-11 18:21                                               ` ferkiwi
2009-08-03 20:01                           ` Darkening font-lock colors Lennart Borgman
2009-08-03 22:40                             ` Drew Adams
2009-08-03 22:57                               ` Lennart Borgman
2009-08-03 23:54                                 ` Drew Adams
2009-08-04  0:10                                   ` Lennart Borgman
2009-08-04  0:16                                     ` Drew Adams
2009-08-04 21:27                                     ` Johan Bockgård
2009-08-04 23:16                                       ` Lennart Borgman
2009-08-03 23:27                         ` Juri Linkov
2009-08-03 23:42                           ` Lennart Borgman
2009-07-31  0:55       ` Chong Yidong
2009-07-31  2:39         ` Dan Nicolaescu
2009-08-03  0:17           ` Juri Linkov
2009-08-03  3:44             ` Dan Nicolaescu
2009-08-03  9:59               ` Juri Linkov
2009-08-03 12:34                 ` Dan Nicolaescu
2009-08-03 14:21                   ` Stephen Eilert
2009-08-03 21:11                   ` Stefan Monnier
2009-08-03 23:02                     ` Dan Nicolaescu
2009-08-04  8:27                       ` Romain Francoise
2009-08-04  8:29                         ` Lennart Borgman
2009-08-04 22:44                         ` Dan Nicolaescu
2009-08-03 23:32                   ` Juri Linkov
2009-07-31  0:46   ` Lennart Borgman
2009-07-30 21:41 ` Lennart Borgman
2009-07-30 22:22 ` Deniz Dogan
2009-07-31  1:50   ` Stefan Monnier
2009-07-31  3:54 ` tomas
2009-08-04 22:14 ` Juri Linkov
  -- strict thread matches above, loose matches on Subject: below --
2008-02-29 23:23 Color themes Chong Yidong
2008-02-29 23:49 ` Dan Nicolaescu
2008-03-01  9:31   ` Eli Zaretskii
2008-03-01  1:57 ` Eric Lilja
2008-03-02  1:00 ` Xavier Maillard

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=20a0c1020908100212p32dd463ao8a9a33d7edbf960f@mail.gmail.com \
    --to=sdl.web@googlemail.com \
    --cc=cyd@stupidchicken.com \
    --cc=dann@ics.uci.edu \
    --cc=david@harpegolden.net \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=joakim@verona.se \
    --cc=juri@jurta.org \
    --cc=lennart.borgman@gmail.com \
    --cc=miles@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=sdl.web@gmail.com \
    /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.