lotsa changes and inclusion of elpy
[emacs.git] / .emacs.d / elisp / emacs-color-theme-solarized / solarized-definitions.el
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-diff-mode 'normal
15 "Sets the level of highlighting to use in diff-like modes."
16 :type 'symbol
17 :options '(high normal low)
18 :group 'solarized)
19
20 (defcustom solarized-bold t
21 "Stops Solarized from displaying bold when nil."
22 :type 'boolean
23 :group 'solarized)
24
25 (defcustom solarized-underline t
26 "Stops Solarized from displaying underlines when nil."
27 :type 'boolean
28 :group 'solarized)
29
30 (defcustom solarized-italic t
31 "Stops Solarized from displaying italics when nil."
32 :type 'boolean
33 :group 'solarized)
34
35 (defcustom solarized-contrast 'normal
36 "Stick with normal! It's been carefully tested. Setting this option to high or
37 low does use the same Solarized palette but simply shifts some values up or
38 down in order to expand or compress the tonal range displayed."
39 :type 'symbol
40 :options '(high normal low)
41 :group 'solarized)
42
43 (defcustom solarized-broken-srgb (if (and (eq system-type 'darwin)
44 (eq window-system 'ns))
45 t
46 nil)
47 "Emacs bug #8402 results in incorrect color handling on Macs. If this is t
48 \(the default on Macs), Solarized works around it with alternative colors.
49 However, these colors are not totally portable, so you may be able to edit
50 the \"Gen RGB\" column in solarized-definitions.el to improve them further."
51 :type 'boolean
52 :group 'solarized)
53
54 ;; FIXME: The Generic RGB colors will actually vary from device to device, but
55 ;; hopefully these are closer to the intended colors than the sRGB values
56 ;; that Emacs seems to dislike
57 (defvar solarized-colors ; ANSI(Solarized terminal)
58 ;; name sRGB Gen RGB 256 16 8
59 '((base03 "#002b36" "#042028" "#1c1c1c" "brightblack" "black")
60 (base02 "#073642" "#0a2832" "#262626" "black" "black")
61 (base01 "#586e75" "#465a61" "#585858" "brightgreen" "green")
62 (base00 "#657b83" "#52676f" "#626262" "brightyellow" "yellow")
63 (base0 "#839496" "#708183" "#808080" "brightblue" "blue")
64 (base1 "#93a1a1" "#81908f" "#8a8a8a" "brightcyan" "cyan")
65 (base2 "#eee8d5" "#e9e2cb" "#e4e4e4" "white" "white")
66 (base3 "#fdf6e3" "#fcf4dc" "#ffffd7" "brightwhite" "white")
67 (yellow "#b58900" "#a57705" "#af8700" "yellow" "yellow")
68 (orange "#cb4b16" "#bd3612" "#d75f00" "brightred" "red")
69 (red "#dc322f" "#c60007" "#d70000" "red" "red")
70 (magenta "#d33682" "#c61b6e" "#af005f" "magenta" "magenta")
71 (violet "#6c71c4" "#5859b7" "#5f5faf" "brightmagenta" "magenta")
72 (blue "#268bd2" "#2075c7" "#0087ff" "blue" "blue")
73 (cyan "#2aa198" "#259185" "#00afaf" "cyan" "cyan")
74 (green "#859900" "#728a05" "#5f8700" "green" "green"))
75 "This is a table of all the colors used by the Solarized color theme. Each
76 column is a different set, one of which will be chosen based on term
77 capabilities, etc.")
78
79 (defun solarized-color-definitions (mode)
80 (flet ((find-color (name)
81 (let* ((index (if window-system
82 (if solarized-degrade
83 3
84 (if solarized-broken-srgb 2 1))
85 (case (display-color-cells)
86 (16 4)
87 (8 5)
88 (otherwise 3)))))
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 (bright-bold (if solarized-bold 'normal 'bold))
108 (underline (if solarized-underline t nil))
109 (opt-under nil)
110 (italic (if solarized-italic 'italic 'normal)))
111 (when (eq 'light mode)
112 (rotatef base03 base3)
113 (rotatef base02 base2)
114 (rotatef base01 base1)
115 (rotatef base00 base0))
116 (let ((back base03))
117 (cond ((< (display-color-cells) 16)
118 (setf back nil))
119 ((eq 'high solarized-contrast)
120 (let ((orig-base3 base3))
121 (rotatef base01 base00 base0 base1 base2 base3)
122 (setf base3 orig-base3)))
123 ((eq 'low solarized-contrast)
124 (setf back base02
125 opt-under t)))
126 ;; NOTE: We try to turn an 8-color term into a 10-color term by not
127 ;; using default background and foreground colors, expecting the
128 ;; user to have the right colors set for them.
129 (let ((bg-back `(:background ,back))
130 (bg-base03 `(:background ,base03))
131 (bg-base02 `(:background ,base02))
132 (bg-base01 `(:background ,base01))
133 (bg-base00 `(:background ,base00))
134 (bg-base0 `(:background ,base0))
135 (bg-base1 `(:background ,base1))
136 (bg-base2 `(:background ,base2))
137 (bg-base3 `(:background ,base3))
138 (bg-green `(:background ,green))
139 (bg-yellow `(:background ,yellow))
140 (bg-orange `(:background ,orange))
141 (bg-red `(:background ,red))
142 (bg-magenta `(:background ,magenta))
143 (bg-violet `(:background ,violet))
144 (bg-blue `(:background ,blue))
145 (bg-cyan `(:background ,cyan))
146
147 (fg-base03 `(:foreground ,base03))
148 (fg-base02 `(:foreground ,base02))
149 (fg-base01 `(:foreground ,base01))
150 (fg-base00 `(:foreground ,base00))
151 (fg-base0 `(:foreground ,(when (<= 16 (display-color-cells))
152 base0)))
153 (fg-base1 `(:foreground ,(when (<= 16 (display-color-cells))
154 base1)))
155 (fg-base2 `(:foreground ,base2))
156 (fg-base3 `(:foreground ,base3))
157 (fg-green `(:foreground ,green))
158 (fg-yellow `(:foreground ,yellow))
159 (fg-orange `(:foreground ,orange))
160 (fg-red `(:foreground ,red))
161 (fg-magenta `(:foreground ,magenta))
162 (fg-violet `(:foreground ,violet))
163 (fg-blue `(:foreground ,blue))
164 (fg-cyan `(:foreground ,cyan))
165
166 (fmt-none `(:weight normal :slant normal :underline nil :inverse-video nil))
167 (fmt-bold `(:weight ,bold :slant normal :underline nil :inverse-video nil))
168 (fmt-bldi `(:weight ,bold :underline nil :inverse-video nil))
169 (fmt-undr `(:weight normal :slant normal :underline ,underline :inverse-video nil))
170 (fmt-undb `(:weight ,bold :slant normal :underline ,underline :inverse-video nil))
171 (fmt-undi `(:weight normal :underline ,underline :inverse-video nil))
172 (fmt-uopt `(:weight normal :slant normal :underline ,opt-under :inverse-video nil))
173 ;; FIXME: not quite the same
174 (fmt-curl `(:weight normal :slant normal :underline t :inverse-video nil))
175 (fmt-ital `(:weight normal :slant ,italic :underline nil :inverse-video nil))
176 ;; FIXME: not quite the same
177 (fmt-stnd `(:weight normal :slant normal :underline nil :inverse-video t))
178 (fmt-revr `(:weight normal :slant normal :underline nil :inverse-video t))
179 (fmt-revb `(:weight ,bold :slant normal :underline nil :inverse-video t))
180 (fmt-revbb `(:weight ,bright-bold :slant normal :underline nil :inverse-video t))
181 (fmt-revbbu `(:weight ,bright-bold :slant normal :underline ,underline :inverse-video t)))
182 `((;; basic
183 (default ((t (,@fg-base0 ,@bg-back)))) ; Normal
184 (cursor ((t (,@fg-base03 ,@bg-base0)))) ; Cursor
185 (error ((t (,@fmt-bold ,@fg-red)))) ; Error
186 (escape-glyph-face ((t (,@fg-red))))
187 (fringe ((t (,@fg-base01 ,@bg-base02))))
188 (linum ((t (,@fg-base01 ,@bg-base02))))
189 (header-line ((t (,@fg-base0 ,@bg-base02 ,@fmt-revbb)))) ; Pmenu
190 (highlight ((t (,@bg-base02))))
191 (hl-line ((t (:underline ,opt-under ,@bg-base02)))) ; CursorLine
192 (isearch ((t (,@fmt-stnd ,@fg-orange ,@bg-back)))) ; IncSearch
193 (isearch-fail ((t (,@fmt-stnd ,@fg-orange ,@bg-back)))) ; IncSearch
194 (lazy-highlight ((t (,@fmt-revr ,@fg-yellow ,@bg-back)))) ; Search
195 (link ((t (,@fmt-undr ,@fg-violet))))
196 (link-visited ((t (,@fmt-undr ,@fg-magenta))))
197 (menu ((t (,@fg-base0 ,@bg-base02))))
198 (minibuffer-prompt ((t (,@fmt-bold ,@fg-cyan)))) ; Question
199 (mode-line ; StatusLine
200 ((t (,@fg-base1 ,@bg-base02 ,@fmt-revbb :box nil))))
201 (mode-line-inactive ; StatusLineNC
202 ((t (,@fg-base00 ,@bg-base02 ,@fmt-revbb :box nil))))
203 (region ((t (,@fg-base01 ,@bg-base03 ,@fmt-revbb)))) ; Visual
204 (secondary-selection ((t (,@bg-base02))))
205 (shadow ((t (,@fg-base01))))
206 (trailing-whitespace ((t (,@fmt-revr ,@fg-red))))
207 (vertical-border ((t (,@fg-base0))))
208 ;; comint
209 (comint-highlight-prompt ((t (,@fg-blue))))
210 ;; compilation
211 (compilation-info ((t (,@fmt-bold ,@fg-green))))
212 (compilation-warning ((t (,@fmt-bold ,@fg-orange))))
213 ;; custom
214 (custom-button
215 ((t (,@fg-base1 ,@bg-base02
216 :box (:line-width 2 :style released-button)))))
217 (custom-button-mouse
218 ((t (,@fmt-revr ,@fg-base1 ,@bg-base02 :inherit custom-button))))
219 (custom-button-pressed
220 ((t (,@fmt-revr ,@fg-base1 ,@bg-base02
221 :box (:line-width 2 :style pressed-button)
222 :inherit custom-button-mouse))))
223 (custom-changed ((t (,@fmt-revr ,@fg-blue ,@bg-base3))))
224 (custom-comment ((t (,@fg-base1 ,@bg-base02))))
225 (custom-comment-tag ((t (,@fg-base1 ,@bg-base02))))
226 (custom-documentation ((t (:inherit default))))
227 (custom-group-tag ((t (,@fg-base1))))
228 (custom-group-tag-1 ((t (,fmt-bold ,@fg-base1))))
229 (custom-invalid ((t (,@fmt-revr ,@fg-red ,@bg-back))))
230 (custom-link ((t (,@fg-violet))))
231 (custom-state ((t (,@fg-green))))
232 (custom-variable-tag ((t (,@fg-base1))))
233 ;; diff - DiffAdd, DiffChange, DiffDelete, and DiffText
234 ,@(case solarized-diff-mode
235 (high
236 `((diff-added ((t (,@fmt-revr ,@fg-green))))
237 (diff-changed ((t (,@fmt-revr ,@fg-yellow))))
238 (diff-removed ((t (,@fmt-revr ,@fg-red))))
239 (diff-refine-change
240 ((t (,@fmt-revr ,@fg-blue ,@bg-back))))))
241 (low
242 `((diff-added ((t (,@fmt-undr ,@fg-green))))
243 (diff-changed ((t (,@fmt-undr ,@fg-yellow))))
244 (diff-removed ((t (,@fmt-bold ,@fg-red))))
245 (diff-refine-change
246 ((t (,@fmt-undr ,@fg-blue ,@bg-back))))))
247 (normal
248 (if window-system
249 `((diff-added ((t (,@fmt-bold ,@fg-green))))
250 (diff-changed ((t (,@fmt-bold ,@fg-yellow))))
251 (diff-removed ((t (,@fmt-bold ,@fg-red))))
252 (diff-refine-change
253 ((t (,@fmt-bold ,@fg-blue ,@bg-back)))))
254 `((diff-added ((t (,@fg-green))))
255 (diff-changed ((t (,@fg-yellow))))
256 (diff-removed ((t (,@fg-red))))
257 (diff-refine-change ((t (,@fg-blue ,@bg-back))))))))
258 (diff-file-header ((t (,@bg-back))))
259 (diff-header ((t (,@fg-base1 ,@bg-back))))
260 ;; IDO
261 (ido-only-match ((t (,@fg-green))))
262 (ido-subdir ((t (,@fg-blue))))
263 (ido-first-match ((t (,@fmt-bold ,@fg-green))))
264 ;; emacs-wiki
265 (emacs-wiki-bad-link-face ((t (,@fmt-undr ,@fg-red))))
266 (emacs-wiki-link-face ((t (,@fmt-undr ,@fg-blue))))
267 (emacs-wiki-verbatim-face ((t (,@fmt-undr ,@fg-base00))))
268 ;; eshell
269 (eshell-ls-archive ((t (,@fg-magenta))))
270 (eshell-ls-backup ((t (,@fg-yellow))))
271 (eshell-ls-clutter ((t (,@fg-orange))))
272 (eshell-ls-directory ((t (,@fg-blue)))) ; Directory
273 (eshell-ls-executable ((t (,@fg-green))))
274 (eshell-ls-missing ((t (,@fg-red))))
275 (eshell-ls-product ((t (,@fg-yellow))))
276 (eshell-ls-readonly ((t (,@fg-base1))))
277 (eshell-ls-special ((t (,@fg-violet))))
278 (eshell-ls-symlink ((t (,@fg-cyan))))
279 (eshell-ls-unreadable ((t (,@fg-base00))))
280 (eshell-prompt ((t (,@fmt-bold ,@fg-green))))
281 ;; font-lock
282 (font-lock-builtin-face ((t (,@fmt-none ,@fg-green)))) ; Statement
283 (font-lock-comment-face ((t (,@fmt-ital ,@fg-base01)))) ; Comment
284 (font-lock-constant-face ((t (,@fmt-none ,@fg-cyan)))) ; Constant
285 (font-lock-function-name-face ; Identifier
286 ((t (,@fmt-none ,@fg-blue))))
287 (font-lock-keyword-face ((t (,@fmt-none ,@fg-green)))) ; Statement
288 (font-lock-string-face ((t (,@fmt-none ,@fg-cyan)))) ; Constant
289 (font-lock-type-face ((t (,@fmt-none ,@fg-yellow)))) ; Type
290 (font-lock-variable-name-face ; Identifier
291 ((t (,@fmt-none ,@fg-blue))))
292 (font-lock-warning-face ((t (,@fmt-bold ,@fg-red)))) ; Error
293 (font-lock-doc-face ((t (,@fmt-ital ,@fg-base01)))) ; Comment
294 (font-lock-doc-string-face ; Comment (XEmacs-only)
295 ((t (,@fmt-ital ,@fg-base01))))
296 (font-lock-color-constant-face ((t (,@fmt-none ,@fg-green))))
297 (font-lock-comment-delimiter-face ; Comment
298 ((t (,@fmt-ital ,@fg-base01))))
299 (font-lock-preprocessor-face ; PreProc
300 ((t (,@fmt-none ,@fg-orange))))
301 (font-lock-reference-face ((t (,@fmt-none ,@fg-cyan))))
302 (font-lock-negation-char-face ((t (,@fmt-none ,@fg-red))))
303 (font-lock-other-type-face ((t (,@fmt-ital ,@fg-blue))))
304 (font-lock-regexp-grouping-construct
305 ((t (,@fmt-none ,@fg-orange))))
306 (font-lock-special-keyword-face ; Special
307 ((t (,@fmt-none ,@fg-red))))
308 (font-lock-exit-face ((t (,@fmt-none ,@fg-red))))
309 (font-lock-other-emphasized-face ((t (,@fmt-bldi ,@fg-violet))))
310 (font-lock-regexp-grouping-backslash
311 ((t (,@fmt-none ,@fg-yellow))))
312 ;; info
313 (info-xref ((t (,@fmt-undr ,@fg-blue))))
314 (info-xref-visited ((t (,@fg-magenta :inherit info-xref))))
315 ;; org
316 (org-hide ((t (,@fg-base03))))
317 (org-todo ((t (,@fmt-bold ,@fg-base03 ,@bg-red))))
318 (org-done ((t (,@fmt-bold ,@fg-green))))
319 (org-todo-kwd-face ((t (,@fg-red ,@bg-base03))))
320 (org-done-kwd-face ((t (,@fg-green ,@bg-base03))))
321 (org-project-kwd-face ((t (,@fg-violet ,@bg-base03))))
322 (org-waiting-kwd-face ((t (,@fg-orange ,@bg-base03))))
323 (org-someday-kwd-face ((t (,@fg-blue ,@bg-base03))))
324 (org-started-kwd-face ((t (,@fg-yellow ,@bg-base03))))
325 (org-cancelled-kwd-face ((t (,@fg-green ,@bg-base03))))
326 (org-delegated-kwd-face ((t (,@fg-cyan ,@bg-base03))))
327 ;; table
328 (table-cell ((t (,@fmt-none ,@fg-base0 ,@bg-back))))
329 ;; outline - pandocBlockQuoteLeader*
330 (outline-1 ((t (,@fmt-none ,@fg-blue))))
331 (outline-2 ((t (,@fmt-none ,@fg-cyan))))
332 (outline-3 ((t (,@fmt-none ,@fg-yellow))))
333 (outline-4 ((t (,@fmt-none ,@fg-red))))
334 (outline-5 ((t (,@fmt-none ,@fg-base0))))
335 (outline-6 ((t (,@fmt-none ,@fg-base01))))
336 (outline-7 ((t (,@fmt-none ,@fg-orange))))
337 (outline-8 ((t (,@fmt-none ,@fg-violet))))
338 ;; speedbar
339 (speedbar-button-face ((t (,@fmt-none ,@fg-base1))))
340 (speedbar-directory-face ((t (,@fmt-none ,@fg-orange))))
341 (speedbar-file-face ((t (,@fmt-none ,@fg-green))))
342 (speedbar-highlight-face ((t (,@bg-base02))))
343 (speedbar-selected-face ((t (,@fmt-undr ,@fg-yellow))))
344 (speedbar-separator-face ((t (,@fmt-stnd))))
345 (speedbar-tag-face ((t (,@fmt-none ,@fg-blue))))
346 ;; show-paren - MatchParen
347 (show-paren-match ((t (,@fmt-bold ,@fg-cyan ,@bg-base02))))
348 (show-paren-mismatch ((t (,@fmt-bold ,@fg-red ,@bg-base01))))
349 ;; widgets
350 (widget-field
351 ((t (,@fg-base1 ,@bg-base02 :box (:line-width 1)
352 :inherit default))))
353 (widget-single-line-field ((t (:inherit widget-field))))
354 ;; extra modules
355 ;; -------------
356 ;; bm visual bookmarks
357 (bm-fringe-face ((t (,@bg-orange ,@fg-base03))))
358 (bm-fringe-persistent-face ((t (,@bg-blue ,@fg-base03))))
359 ;; Flymake
360 (flymake-errline ((t (,@fmt-revr ,@fg-red ,@bg-back)))) ; ErrorMsg
361 (flymake-warnline ; WarningMsg
362 ((t (,@fmt-bold ,@fg-red ,@bg-back))))
363 ;; column-marker
364 (column-marker-1 ((t (,@bg-base01))))
365 (column-marker-2 ((t (,@bg-cyan))))
366 (column-marker-3 ((t (,@bg-violet))))
367 ;; jabber
368 (jabber-activity-face ((t (,@fmt-bold ,@fg-red))))
369 (jabber-activity-personal-face ((t (,@fmt-bold ,@fg-blue))))
370 (jabber-chat-error ((t (,@fmt-bold ,@fg-red))))
371 (jabber-chat-prompt-foreign ((t (,@fmt-bold ,@fg-red))))
372 (jabber-chat-prompt-local ((t (,@fmt-bold ,@fg-blue))))
373 (jabber-chat-prompt-system ((t (,@fmt-bold ,@fg-green))))
374 (jabber-chat-text-foreign ((t (,@fg-base1))))
375 (jabber-chat-text-local ((t (,@fg-base0))))
376 (jabber-chat-rare-time-face ((t (,@fmt-undr ,@fg-green))))
377 (jabber-roster-user-away ((t (,@fmt-ital ,@fg-green))))
378 (jabber-roster-user-chatty ((t (,@fmt-bold ,@fg-orange))))
379 (jabber-roster-user-dnd ((t (,@fmt-ital ,@fg-red))))
380 (jabber-roster-user-error ((t (:weight light :slant italic ,@fg-red))))
381 (jabber-roster-user-offline ((t (,@fg-base01))))
382 (jabber-roster-user-online ((t (,@fmt-bold ,@fg-blue))))
383 (jabber-roster-user-xa ((t (,@fmt-ital ,@fg-magenta))))
384 ;; git-gutter
385 (git-gutter:modified ((t (,@fg-violet))))
386 (git-gutter:added ((t (,@fg-green))))
387 (git-gutter:deleted ((t (,@fg-red))))
388 ;; gnus - these are taken from mutt, not VIM
389 (gnus-cite-1 ((t (,@fmt-none ,@fg-blue)))) ; quoted
390 (gnus-cite-2 ((t (,@fmt-none ,@fg-cyan)))) ; quoted1
391 (gnus-cite-3 ((t (,@fmt-none ,@fg-yellow)))) ; quoted2
392 (gnus-cite-4 ((t (,@fmt-none ,@fg-red)))) ; quoted3
393 (gnus-cite-5 ((t (,@fmt-none ,@fg-orange)))) ; quoted4
394 (gnus-cite-6 ((t (,@fmt-none ,@fg-violet))))
395 (gnus-cite-7 ((t (,@fmt-none ,@fg-green))))
396 (gnus-cite-8 ((t (,@fmt-none ,@fg-magenta))))
397 (gnus-cite-9 ((t (,@fmt-none ,@fg-base00))))
398 (gnus-cite-10 ((t (,@fmt-none ,@fg-base01))))
399 (gnus-cite-11 ((t (,@fmt-none ,@fg-base02))))
400 (gnus-group-mail-1 ((t (,@fmt-bold ,@fg-base3))))
401 (gnus-group-mail-1-empty ((t (,@fg-base3))))
402 (gnus-group-mail-2 ((t (,@fmt-bold ,@fg-base2))))
403 (gnus-group-mail-2-empty ((t (,@fg-base2))))
404 (gnus-group-mail-3 ((t (,@fmt-bold ,@fg-magenta))))
405 (gnus-group-mail-3-empty ((t (,@fg-magenta))))
406 (gnus-group-mail-low ((t (,@fmt-bold ,@fg-base00))))
407 (gnus-group-mail-low-empty ((t (,@fg-base00))))
408 (gnus-group-news-1 ((t (,@fmt-bold ,@fg-base1))))
409 (gnus-group-news-1-empty ((t (,@fg-base1))))
410 (gnus-group-news-2 ((t (,@fmt-bold ,@fg-blue))))
411 (gnus-group-news-2-empty ((t (,@fg-blue))))
412 (gnus-group-news-low ((t (,@fmt-bold ,@fg-violet))))
413 (gnus-group-news-low-empty ((t (,@fg-violet))))
414 (gnus-emphasis-highlight-words ; highlight
415 ((t (,@fmt-none ,fg-yellow))))
416 (gnus-header-content ((t (,@fmt-none ,@fg-base01)))) ; hdrdefault
417 (gnus-header-from ((t (,@fmt-none ,@fg-base00)))) ; header ^From
418 (gnus-header-name ((t (,@fmt-none ,@fg-base01)))) ; hdrdefault
419 (gnus-header-newsgroups ; hdrdefault
420 ((t (,@fmt-none ,@fg-base02))))
421 (gnus-header-subject ; header ^Subject
422 ((t (,@fmt-none ,@fg-blue))))
423 (gnus-server-agent ((t (,@fmt-bold ,@fg-base3))))
424 (gnus-server-closed ((t (,@fmt-ital ,@fg-base1))))
425 (gnus-server-denied ((t (,@fmt-bold ,@fg-base2))))
426 (gnus-server-offline ((t (,@fmt-bold ,@fg-green))))
427 (gnus-server-opened ((t (,@fmt-bold ,@fg-cyan))))
428 (gnus-signature ((t (,@fmt-none ,@fg-base01)))) ; signature
429 (gnus-splash ((t (,@fg-base2))))
430 (gnus-summary-cancelled ; deleted messages
431 ((t (,@fmt-none ,@fg-red))))
432 (gnus-summary-high-ancient
433 ((t (,@fmt-bold :inherit gnus-summary-normal-ancient))))
434 (gnus-summary-high-read
435 ((t (,@fmt-bold :inherit gnus-summary-normal-read))))
436 (gnus-summary-high-ticked
437 ((t (,@fmt-bold :inherit gnus-summary-normal-ticked))))
438 (gnus-summary-high-undownloaded
439 ((t (,@fmt-bold :inherit gnus-summary-normal-undownloaded))))
440 (gnus-summary-high-unread
441 ((t (,@fmt-bold :inherit gnus-summary-normal-unread))))
442 (gnus-summary-low-ancient
443 ((t (,@fmt-ital :inherit gnus-summary-normal-ancient))))
444 (gnus-summary-low-read
445 ((t (,@fmt-ital :inherit gnus-summary-normal-ancient))))
446 (gnus-summary-low-unread
447 ((t (,@fmt-ital :inherit gnus-summary-normal-unread))))
448 (gnus-summary-low-ticked
449 ((t (,@fmt-ital :inherit gnus-summary-normal-ancient))))
450 (gnus-summary-low-undownloaded
451 ((t (,@fmt-ital :inherit gnus-summary-normal-ancient))))
452 (gnus-summary-normal-ancient ; old messages
453 ((t (,@fmt-none ,@fg-blue))))
454 (gnus-summary-normal-read ; read messages
455 ((t (,@fmt-none ,@fg-base01))))
456 (gnus-summary-normal-ticked ; flagged
457 ((t (,@fmt-none ,@fg-red))))
458 (gnus-summary-normal-undownloaded ((t (,@fmt-none ,@fg-base2))))
459 (gnus-summary-normal-unread ; unread messages
460 ((t (,@fmt-none ,@fg-blue))))
461 (gnus-summary-selected ; indicator
462 ((t (,@fmt-none ,@fg-base03 ,@bg-yellow))))
463 ;; Message
464 (message-mml ((t (,@fg-blue))))
465 (message-cited-text ((t (,@fg-base2))))
466 (message-separator ((t (,@fg-base3))))
467 (message-header-xheader ((t (,@fg-violet))))
468 (message-header-name ((t (,@fg-cyan))))
469 (message-header-other ((t (,@fg-red))))
470 (message-header-newsgroups ((t (,@fmt-bldi ,@fg-yellow))))
471 (message-header-subject ((t (,@fg-base00))))
472 (message-header-cc ((t (,@fmt-bold ,@fg-green))))
473 (message-header-to ((t (,@fmt-bold ,@fg-base1))))
474 ;; parenface
475 (paren-face ((t (,@fg-base01))))
476 ;; rainbow-delimiters
477 (rainbow-delimiters-depth-1-face ((t (,@fg-cyan))))
478 (rainbow-delimiters-depth-2-face ((t (,@fg-yellow))))
479 (rainbow-delimiters-depth-3-face ((t (,@fg-blue))))
480 (rainbow-delimiters-depth-4-face ((t (,@fg-red))))
481 (rainbow-delimiters-depth-5-face ((t (,@fg-green))))
482 (rainbow-delimiters-depth-6-face ((t (,@fg-blue))))
483 (rainbow-delimiters-depth-7-face ((t (,@fg-orange))))
484 (rainbow-delimiters-depth-8-face ((t (,@fg-magenta))))
485 (rainbow-delimiters-depth-9-face ((t (,@fg-base0))))
486 ;; slime
487 (slime-error-face ((t (,@fmt-revr ,@fg-red)))) ; ErrorMsg
488 (slime-note-face ((t (,@fg-yellow))))
489 (slime-repl-inputted-output-face ((t (,@fg-red))))
490 (slime-repl-output-mouseover-face ((t (:box (:color ,base3)))))
491 (slime-style-warning-face ((t (,@fmt-bold ,@fg-orange))))
492 (slime-warning-face ((t (,@fmt-bold ,@fg-red)))) ; WarningMsg
493 ;; whitespace
494 (whitespace-empty ((t (,@fg-red))))
495 (whitespace-hspace ((t (,@fg-orange))))
496 (whitespace-indentation ((t (,@fg-base02))))
497 (whitespace-space ((t (,@fg-base02))))
498 (whitespace-space-after-tab ((t (,@fg-cyan))))
499 (whitespace-space-before-tab ((t (,@fmt-bold ,@fg-red))))
500 (whitespace-tab ((t (,@fg-base02))))
501 (whitespace-trailing ((t (,@fmt-bold ,@fg-red ,@bg-base02))))
502 (whitespace-highlight-face ((t (,@fg-red ,@bg-blue))))
503 (whitespace-line ((t (,@fg-magenta ,@bg-base03))))
504 ;; rcirc
505 (rcirc-my-nick ((t (:foreground ,blue))))
506 (rcirc-nick-in-message ((t (:foreground ,orange))))
507 (rcirc-other-nick ((t (:foreground ,green))))
508 (rcirc-prompt ((t (:foreground ,yellow))))
509 (rcirc-bright-nick ((t (:foreground ,magenta))))
510 (rcirc-server ((t (:foreground ,base1))))
511 (rcirc-timestamp ((t (:foreground ,base01))))
512 ;; ERC
513 (erc-input-face ((t (:foreground ,base01))))
514 (erc-keyword-face ((t (,@fmt-bldi ,@fg-yellow))))
515 (erc-my-nick-face ((t (:foreground ,blue))))
516 (erc-nick-default-face ((t (,@fmt-none ,@fg-cyan))))
517 (erc-notice-face ((t (,@fmt-none ,@fg-blue))))
518 (erc-timestamp-face ((t (:foreground ,base01))))
519 ;;font-latex
520 (font-latex-warning-face ((t (,@fg-red))))
521 (font-latex-sectioning-5-face ((t (,@fg-violet))))
522 ;;flyspell
523 (flyspell-incorrect ((t (,@fg-red))))
524 (flyspell-duplicate ((t (,@fg-yellow))))
525 ;;ansi-term
526 (term-color-black ((t ( ,@fg-base02))))
527 (term-color-red ((t ( ,@fg-red))))
528 (term-color-green ((t ( ,@fg-green))))
529 (term-color-yellow ((t ( ,@fg-yellow))))
530 (term-color-blue ((t ( ,@fg-blue))))
531 (term-color-magenta ((t ( ,@fg-magenta))))
532 (term-color-cyan ((t ( ,@fg-cyan))))
533 (term-color-white ((t ( ,@fg-base00)))))
534
535 ((foreground-color . ,(when (<= 16 (display-color-cells)) base0))
536 (background-color . ,back)
537 (background-mode . ,mode)
538 (cursor-color . ,(when (<= 16 (display-color-cells))
539 base0))
540 (ansi-color-names-vector . [,base02 ,red ,green ,yellow ,blue ,magenta ,cyan ,base00]))))))))
541
542 (defmacro create-solarized-theme (mode)
543 (let* ((theme-name (intern (concat "solarized-" (symbol-name mode))))
544 (defs (solarized-color-definitions mode))
545 (theme-vars (mapcar (lambda (def) (list (car def) (cdr def)))
546 (second defs)))
547 (theme-faces (first defs)))
548 `(progn
549 (deftheme ,theme-name ,solarized-description)
550 (apply 'custom-theme-set-variables ',theme-name ',theme-vars)
551 (apply 'custom-theme-set-faces ',theme-name ',theme-faces)
552 (provide-theme ',theme-name))))
553
554 ;;;###autoload
555 (when (boundp 'custom-theme-load-path)
556 (add-to-list 'custom-theme-load-path
557 (file-name-as-directory (file-name-directory load-file-name))))
558
559 (provide 'solarized-definitions)