Avoid kill-emacs-hook errors hanging batch mode
[emacs.git] / etc / themes / tango-theme.el
bloba7a79c04adb5f8087ef3a26f97ae7834dac079a6
1 ;;; tango-theme.el --- Tango-based custom theme for faces
3 ;; Copyright (C) 2010-2018 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 <https://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 `(homoglyph ((,class (:foreground ,red-3))))
70 `(error ((,class (:foreground ,red-3))))
71 `(warning ((,class (:foreground ,orange-3))))
72 `(success ((,class (:foreground ,cham-3))))
73 ;; Font lock faces
74 `(font-lock-builtin-face ((,class (:foreground ,plum-2))))
75 `(font-lock-comment-face ((,class (:slant italic :foreground ,alum-5))))
76 `(font-lock-constant-face ((,class (:weight bold :foreground ,blue-3))))
77 `(font-lock-function-name-face ((,class (:foreground ,red-3))))
78 `(font-lock-keyword-face ((,class (:foreground ,cham-4))))
79 `(font-lock-string-face ((,class (:foreground ,plum-3))))
80 `(font-lock-type-face ((,class (:foreground ,blue-3))))
81 `(font-lock-variable-name-face ((,class (:foreground ,orange-4))))
82 ;; Button and link faces
83 `(link ((,class (:underline t :foreground ,blue-3))))
84 `(link-visited ((,class (:underline t :foreground ,blue-2))))
85 ;; Gnus faces
86 `(gnus-group-news-1 ((,class (:weight bold :foreground ,plum-3))))
87 `(gnus-group-news-1-low ((,class (:foreground ,plum-3))))
88 `(gnus-group-news-2 ((,class (:weight bold :foreground ,blue-3))))
89 `(gnus-group-news-2-low ((,class (:foreground ,blue-3))))
90 `(gnus-group-news-3 ((,class (:weight bold :foreground ,red-3))))
91 `(gnus-group-news-3-low ((,class (:foreground ,red-3))))
92 `(gnus-group-news-4 ((,class (:weight bold :foreground ,"#7a4c02"))))
93 `(gnus-group-news-4-low ((,class (:foreground ,"#7a4c02"))))
94 `(gnus-group-news-5 ((,class (:weight bold :foreground ,orange-3))))
95 `(gnus-group-news-5-low ((,class (:foreground ,orange-3))))
96 `(gnus-group-news-low ((,class (:foreground ,alum-4))))
97 `(gnus-group-mail-1 ((,class (:weight bold :foreground ,plum-3))))
98 `(gnus-group-mail-1-low ((,class (:foreground ,plum-3))))
99 `(gnus-group-mail-2 ((,class (:weight bold :foreground ,blue-3))))
100 `(gnus-group-mail-2-low ((,class (:foreground ,blue-3))))
101 `(gnus-group-mail-3 ((,class (:weight bold :foreground ,cham-3))))
102 `(gnus-group-mail-3-low ((,class (:foreground ,cham-3))))
103 `(gnus-group-mail-low ((,class (:foreground ,alum-4))))
104 `(gnus-header-content ((,class (:foreground ,cham-3))))
105 `(gnus-header-from ((,class (:weight bold :foreground ,butter-3))))
106 `(gnus-header-subject ((,class (:foreground ,red-3))))
107 `(gnus-header-name ((,class (:foreground ,blue-3))))
108 `(gnus-header-newsgroups ((,class (:foreground ,alum-4))))
109 ;; Message faces
110 `(message-header-name ((,class (:foreground ,blue-3))))
111 `(message-header-cc ((,class (:foreground ,butter-3))))
112 `(message-header-other ((,class (:foreground ,choc-2))))
113 `(message-header-subject ((,class (:foreground ,red-3))))
114 `(message-header-to ((,class (:weight bold :foreground ,butter-3))))
115 `(message-cited-text ((,class (:slant italic :foreground ,alum-5))))
116 `(message-separator ((,class (:weight bold :foreground ,cham-3))))
117 ;; SMerge
118 `(smerge-refined-change ((,class (:background ,plum-1))))
119 ;; Ediff
120 `(ediff-current-diff-A ((,class (:background ,blue-1))))
121 `(ediff-fine-diff-A ((,class (:background ,plum-1))))
122 `(ediff-current-diff-B ((,class (:background ,butter-1))))
123 `(ediff-fine-diff-B ((,class (:background ,orange-1))))
124 ;; Flyspell
125 `(flyspell-duplicate ((,class (:underline ,orange-1))))
126 `(flyspell-incorrect ((,class (:underline ,red-1))))
127 ;; Realgud
128 `(realgud-overlay-arrow1 ((,class (:foreground "dark green"))))
129 `(realgud-overlay-arrow2 ((,class (:foreground "#7a4c02"))))
130 `(realgud-overlay-arrow3 ((,class (:foreground ,orange-1))))
131 `(realgud-bp-disabled-face ((,class (:foreground ,plum-1))))
132 `(realgud-bp-line-enabled-face ((,class (:underline "red"))))
133 `(realgud-bp-line-disabled-face ((,class (:underline ,plum-1))))
134 `(realgud-file-name ((,class :foreground "dark green")))
135 `(realgud-line-number ((,class :foreground ,blue-3)))
136 `(realgud-backtrace-number ((,class :foreground ,blue-3 :weight bold)))
137 ;; Semantic faces
138 `(semantic-decoration-on-includes ((,class (:underline ,cham-4))))
139 `(semantic-decoration-on-private-members-face
140 ((,class (:background ,alum-2))))
141 `(semantic-decoration-on-protected-members-face
142 ((,class (:background ,alum-2))))
143 `(semantic-decoration-on-unknown-includes
144 ((,class (:background ,choc-3))))
145 `(semantic-decoration-on-unparsed-includes
146 ((,class (:underline ,orange-3))))
147 `(semantic-tag-boundary-face ((,class (:overline ,blue-1))))
148 `(semantic-unmatched-syntax-face ((,class (:underline ,red-1)))))
150 (custom-theme-set-variables
151 'tango
152 `(ansi-color-names-vector [,alum-6 ,red-3 ,cham-3 ,butter-3
153 ,blue-3 ,plum-3 ,blue-1 ,alum-1])))
155 (provide-theme 'tango)
157 ;; Local Variables:
158 ;; no-byte-compile: t
159 ;; End:
161 ;;; tango-theme.el ends here