Update copyright year to 2014 by running admin/update-copyright.
[emacs.git] / etc / themes / tango-theme.el
blob4e40eb05ebc74ae60d3544f4d87f77e113656603
1 ;;; tango-theme.el --- Tango-based custom theme for faces
3 ;; Copyright (C) 2010-2014 Free Software Foundation, Inc.
5 ;; Authors: Chong Yidong <cyd@stupidchicken>
6 ;; Jan Moringen <jan.moringen@uni-bielefeld.de>
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software: you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation, either version 3 of the License, or
13 ;; (at your option) any later version.
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
23 ;;; Commentary
25 ;; The colors in this theme come from the Tango palette, which is in
26 ;; the public domain: http://tango.freedesktop.org/
28 ;;; Code:
30 (deftheme tango
31 "Face colors using the Tango palette (light background).
32 Basic, Font Lock, Isearch, Gnus, Message, Ediff, Flyspell,
33 Semantic, and Ansi-Color faces are included.")
35 (let ((class '((class color) (min-colors 89)))
36 ;; Tango palette colors.
37 (butter-1 "#fce94f") (butter-2 "#edd400") (butter-3 "#c4a000")
38 (orange-1 "#fcaf3e") (orange-2 "#f57900") (orange-3 "#ce5c00")
39 (choc-1 "#e9b96e") (choc-2 "#c17d11") (choc-3 "#8f5902")
40 (cham-1 "#8ae234") (cham-2 "#73d216") (cham-3 "#4e9a06")
41 (blue-1 "#729fcf") (blue-2 "#3465a4") (blue-3 "#204a87")
42 (plum-1 "#ad7fa8") (plum-2 "#75507b") (plum-3 "#5c3566")
43 (red-1 "#ef2929") (red-2 "#cc0000") (red-3 "#a40000")
44 (alum-1 "#eeeeec") (alum-2 "#d3d7cf") (alum-3 "#babdb6")
45 (alum-4 "#888a85") (alum-5 "#5f615c") (alum-6 "#2e3436")
46 ;; Not in Tango palette; used for better contrast.
47 (cham-4 "#346604") (blue-0 "#8cc4ff") (orange-4 "#b35000"))
49 (custom-theme-set-faces
50 'tango
51 `(default ((,class (:foreground ,alum-6 :background ,alum-1))))
52 `(cursor ((,class (:background ,blue-3))))
53 ;; Highlighting faces
54 `(fringe ((,class (:background ,alum-2))))
55 `(highlight ((,class (:background ,alum-3))))
56 `(region ((,class (:background ,alum-3))))
57 `(secondary-selection ((,class (:background ,blue-0))))
58 `(isearch ((,class (:foreground "#ffffff" :background ,orange-3))))
59 `(lazy-highlight ((,class (:background ,choc-1))))
60 `(trailing-whitespace ((,class (:background ,red-1))))
61 ;; Mode line faces
62 `(mode-line ((,class (:box (:line-width -1 :style released-button)
63 :background ,alum-2 :foreground ,alum-6))))
64 `(mode-line-inactive ((,class (:box (:line-width -1 :style released-button)
65 :background ,alum-4 :foreground ,alum-6))))
66 ;; Escape and prompt faces
67 `(minibuffer-prompt ((,class (:weight bold :foreground ,blue-3))))
68 `(escape-glyph ((,class (:foreground ,red-3))))
69 `(error ((,class (:foreground ,red-3))))
70 `(warning ((,class (:foreground ,orange-3))))
71 `(success ((,class (:foreground ,cham-3))))
72 ;; Font lock faces
73 `(font-lock-builtin-face ((,class (:foreground ,plum-2))))
74 `(font-lock-comment-face ((,class (:slant italic :foreground ,alum-5))))
75 `(font-lock-constant-face ((,class (:weight bold :foreground ,blue-3))))
76 `(font-lock-function-name-face ((,class (:foreground ,red-3))))
77 `(font-lock-keyword-face ((,class (:foreground ,cham-4))))
78 `(font-lock-string-face ((,class (:foreground ,plum-3))))
79 `(font-lock-type-face ((,class (:foreground ,blue-3))))
80 `(font-lock-variable-name-face ((,class (:foreground ,orange-4))))
81 ;; Button and link faces
82 `(link ((,class (:underline t :foreground ,blue-3))))
83 `(link-visited ((,class (:underline t :foreground ,blue-2))))
84 ;; Gnus faces
85 `(gnus-group-news-1 ((,class (:weight bold :foreground ,plum-3))))
86 `(gnus-group-news-1-low ((,class (:foreground ,plum-3))))
87 `(gnus-group-news-2 ((,class (:weight bold :foreground ,blue-3))))
88 `(gnus-group-news-2-low ((,class (:foreground ,blue-3))))
89 `(gnus-group-news-3 ((,class (:weight bold :foreground ,red-3))))
90 `(gnus-group-news-3-low ((,class (:foreground ,red-3))))
91 `(gnus-group-news-4 ((,class (:weight bold :foreground ,"#7a4c02"))))
92 `(gnus-group-news-4-low ((,class (:foreground ,"#7a4c02"))))
93 `(gnus-group-news-5 ((,class (:weight bold :foreground ,orange-3))))
94 `(gnus-group-news-5-low ((,class (:foreground ,orange-3))))
95 `(gnus-group-news-low ((,class (:foreground ,alum-4))))
96 `(gnus-group-mail-1 ((,class (:weight bold :foreground ,plum-3))))
97 `(gnus-group-mail-1-low ((,class (:foreground ,plum-3))))
98 `(gnus-group-mail-2 ((,class (:weight bold :foreground ,blue-3))))
99 `(gnus-group-mail-2-low ((,class (:foreground ,blue-3))))
100 `(gnus-group-mail-3 ((,class (:weight bold :foreground ,cham-3))))
101 `(gnus-group-mail-3-low ((,class (:foreground ,cham-3))))
102 `(gnus-group-mail-low ((,class (:foreground ,alum-4))))
103 `(gnus-header-content ((,class (:foreground ,cham-3))))
104 `(gnus-header-from ((,class (:weight bold :foreground ,butter-3))))
105 `(gnus-header-subject ((,class (:foreground ,red-3))))
106 `(gnus-header-name ((,class (:foreground ,blue-3))))
107 `(gnus-header-newsgroups ((,class (:foreground ,alum-4))))
108 ;; Message faces
109 `(message-header-name ((,class (:foreground ,blue-3))))
110 `(message-header-cc ((,class (:foreground ,butter-3))))
111 `(message-header-other ((,class (:foreground ,choc-2))))
112 `(message-header-subject ((,class (:foreground ,red-3))))
113 `(message-header-to ((,class (:weight bold :foreground ,butter-3))))
114 `(message-cited-text ((,class (:slant italic :foreground ,alum-5))))
115 `(message-separator ((,class (:weight bold :foreground ,cham-3))))
116 ;; SMerge
117 `(smerge-refined-change ((,class (:background ,plum-1))))
118 ;; Ediff
119 `(ediff-current-diff-A ((,class (:background ,blue-1))))
120 `(ediff-fine-diff-A ((,class (:background ,plum-1))))
121 `(ediff-current-diff-B ((,class (:background ,butter-1))))
122 `(ediff-fine-diff-B ((,class (:background ,orange-1))))
123 ;; Flyspell
124 `(flyspell-duplicate ((,class (:underline ,orange-1))))
125 `(flyspell-incorrect ((,class (:underline ,red-1))))
126 ;; Semantic faces
127 `(semantic-decoration-on-includes ((,class (:underline ,cham-4))))
128 `(semantic-decoration-on-private-members-face
129 ((,class (:background ,alum-2))))
130 `(semantic-decoration-on-protected-members-face
131 ((,class (:background ,alum-2))))
132 `(semantic-decoration-on-unknown-includes
133 ((,class (:background ,choc-3))))
134 `(semantic-decoration-on-unparsed-includes
135 ((,class (:underline ,orange-3))))
136 `(semantic-tag-boundary-face ((,class (:overline ,blue-1))))
137 `(semantic-unmatched-syntax-face ((,class (:underline ,red-1)))))
139 (custom-theme-set-variables
140 'tango
141 `(ansi-color-names-vector [,alum-6 ,red-3 ,cham-3 ,butter-3
142 ,blue-3 ,plum-3 ,blue-1 ,alum-1])))
144 (provide-theme 'tango)
146 ;; Local Variables:
147 ;; no-byte-compile: t
148 ;; End:
150 ;;; tango-theme.el ends here