-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
ef-dark-theme.el
351 lines (279 loc) · 9.83 KB
/
ef-dark-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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
;;; ef-dark-theme.el --- Legible dark theme with blue, magenta, cyan, purple colors -*- lexical-binding:t -*-
;; Copyright (C) 2022-2024 Free Software Foundation, Inc.
;; Author: Protesilaos Stavrou <[email protected]>
;; Maintainer: Protesilaos Stavrou <[email protected]>
;; URL: https://github.com/protesilaos/ef-themes
;; Keywords: faces, theme, accessibility
;; This file is NOT part of GNU Emacs.
;; GNU Emacs 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, either version 3 of the License, or
;; (at your option) any later version.
;;
;; GNU Emacs 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. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;;
;; The `ef-themes' are a collection of light and dark themes for GNU
;; Emacs whose goal is to provide colorful ("pretty") yet legible
;; options for users who want something with a bit more flair than the
;; `modus-themes' (also designed by me).
;;; Code:
(eval-and-compile
(require 'ef-themes)
;;;###theme-autoload
(deftheme ef-dark
"Legible dark theme with blue, magenta, cyan, purple colors."
:background-mode 'dark
:kind 'color-scheme
:family 'ef)
(defconst ef-dark-palette
'(
;;; Basic values
(bg-main "#000000")
(fg-main "#d0d0d0")
(bg-dim "#1a1a1a")
(fg-dim "#857f8f")
(bg-alt "#2b2b2b")
(fg-alt "#89afef")
(bg-active "#4b4b4b")
(bg-inactive "#121212")
;;; Basic hues for foreground values
(red "#ef6560")
(red-warmer "#f47360")
(red-cooler "#ff5a7a")
(red-faint "#d56f72")
(green "#0faa26")
(green-warmer "#6aad0f")
(green-cooler "#00a692")
(green-faint "#61a06c")
(yellow "#bf9032")
(yellow-warmer "#d1843f")
(yellow-cooler "#df8a5a")
(yellow-faint "#cf9f8f")
(blue "#3f95f6")
(blue-warmer "#6a9fff")
(blue-cooler "#029fff")
(blue-faint "#7a94df")
(magenta "#d369af")
(magenta-warmer "#e580ea")
(magenta-cooler "#af85ff")
(magenta-faint "#c58faf")
(cyan "#4fbaef")
(cyan-warmer "#6fafff")
(cyan-cooler "#1dbfcf")
(cyan-faint "#8aa0df")
;;; Basic hues for background values
(bg-red-intense "#b02930")
(bg-green-intense "#337133")
(bg-yellow-intense "#8f5040")
(bg-blue-intense "#4648d0")
(bg-magenta-intense "#804fdd")
(bg-cyan-intense "#2270cf")
(bg-red-subtle "#72002a")
(bg-green-subtle "#00422a")
(bg-yellow-subtle "#603000")
(bg-blue-subtle "#2f2f74")
(bg-magenta-subtle "#572060")
(bg-cyan-subtle "#004065")
;;; Diffs
(bg-added "#00381f")
(bg-added-faint "#002910")
(bg-added-refine "#034f2f")
(fg-added "#a0e0a0")
(bg-changed "#363300")
(bg-changed-faint "#2a1f00")
(bg-changed-refine "#4a4a00")
(fg-changed "#efef80")
(bg-removed "#4f1119")
(bg-removed-faint "#380a0f")
(bg-removed-refine "#781a1f")
(fg-removed "#ffbfbf")
;;; Graphs
(bg-graph-red-0 "#b52c2c")
(bg-graph-red-1 "#702020")
(bg-graph-green-0 "#0fed00")
(bg-graph-green-1 "#007800")
(bg-graph-yellow-0 "#f1e00a")
(bg-graph-yellow-1 "#b08940")
(bg-graph-blue-0 "#2fafef")
(bg-graph-blue-1 "#1f2f8f")
(bg-graph-magenta-0 "#bf94fe")
(bg-graph-magenta-1 "#5f509f")
(bg-graph-cyan-0 "#47dfea")
(bg-graph-cyan-1 "#00808f")
;;; Special hues
(bg-mode-line "#2a2a75")
(fg-mode-line "#e0e0ff")
(bg-completion "#0f2d4a")
(bg-hover "#004a5f")
(bg-hover-secondary "#551f5a")
(bg-hl-line "#002435")
(bg-paren "#20577a")
(bg-err "#461210") ; check with err
(bg-warning "#3a3004") ; check with warning
(bg-info "#10350a") ; check with info
(border "#4f4f5f")
(cursor "#ff76ff")
(fg-intense "#ffffff")
(modeline-err "#ff80af")
(modeline-warning "#dfcf33")
(modeline-info "#2fc82f")
(underline-err "#df2f2f")
(underline-warning "#c0b000")
(underline-info "#22b022")
(bg-char-0 "#0050af")
(bg-char-1 "#7f1f7f")
(bg-char-2 "#625a00")
;;; Mappings
;;;; General mappings
(bg-fringe unspecified)
(fg-fringe unspecified)
(err red-warmer)
(warning yellow)
(info green)
(link cyan)
(link-alt magenta)
(name blue-warmer)
(keybind blue-cooler)
(identifier magenta-faint)
(prompt green-cooler)
(bg-region "#2a234a")
(fg-region unspecified)
;;;; Code mappings
(builtin magenta)
(comment yellow-faint)
(constant blue-cooler)
(fnname magenta-warmer)
(keyword magenta-cooler)
(preprocessor red)
(docstring cyan-faint)
(string blue-warmer)
(type green-cooler)
(variable cyan-cooler)
(rx-escape green-warmer) ; compare with `string'
(rx-construct red)
;;;; Accent mappings
(accent-0 blue)
(accent-1 magenta-warmer)
(accent-2 green-cooler)
(accent-3 red)
;;;; Date mappings
(date-common green-cooler)
(date-deadline red-warmer)
(date-deadline-subtle red-faint)
(date-event fg-alt)
(date-holiday magenta)
(date-now fg-main)
(date-range fg-alt)
(date-scheduled yellow)
(date-scheduled-subtle yellow-faint)
(date-weekday cyan)
(date-weekend red-faint)
;;;; Prose mappings
(prose-code magenta-warmer)
(prose-done green)
(prose-macro green-cooler)
(prose-metadata fg-dim)
(prose-metadata-value fg-alt)
(prose-table fg-alt)
(prose-table-formula err)
(prose-tag yellow-faint)
(prose-todo red-warmer)
(prose-verbatim blue)
;;;; Mail mappings
(mail-cite-0 blue)
(mail-cite-1 magenta-warmer)
(mail-cite-2 green-cooler)
(mail-cite-3 yellow-cooler)
(mail-part magenta-faint)
(mail-recipient blue-warmer)
(mail-subject blue-cooler)
(mail-other cyan)
;;;; Search mappings
(bg-search-match bg-warning)
(bg-search-current bg-yellow-intense)
(bg-search-lazy bg-blue-intense)
(bg-search-replace bg-red-intense)
(bg-search-rx-group-0 bg-magenta-intense)
(bg-search-rx-group-1 bg-green-intense)
(bg-search-rx-group-2 bg-red-subtle)
(bg-search-rx-group-3 bg-cyan-subtle)
;;;; Space mappings
(bg-space unspecified)
(fg-space border)
(bg-space-err bg-yellow-intense)
;;;; Tab mappings
(bg-tab-bar bg-alt)
(bg-tab-current bg-main)
(bg-tab-other bg-active)
;;;; Terminal mappings
(bg-term-black "black")
(fg-term-black "black")
(bg-term-black-bright "gray35")
(fg-term-black-bright "gray35")
(bg-term-red red)
(fg-term-red red)
(bg-term-red-bright red-warmer)
(fg-term-red-bright red-warmer)
(bg-term-green green)
(fg-term-green green)
(bg-term-green-bright green-warmer)
(fg-term-green-bright green-warmer)
(bg-term-yellow yellow)
(fg-term-yellow yellow)
(bg-term-yellow-bright yellow-cooler)
(fg-term-yellow-bright yellow-cooler)
(bg-term-blue blue)
(fg-term-blue blue)
(bg-term-blue-bright blue-cooler)
(fg-term-blue-bright blue-cooler)
(bg-term-magenta magenta)
(fg-term-magenta magenta)
(bg-term-magenta-bright magenta-cooler)
(fg-term-magenta-bright magenta-cooler)
(bg-term-cyan cyan-warmer)
(fg-term-cyan cyan-warmer)
(bg-term-cyan-bright cyan-cooler)
(fg-term-cyan-bright cyan-cooler)
(bg-term-white "gray65")
(fg-term-white "gray65")
(bg-term-white-bright "white")
(fg-term-white-bright "white")
;;;; Rainbow mappings
(rainbow-0 green-cooler)
(rainbow-1 blue)
(rainbow-2 magenta-warmer)
(rainbow-3 cyan-cooler)
(rainbow-4 yellow-cooler)
(rainbow-5 magenta-cooler)
(rainbow-6 red-cooler)
(rainbow-7 green-warmer)
(rainbow-8 yellow))
"The `ef-dark' palette.
Color values have the form (COLOR-NAME HEX-VALUE) with the former
as a symbol and the latter as a string.
Semantic color mappings have the form (MAPPING-NAME COLOR-NAME)
with both as symbols. The latter is a color that already exists
in the palette and is associated with a HEX-VALUE.")
(defcustom ef-dark-palette-overrides nil
"Overrides for `ef-dark-palette'.
Mirror the elements of the aforementioned palette, overriding
their value.
For overrides that are shared across all of the Ef themes,
refer to `ef-themes-common-palette-overrides'.
To preview the palette entries, use `ef-themes-preview-colors' or
`ef-themes-preview-colors-current' (read the documentation for
further details)."
:group 'ef-themes
:package-version '(ef-themes . "1.0.0")
:type '(repeat (list symbol (choice symbol string)))
:link '(info-link "(ef-themes) Palette overrides"))
(ef-themes-theme ef-dark ef-dark-palette ef-dark-palette-overrides)
(provide-theme 'ef-dark))
;;; ef-dark-theme.el ends here