author | Luke Hoersten <Luke@Hoersten.org> |
Thu, 16 Feb 2012 10:13:09 -0600 | |
changeset 48 | f17ebf233431 |
parent 47 | 3415a60d5fd0 |
child 49 | 942fe8d1a653 |
permissions | -rw-r--r-- |
47 | 1 |
(eval-when-compile |
2 |
(require 'cl)) |
|
3 |
||
4 |
(defconst solarized-description |
|
5 |
"Color theme by Ethan Schoonover, created 2011-03-24. |
|
6 |
Ported to Emacs by Greg Pfeil, http://ethanschoonover.com/solarized.") |
|
7 |
||
8 |
(defcustom solarized-degrade nil |
|
9 |
"For test purposes only; when in GUI mode, forces Solarized to use the 256 |
|
10 |
degraded color mode to test the approximate color values for accuracy." |
|
11 |
:type 'boolean |
|
12 |
:group 'solarized) |
|
13 |
||
14 |
(defcustom solarized-bold t |
|
15 |
"Stops Solarized from displaying bold when nil." |
|
16 |
:type 'boolean |
|
17 |
:group 'solarized) |
|
18 |
||
19 |
(defcustom solarized-underline t |
|
20 |
"Stops Solarized from displaying underlines when nil." |
|
21 |
:type 'boolean |
|
22 |
:group 'solarized) |
|
23 |
||
24 |
(defcustom solarized-italic t |
|
25 |
"Stops Solarized from displaying italics when nil." |
|
26 |
:type 'boolean |
|
27 |
:group 'solarized) |
|
28 |
||
29 |
(defcustom solarized-termcolors 16 |
|
30 |
"This setting applies to emacs in terminal (non-GUI) mode. |
|
48
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
31 |
If set to 16, emacs will use the terminal emulator's colorscheme (best option |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
32 |
as long as you've set your emulator's colors to the Solarized palette). If |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
33 |
set to 256 and your terminal is capable of displaying 256 colors, emacs will |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
34 |
use the 256 degraded color mode." |
47 | 35 |
:type 'integer |
36 |
:options '(16 256) |
|
37 |
:group 'solarized) |
|
38 |
||
39 |
(defcustom solarized-contrast 'normal |
|
40 |
"Stick with normal! It's been carefully tested. Setting this option to high or |
|
48
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
41 |
low does use the same Solarized palette but simply shifts some values up or |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
42 |
down in order to expand or compress the tonal range displayed." |
47 | 43 |
:type 'symbol |
44 |
:options '(high normal low) |
|
45 |
:group 'solarized) |
|
46 |
||
47 |
(defcustom solarized-broken-srgb (if (eq system-type 'darwin) t nil) |
|
48 |
"Emacs bug #8402 results in incorrect color handling on Macs. If this is t |
|
49 |
(the default on Macs), Solarized works around it with alternative colors. |
|
48
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
50 |
However, these colors are not totally portable, so you may be able to edit |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
51 |
the \"Gen RGB\" column in solarized-definitions.el to improve them further." |
47 | 52 |
:type 'boolean |
53 |
:group 'solarized) |
|
54 |
||
55 |
;; FIXME: The Generic RGB colors will actually vary from device to device, but |
|
56 |
;; hopefully these are closer to the intended colors than the sRGB values |
|
57 |
;; that Emacs seems to dislike |
|
58 |
(defvar solarized-colors |
|
59 |
;; name sRGB Gen RGB degraded ANSI(Solarized terminal) |
|
60 |
'((base03 "#002b36" "#042028" "#1c1c1c" "#7f7f7f") |
|
61 |
(base02 "#073642" "#0a2832" "#262626" "#000000") |
|
48
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
62 |
(base01 "#586e75" "#465a61" "#585858" "#00ff00") |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
63 |
(base00 "#657b83" "#52676f" "#626262" "#ffff00") |
47 | 64 |
(base0 "#839496" "#708183" "#808080" "#5c5cff") |
65 |
(base1 "#93a1a1" "#81908f" "#8a8a8a" "#00ffff") |
|
48
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
66 |
(base2 "#eee8d5" "#e9e2cb" "#e4e4e4" "#e5e5e5") |
47 | 67 |
(base3 "#fdf6e3" "#fcf4dc" "#ffffd7" "#ffffff") |
68 |
(yellow "#b58900" "#a57705" "#af8700" "#cdcd00") |
|
69 |
(orange "#cb4b16" "#bd3612" "#d75f00" "#ff0000") |
|
48
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
70 |
(red "#dc322f" "#c60007" "#d70000" "#cd0000") |
47 | 71 |
(magenta "#d33682" "#c61b6e" "#af005f" "#cd00cd") |
72 |
(violet "#6c71c4" "#5859b7" "#5f5faf" "#ff00ff") |
|
73 |
(blue "#268bd2" "#2075c7" "#0087ff" "#0000ee") |
|
74 |
(cyan "#2aa198" "#259185" "#00afaf" "#00cdcd") |
|
75 |
(green "#859900" "#728a05" "#5f8700" "#00cd00")) |
|
76 |
"This is a table of all the colors used by the Solarized color theme. Each |
|
77 |
column is a different set, one of which will be chosen based on term |
|
78 |
capabilities, etc.") |
|
79 |
||
80 |
(defun solarized-color-definitions (mode) |
|
81 |
(flet ((find-color (name) |
|
82 |
(let ((index (if window-system |
|
83 |
(if solarized-degrade |
|
84 |
3 |
|
85 |
(if solarized-broken-srgb 2 1)) |
|
86 |
(if (= solarized-termcolors 256) |
|
87 |
3 |
|
88 |
4)))) |
|
89 |
(nth index (assoc name solarized-colors))))) |
|
90 |
(let ((base03 (find-color 'base03)) |
|
91 |
(base02 (find-color 'base02)) |
|
92 |
(base01 (find-color 'base01)) |
|
93 |
(base00 (find-color 'base00)) |
|
94 |
(base0 (find-color 'base0)) |
|
95 |
(base1 (find-color 'base1)) |
|
96 |
(base2 (find-color 'base2)) |
|
97 |
(base3 (find-color 'base3)) |
|
98 |
(yellow (find-color 'yellow)) |
|
99 |
(orange (find-color 'orange)) |
|
100 |
(red (find-color 'red)) |
|
101 |
(magenta (find-color 'magenta)) |
|
102 |
(violet (find-color 'violet)) |
|
103 |
(blue (find-color 'blue)) |
|
104 |
(cyan (find-color 'cyan)) |
|
105 |
(green (find-color 'green)) |
|
106 |
(bold (if solarized-bold 'bold 'normal)) |
|
107 |
(underline (if solarized-underline t nil)) |
|
108 |
(opt-under nil) |
|
109 |
(italic (if solarized-italic 'italic 'normal))) |
|
110 |
(when (eq 'light mode) |
|
111 |
(rotatef base03 base3) |
|
112 |
(rotatef base02 base2) |
|
113 |
(rotatef base01 base1) |
|
114 |
(rotatef base00 base0)) |
|
115 |
(let ((back base03)) |
|
116 |
(cond ((eq 'high solarized-contrast) |
|
117 |
(let ((orig-base3 base3)) |
|
118 |
(rotatef base01 base00 base0 base1 base2 base3) |
|
119 |
(setf base3 orig-base3))) |
|
120 |
((eq 'low solarized-contrast) |
|
121 |
(setf back base02 |
|
122 |
opt-under t))) |
|
123 |
`((;; basic |
|
124 |
(default ((t (:foreground ,base0 ,:background ,back)))) |
|
125 |
(cursor |
|
126 |
((t (:foreground ,base0 :background ,base03 :inverse-video t)))) |
|
127 |
(escape-glyph-face ((t (:foreground ,red)))) |
|
128 |
(fringe ((t (:foreground ,base01 :background ,base02)))) |
|
129 |
(linum ((t (:foreground ,base01 :background ,base02)))) |
|
130 |
(header-line ((t (:foreground ,base0 :background ,base2)))) |
|
131 |
(highlight ((t (:background ,base02)))) |
|
132 |
(hl-line ((t (:background ,base02)))) |
|
133 |
(isearch ((t (:foreground ,yellow :inverse-video t)))) |
|
134 |
(lazy-highlight ((t (:background ,base2 :foreground ,base00)))) |
|
135 |
(link ((t (:foreground ,violet :underline ,underline)))) |
|
136 |
(link-visited ((t (:foreground ,magenta :underline ,underline)))) |
|
137 |
(menu ((t (:foreground ,base0 :background ,base02)))) |
|
138 |
(minibuffer-prompt ((t (:foreground ,blue)))) |
|
139 |
(mode-line |
|
140 |
((t (:foreground ,base1 :background ,base02 |
|
141 |
:box (:line-width 1 :color ,base1))))) |
|
142 |
(mode-line-buffer-id ((t (:foreground ,base1)))) |
|
143 |
(mode-line-inactive |
|
144 |
((t (:foreground ,base0 :background ,base02 |
|
145 |
:box (:line-width 1 :color ,base02))))) |
|
146 |
(region ((t (:background ,base02)))) |
|
147 |
(secondary-selection ((t (:background ,base02)))) |
|
148 |
(trailing-whitespace ((t (:foreground ,red :inverse-video t)))) |
|
149 |
(vertical-border ((t (:foreground ,base0)))) |
|
150 |
;; comint |
|
151 |
(comint-highlight-prompt ((t (:foreground ,blue)))) |
|
152 |
;; compilation |
|
153 |
(compilation-info ((t (:foreground ,green :weight ,bold)))) |
|
154 |
(compilation-warning ((t (:foreground ,orange :weight ,bold)))) |
|
48
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
155 |
;; custom |
47 | 156 |
(custom-button |
48
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
157 |
((t (:foreground ,base1 :background ,base02 |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
158 |
:box (:line-width 2 :style released-button))))) |
47 | 159 |
(custom-button-mouse |
48
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
160 |
((t (:foreground ,base1 :background ,base02 :inverse-video t |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
161 |
:inherit custom-button)))) |
47 | 162 |
(custom-button-pressed |
48
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
163 |
((t (:foreground ,base1 :background ,base02 :inverse-video t |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
164 |
:box (:line-width 2 :style pressed-button) |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
165 |
:inherit custom-button-mouse)))) |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
166 |
(custom-changed ((t (:foreground ,blue :background ,base3 |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
167 |
:inverse-video t)))) |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
168 |
(custom-comment ((t (:foreground ,base1 :background ,base02)))) |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
169 |
(custom-comment-tag ((t (:foreground ,base1 :background ,base02)))) |
47 | 170 |
(custom-documentation ((t (:inherit default)))) |
48
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
171 |
(custom-group-tag ((t (:foreground ,base1)))) |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
172 |
(custom-group-tag-1 ((t (:foreground ,base1 :weight ,bold)))) |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
173 |
(custom-invalid |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
174 |
((t (:foreground ,red :background ,back :inverse-video t)))) |
47 | 175 |
(custom-link ((t (:foreground ,violet)))) |
176 |
(custom-state ((t (:foreground ,green)))) |
|
48
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
177 |
(custom-variable-tag ((t (:foreground ,base1)))) |
47 | 178 |
;; diff |
179 |
(diff-added ((t (:foreground ,green :inverse-video t)))) |
|
180 |
(diff-changed ((t (:foreground ,yellow :inverse-video t)))) |
|
181 |
(diff-removed ((t (:foreground ,red :inverse-video t)))) |
|
182 |
(diff-header ((t (:background ,base01)))) |
|
183 |
(diff-file-header |
|
184 |
((t (:background ,base1 :foreground ,base01 :weight ,bold)))) |
|
185 |
(diff-refine-change ((t (:background ,base1)))) |
|
186 |
;; IDO |
|
187 |
(ido-only-match ((t (:foreground ,green)))) |
|
188 |
(ido-subdir ((t (:foreground ,blue)))) |
|
189 |
(ido-first-match ((t (:foreground ,green :weight ,bold)))) |
|
190 |
;; emacs-wiki |
|
191 |
(emacs-wiki-bad-link-face |
|
192 |
((t (:foreground ,red :underline ,underline)))) |
|
193 |
(emacs-wiki-link-face |
|
194 |
((t (:foreground ,blue :underline ,underline)))) |
|
195 |
(emacs-wiki-verbatim-face |
|
196 |
((t (:foreground ,base00 :underline ,underline)))) |
|
197 |
;; eshell |
|
48
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
198 |
(eshell-ls-archive ((t (:foreground ,magenta)))) |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
199 |
(eshell-ls-backup ((t (:foreground ,yellow)))) |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
200 |
(eshell-ls-clutter ((t (:foreground ,orange)))) |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
201 |
(eshell-ls-directory ((t (:foreground ,blue)))) |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
202 |
(eshell-ls-executable ((t (:foreground ,green)))) |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
203 |
(eshell-ls-missing ((t (:foreground ,red)))) |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
204 |
(eshell-ls-product ((t (:foreground ,yellow)))) |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
205 |
(eshell-ls-readonly ((t (:foreground ,base1)))) |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
206 |
(eshell-ls-special ((t (:foreground ,violet)))) |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
207 |
(eshell-ls-symlink ((t (:foreground ,cyan)))) |
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
208 |
(eshell-ls-unreadable ((t (:foreground ,base00)))) |
47 | 209 |
(eshell-prompt ((t (:foreground ,green :weight ,bold)))) |
210 |
;; font-lock |
|
211 |
(font-lock-builtin-face ((t (:foreground ,green)))) |
|
212 |
(font-lock-comment-face ((t (:foreground ,base01 :slant ,italic)))) |
|
213 |
(font-lock-constant-face ((t (:foreground ,cyan)))) |
|
214 |
(font-lock-function-name-face ((t (:foreground ,blue)))) |
|
215 |
(font-lock-keyword-face ((t (:foreground ,green)))) |
|
216 |
(font-lock-string-face ((t (:foreground ,cyan)))) |
|
217 |
(font-lock-type-face ((t (:foreground ,yellow)))) |
|
218 |
(font-lock-variable-name-face ((t (:foreground ,blue)))) |
|
219 |
(font-lock-warning-face ((t (:foreground ,red :weight ,bold)))) |
|
220 |
(font-lock-doc-face ((t (:foreground ,cyan :slant ,italic)))) |
|
221 |
(font-lock-color-constant-face ((t (:foreground ,green)))) |
|
222 |
(font-lock-comment-delimiter-face |
|
223 |
((t (:foreground ,base01 :weight ,bold)))) |
|
224 |
(font-lock-doc-string-face ((t (:foreground ,green)))) |
|
225 |
(font-lock-preprocessor-face ((t (:foreground ,orange)))) |
|
226 |
(font-lock-reference-face ((t (:foreground ,cyan)))) |
|
227 |
(font-lock-negation-char-face ((t (:foreground ,red)))) |
|
228 |
(font-lock-other-type-face ((t (:foreground ,blue :slant ,italic)))) |
|
229 |
(font-lock-regexp-grouping-construct ((t (:foreground ,orange)))) |
|
230 |
(font-lock-special-keyword-face ((t (:foreground ,magenta)))) |
|
231 |
(font-lock-exit-face ((t (:foreground ,red)))) |
|
232 |
(font-lock-other-emphasized-face |
|
233 |
((t (:foreground ,violet :weight ,bold :slant ,italic)))) |
|
234 |
(font-lock-regexp-grouping-backslash ((t (:foreground ,yellow)))) |
|
235 |
;; info |
|
236 |
(info-xref ((t (:foreground ,blue :underline ,underline)))) |
|
237 |
(info-xref-visited ((t (:inherit info-xref :foreground ,magenta)))) |
|
238 |
;; org |
|
239 |
(org-hide ((t (:foreground ,base03)))) |
|
240 |
(org-todo ((t (:foreground ,base03 :background ,red :weight ,bold)))) |
|
241 |
(org-done ((t (:foreground ,green :weight ,bold)))) |
|
242 |
(org-todo-kwd-face ((t (:foreground ,red :background ,base03)))) |
|
243 |
(org-done-kwd-face ((t (:foreground ,green :background ,base03)))) |
|
244 |
(org-project-kwd-face |
|
245 |
((t (:foreground ,violet :background ,base03)))) |
|
246 |
(org-waiting-kwd-face |
|
247 |
((t (:foreground ,orange :background ,base03)))) |
|
248 |
(org-someday-kwd-face ((t (:foreground ,blue :background ,base03)))) |
|
249 |
(org-started-kwd-face |
|
250 |
((t (:foreground ,yellow :background ,base03)))) |
|
251 |
(org-cancelled-kwd-face |
|
252 |
((t (:foreground ,green :background ,base03)))) |
|
253 |
(org-delegated-kwd-face |
|
254 |
((t (:foreground ,cyan :background ,base03)))) |
|
255 |
;; show-paren |
|
256 |
(show-paren-match-face ((t (:background ,cyan :foreground ,base3)))) |
|
257 |
(show-paren-mismatch-face |
|
258 |
((t (:background ,red :foreground ,base3)))) |
|
259 |
;; widgets |
|
260 |
(widget-field |
|
48
f17ebf233431
More updates to solarized.
Luke Hoersten <Luke@Hoersten.org>
parents:
47
diff
changeset
|
261 |
((t (:box (:line-width 1 :color ,base2) :foreground ,base1 :background ,base02 :inherit default)))) |
47 | 262 |
(widget-single-line-field ((t (:inherit widget-field)))) |
263 |
;; extra modules |
|
264 |
;; ------------- |
|
265 |
;; gnus |
|
266 |
(gnus-cite-1 ((t (:foreground ,magenta)))) |
|
267 |
(gnus-cite-2 ((t (:foreground ,base2)))) |
|
268 |
(gnus-cite-3 ((t (:foreground ,base3)))) |
|
269 |
(gnus-cite-4 ((t (:foreground ,base1)))) |
|
270 |
(gnus-cite-5 ((t (:foreground ,magenta)))) |
|
271 |
(gnus-cite-6 ((t (:foreground ,base2)))) |
|
272 |
(gnus-cite-7 ((t (:foreground ,base3)))) |
|
273 |
(gnus-cite-8 ((t (:foreground ,base1)))) |
|
274 |
(gnus-cite-9 ((t (:foreground ,base2)))) |
|
275 |
(gnus-cite-10 ((t (:foreground ,base3)))) |
|
276 |
(gnus-cite-11 ((t (:foreground ,blue)))) |
|
277 |
(gnus-group-mail-1 ((t (:foreground ,base3 :weight ,bold)))) |
|
278 |
(gnus-group-mail-1-empty ((t (:foreground ,base3)))) |
|
279 |
(gnus-group-mail-2 ((t (:foreground ,base2 :weight ,bold)))) |
|
280 |
(gnus-group-mail-2-empty ((t (:foreground ,base2)))) |
|
281 |
(gnus-group-mail-3 ((t (:foreground ,magenta :weight ,bold)))) |
|
282 |
(gnus-group-mail-3-empty ((t (:foreground ,magenta)))) |
|
283 |
(gnus-group-mail-low ((t (:foreground ,base00 :weight ,bold)))) |
|
284 |
(gnus-group-mail-low-empty ((t (:foreground ,base00)))) |
|
285 |
(gnus-group-news-1 ((t (:foreground ,base1 :weight ,bold)))) |
|
286 |
(gnus-group-news-1-empty ((t (:foreground ,base1)))) |
|
287 |
(gnus-group-news-2 ((t (:foreground ,blue :weight ,bold)))) |
|
288 |
(gnus-group-news-2-empty ((t (:foreground ,blue)))) |
|
289 |
(gnus-group-news-low ((t (:foreground ,violet :weight ,bold)))) |
|
290 |
(gnus-group-news-low-empty ((t (:foreground ,violet)))) |
|
291 |
(gnus-header-content ((t (:foreground ,cyan :slant ,italic)))) |
|
292 |
(gnus-header-from ((t (:foreground ,base2)))) |
|
293 |
(gnus-header-name ((t (:foreground ,blue)))) |
|
294 |
(gnus-header-newsgroups ((t (:foreground ,green :slant ,italic)))) |
|
295 |
(gnus-header-subject ((t (:foreground ,base1)))) |
|
296 |
(gnus-server-agent ((t (:foreground ,base3 :weight ,bold)))) |
|
297 |
(gnus-server-closed ((t (:foreground ,base1 :slant ,italic)))) |
|
298 |
(gnus-server-denied ((t (:foreground ,base2 :weight ,bold)))) |
|
299 |
(gnus-server-offline ((t (:foreground ,green :weight ,bold)))) |
|
300 |
(gnus-server-opened ((t (:foreground ,cyan :weight ,bold)))) |
|
301 |
(gnus-splash ((t (:foreground ,base2)))) |
|
302 |
(gnus-summary-high-ancient |
|
303 |
((t (:foreground ,magenta :weight ,bold)))) |
|
304 |
(gnus-summary-high-read ((t (:foreground ,base1 :weight ,bold)))) |
|
305 |
(gnus-summary-high-ticked ((t (:foreground ,base3 :weight ,bold)))) |
|
306 |
(gnus-summary-high-undownloaded |
|
307 |
((t (:foreground ,base2 :weight ,bold)))) |
|
308 |
(gnus-summary-low-ancient |
|
309 |
((t (:foreground ,magenta :slant ,italic)))) |
|
310 |
(gnus-summary-low-read ((t (:foreground ,base1 :slant ,italic)))) |
|
311 |
(gnus-summary-low-ticked ((t (:foreground ,base3 :slant ,italic)))) |
|
312 |
(gnus-summary-low-undownloaded |
|
313 |
((t (:foreground ,base2 :slant ,italic)))) |
|
314 |
(gnus-summary-normal-ancient ((t (:foreground ,magenta)))) |
|
315 |
(gnus-summary-normal-read ((t (:foreground ,base1)))) |
|
316 |
(gnus-summary-normal-ticked ((t (:foreground ,base3)))) |
|
317 |
(gnus-summary-normal-undownloaded ((t (:foreground ,base2)))) |
|
318 |
;; Flymake |
|
319 |
(flymake-errline ((t (:background ,orange)))) |
|
320 |
(flymake-warnline ((t (:background ,violet)))) |
|
321 |
;; whitespace |
|
322 |
(whitespace-empty ((t (:foreground ,red)))) |
|
323 |
(whitespace-hspace ((t (:foreground ,orange)))) |
|
324 |
(whitespace-indentation ((t (:foreground ,base02)))) |
|
325 |
(whitespace-space ((t (:foreground ,base02)))) |
|
326 |
(whitespace-space-after-tab ((t (:foreground ,cyan)))) |
|
327 |
(whitespace-space-before-tab ((t (:foreground ,red :weight ,bold)))) |
|
328 |
(whitespace-tab ((t (:foreground ,base02)))) |
|
329 |
(whitespace-trailing |
|
330 |
((t (:background ,base02 :foreground ,red :weight ,bold)))) |
|
331 |
(whitespace-highlight-face |
|
332 |
((t (:background ,blue :foreground ,red)))) |
|
333 |
;; Message |
|
334 |
(message-mml ((t (:foreground ,blue)))) |
|
335 |
(message-cited-text ((t (:foreground ,base2)))) |
|
336 |
(message-separator ((t (:foreground ,base3)))) |
|
337 |
(message-header-xheader ((t (:foreground ,violet)))) |
|
338 |
(message-header-name ((t (:foreground ,cyan)))) |
|
339 |
(message-header-other ((t (:foreground ,red)))) |
|
340 |
(message-header-newsgroups |
|
341 |
((t (:foreground ,yellow :weight ,bold :slant ,italic)))) |
|
342 |
(message-header-subject ((t (:foreground ,base00)))) |
|
343 |
(message-header-cc ((t (:foreground ,green :weight ,bold)))) |
|
344 |
(message-header-to ((t (:foreground ,base1 :weight ,bold))))) |
|
345 |
((foreground-color . ,base0) |
|
346 |
(background-color . ,base03) |
|
347 |
(background-mode . ,mode) |
|
348 |
(cursor-color . ,base0))))))) |
|
349 |
||
350 |
(defmacro create-solarized-theme (mode) |
|
351 |
(let* ((theme-name (intern (concat "solarized-" (symbol-name mode)))) |
|
352 |
(defs (solarized-color-definitions mode)) |
|
353 |
(theme-vars (mapcar (lambda (def) (list (car def) (cdr def))) |
|
354 |
(second defs))) |
|
355 |
(theme-faces (first defs))) |
|
356 |
`(progn |
|
357 |
(deftheme ,theme-name ,solarized-description) |
|
358 |
(apply 'custom-theme-set-variables ',theme-name ',theme-vars) |
|
359 |
(apply 'custom-theme-set-faces ',theme-name ',theme-faces) |
|
360 |
(provide-theme ',theme-name)))) |
|
361 |
||
362 |
(provide 'solarized-definitions) |