forked from emacsfodder/emacs-purple-haze-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
purple-haze-theme.el
258 lines (208 loc) · 9.52 KB
/
purple-haze-theme.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
;;; purple-haze-theme.el --- an overtly purple color theme for Emacs24.
;;
;; Author: Jason Milkins <[email protected]>
;; Url: https://github.com/jasonm23/emacs-purple-haze-theme
;; Version: 20130905.2211
;; Package-Requires: ((emacs "24.0"))
;;
;;; Changelog:
;; 20130905.2211 : Fix rainbow mode invoke
;; 20130905.2200 : Updated headers - fixed borkage
;;
;; 20130905.2140 : Add support for flymake, git-gutter, diff, magit and
;; compilation mode (implicitly *grep* buffers) Updated
;; iSearch/Lazy Highlight/Match, also added error and warn
;; as explicit face themes. Rainbow Delimiters also
;; updated.
;;
;; 0.0.7 : switch on rainbow-mode when editing
;;
;; 0.0.6 : changed powerline/main-line colors
;;
;; 0.0.5 : add support for powerline and main-line
;;
;; 0.0.4 : auto add to custom load path on init
;;
;; 0.0.3 : initial public version
;;
;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, version 3 of the License.
;;
;; This file is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs.
;;
;; This file is not a part of Emacs
;;
;;
;;; Commentary:
;;
;; Purple haze is an overtly purple theme, with support for flymake,
;; git-gutter, magit, diff, cua, isearch, font-lock and a little more.
;; Listening to All along the watchtower is not mandatory, although
;; the Jimi Hendrix version is recommended.
;;; Code:
(unless (>= 24 emacs-major-version)
(error "purple-haze-theme requires Emacs 24 or later."))
(deftheme purple-haze
"purple-haze-theme By: Jason Milkins - emacsfodder.github.com")
(custom-theme-set-variables
'purple-haze
'(main-line-color1 "#191919")
'(main-line-color2 "#111111")
'(powerline-color1 "#191919")
'(powerline-color2 "#111111")
'(fringe-mode 6 nil (fringe))
'(linum-format " %7d ")
)
(custom-theme-set-faces
'purple-haze
'(default
(
(((class color) (min-colors 16777216)) (:foreground "#fff" :background "#120F14"))
(((class color) (min-colors 88)) (:foreground "#fff" :background "#000"))
)
)
'(fixed-pitch
((t (:family "Monospace"))))
'(variable-pitch
((t (:family "Sans Serif"))))
'(escape-glyph ;; Things like and other control chars.
((t (:foreground "#d96e26" :background "#211d3c"))))
;; Line Numbers (linum-mode)
'(linum
(
(((class color) (min-colors 16777216)) (:background "#151019" :foreground "#403047" :box nil :height 100))
(((class color) (min-colors 88)) (:background "#202020" :foreground "#505f89" :box nil :height 100)))
)
;; Margin Fringes
'(fringe
((t ( :background "#201520" :Foreground "#506080" ))))
;; Mode-line / status line
'(mode-line
((t (:background "#2b283d" :box nil :foreground "#8c86e4" :height 85))))
'(mode-line-inactive
((t (:weight light :box nil :background "#202339" :foreground "#000000" :inherit (mode-line)))))
'(mode-line-emphasis ((t (:weight bold))))
'(mode-line-highlight ((t (:box nil (t (:inherit (highlight)))))))
'(mode-line-buffer-id ((t (:weight bold :box nil))))
;; Cursor
'(cursor ((t (:foreground "#ffffff" :background "#d96e26"))))
'(error ((t (:foreground "#cc3333" ))))
'(warning ((t (:foreground "#d96e26"))))
'(flymake-errline
((t (:underline "#cc3333" :foreground nil :background nil ))))
'(flymake-infoline
((t (:underline "DarkGreen" :foreground nil :background nil))))
'(flymake-warnline
((t (:underline "#FF6600" :foreground nil :background nil))))
'(git-gutter:added
((t (:foreground "#609f60" :bold t))))
'(git-gutter:modified
((t (:foreground "#E09aF0" :bold t))))
'(git-gutter:deleted
((t (:foreground "#cc3333" :bold t))))
'(magit-item-highlight ((t (:foreground "white" :background "#514b6c"))))
'(cua-rectangle ((t (:background "#514b6c"))))
'(diff-added ((t (:background "#132013"))))
'(diff-removed ((t (:background "#290a0a"))))
'(diff-file-header ((t (:background "#362145"))))
'(diff-context ((t (:foreground "#E0E4CC"))))
'(diff-hunk-header ((t (:background "#242130"))))
'(compilation-info ((t (:foreground "#a09aF0"))))
;; Minibuffer
'(minibuffer-prompt
((t (:weight bold :foreground "#606a92"))))
'(minibuffer-message
((t (:foreground "#ffffff"))))
;; Region
'(region
((t (:background "#1F102f"))))
;; Secondary region
'(secondary-selection
((((class color) (min-colors 88) (background dark)) (:background "#444083"))))
;; font-lock - syntax
'(font-lock-builtin-face ((t (:foreground "#606590"))))
'(font-lock-comment-face ((t (:foreground "#505f89"))))
'(font-lock-comment-delimiter-face ((t (:foreground "#7078a2" ))))
'(font-lock-doc-face ((t (:inherit (font-lock-string-face)))))
'(font-lock-function-name-face ((t (:foreground "#8083be"))))
'(font-lock-keyword-face ((t (:foreground "#aa8da7"))))
'(font-lock-negation-char-face ((t nil)))
'(font-lock-preprocessor-face ((t (:inherit (font-lock-builtin-face)))))
'(font-lock-regexp-grouping-backslash ((t (:inherit (bold)))))
'(font-lock-regexp-grouping-construct ((t (:inherit (bold)))))
'(font-lock-string-face ((t (:foreground "#a0adee"))))
'(font-lock-constant-face ((t (:foreground "#9a99e7"))))
'(font-lock-type-face ((t (:foreground "#5f5e8a"))))
'(font-lock-variable-name-face ((t (:foreground "#8e8eb8"))))
'(font-lock-warning-face ((t (:weight bold :foreground "#FF0000"))))
;; Hightlight
'(highlight
((((class color) (min-colors 88) (background light)) (:background "#503453"))
(((class color) (min-colors 88) (background dark)) (:background "#503450"))))
'(shadow
((((class color grayscale) (min-colors 88) (background light)) (:foreground "#999999"))
(((class color grayscale) (min-colors 88) (background dark)) (:foreground "#999999"))))
'(trailing-whitespace
((((class color) (background light)) (:background "#ff0000"))
(((class color) (background dark)) (:background "#ff0000")) (t (:inverse-video t))))
'(link (
(((class color) (min-colors 88) (background light)) (:underline t :foreground "#f0b7f0"))
(((class color) (background light)) (:underline t :foreground "#a044a0"))
(((class color) (min-colors 88) (background dark)) (:underline t :foreground "#a069aa"))
(((class color) (background dark)) (:underline t :foreground "#a069aa")) (t (:inherit (underline)))))
'(link-visited ((default (:inherit (link)))
(((class color) (background light)) (:inherit (link)))
(((class color) (background dark)) (:inherit (link)))))
'(button ((t (:inherit (link)))))
'(tooltip ((t (:foreground "#FFFFFF" :background "#5f5e8a" ))))
'(isearch
((((class color) (min-colors 88) (background light)) (:foreground "white" :background "#5533AA"))
(((class color) (min-colors 88) (background dark)) (:foreground "white" :background "#5533AA"))
(t (:inverse-video t))))
'(isearch-fail
((((class color) (min-colors 88) (background light)) (:foreground "#000000" :background "#ffaaaa"))
(((class color) (min-colors 88) (background dark)) (:foreground "#000000" :background "#880000"))
(((class color grayscale)) (:foreground "#888888"))
(t (:inverse-video t))))
'(lazy-highlight
((((class color) (min-colors 88) (background light)) (:foreground "white" :background "#331144"))
(((class color) (min-colors 88) (background dark)) (:foreground "#CCCCCC" :background "#331144"))))
'(match
((((class color) (min-colors 88) (background light)) (:foreground "black" :background "#5c2e7a"))
(((class color) (min-colors 88) (background dark)) (:foreground "white" :background "#5c2e7a"))
(((type tty) (class mono)) (:inverse-video t))
(t (:background "#888888"))))
'(next-error ((t (:inherit (region)))))
'(query-replace ((t (:inherit (isearch)))))
)
;; Rainbow delimiters
(defun purple-haze-rainbow-delim-set-face ()
(set-face-attribute 'rainbow-delimiters-depth-1-face nil :foreground "#a9f" )
(set-face-attribute 'rainbow-delimiters-depth-2-face nil :foreground "#959" )
(set-face-attribute 'rainbow-delimiters-depth-3-face nil :foreground "#749" )
(set-face-attribute 'rainbow-delimiters-depth-4-face nil :foreground "#639" )
(set-face-attribute 'rainbow-delimiters-depth-5-face nil :foreground "#636" )
(set-face-attribute 'rainbow-delimiters-depth-6-face nil :foreground "#535" )
(set-face-attribute 'rainbow-delimiters-depth-7-face nil :foreground "#424" )
(set-face-attribute 'rainbow-delimiters-depth-8-face nil :foreground "#646" )
(set-face-attribute 'rainbow-delimiters-depth-9-face nil :foreground "#979" )
(set-face-attribute 'rainbow-delimiters-unmatched-face nil :foreground "#F00" ))
(eval-after-load "rainbow-delimiters" '(purple-haze-rainbow-delim-set-face))
;; Add to custom-theme-load-path
;;;###autoload
(when (and (boundp 'custom-theme-load-path) load-file-name)
(add-to-list 'custom-theme-load-path
(file-name-as-directory (file-name-directory load-file-name))))
(provide-theme 'purple-haze)
;; Local Variables:
;; eval: (when (fboundp 'rainbow-mode) (rainbow-mode +1))
;; End:
;;; purple-haze-theme.el ends here