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
|
;;; refinery-dark-theme.el --- refined, minimalist, layered dark theme -*- lexical-binding: t; -*-
;; Copyright (C) 2020 Amin Bandali
;; Author: Amin Bandali <bandali@gnu.org>
;; Version: 0.1.1
;; Keywords: faces
;; 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, either version 3 of the License, or
;; (at your option) any later version.
;; This program 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 this program. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; This is the dark variant of the Refinery theme. Please see
;; `refinery.el' for the commentary.
;;; Code:
(deftheme refinery-dark
"A minimalist high-contrast dark theme for GNU Emacs.
Includes themed faces for modes/packages like Isearch, Gnus,
Message, EBDB, and Ivy.")
(let* (;; supported classes of terminals
(class '((class color) (min-colors 16)))
;; colors
(black "#000000")
(white "#ffffff")
(yellow "#ffffdf")
(yellow+1 "#dfdfaf")
(yellow+2 "#fce94f")
(grey "#e7e7e7")
(grey-0 "#222222")
(grey-1 "#666666")
(grey-2 "#888888")
(grey-3 "#bbbbbb")
(blue "#204a87")
(red "#ff4b4b") ; #d70000 ; #a40000
(orange "#ce5c00")
(green "#4e9a06")
;; layers
(layer-2 `((,class (:foreground ,grey-2))))
(layer-1 `((,class (:foreground ,grey-1))))
(layer0 `((,class (:foreground ,grey-3 :background ,grey-0))))
(layer0-inv `((,class (:background ,white))))
(layer+1 `((,class (:foreground ,yellow :background ,black))))
(layer+2 `((,class (:foreground ,grey-3 :weight bold))))
(layer+3 `((,class (:foreground ,red))))
(layer+3b `((,class (:foreground ,red :weight bold))))
(layer+4 `((,class (:foreground ,red :background ,grey))))
(layer+4-inv `((,class (:foreground ,grey :background ,red))))
(layer+4b `((,class (:foreground ,red :background ,grey :weight bold))))
(layer+4b-inv `((,class (:foreground ,grey :background ,red :weight bold))))
;; box
(box `(:line-width -1 :style released-button)))
(custom-theme-set-faces
'refinery-dark
`(default ,layer0)
`(cursor ,layer0-inv)
;; Highlighting
`(linum ((,class (:background ,grey))))
`(fringe ((,class (:background ,black))))
`(highlight ((,class (:background ,yellow+2))))
`(hl-line ((,class (:background ,yellow+1))))
`(region ((,class (:background ,yellow+1))))
`(secondary-selection ((,class (:background ,yellow+2))))
`(isearch ((,class (:foreground ,white :background ,grey-1))))
`(lazy-highlight ((,class (:background ,grey))))
`(trailing-whitespace ,layer+4b-inv)
`(whitespace-trailing ,layer+4b-inv)
;; Parens
`(show-paren-match ,layer+4b)
`(show-paren-mismatch ,layer+4b-inv)
;; Comments and documentation
`(font-lock-comment-face ,layer+3)
`(font-lock-doc-face ,layer+3)
;; Function definitions
`(font-lock-function-name-face ,layer+2)
;; String literals
`(font-lock-string-face ,layer+1)
;; Constants, variables, and their types
`(font-lock-constant-face ,layer0)
`(font-lock-variable-name-face ,layer0)
`(font-lock-type-face ,layer0)
;; Built-ins and keywords
`(font-lock-builtin-face ,layer-1)
`(font-lock-keyword-face ,layer-2)
;; Mode line and minibuffer prompt
`(mode-line ((,class (:background ,grey :box ,box))))
`(mode-line-inactive ((,class (:background "#e1e1e1" :box ,box))))
`(minibuffer-prompt ,layer+2)
;; Characters displayed as sequences using `^' or `\'
`(escape-glyph ,layer+3)
;; Gnus, Message, and EBDB
`(gnus-group-mail-3 ,layer+2)
`(gnus-group-mail-3-empty ,layer-1)
`(gnus-summary-normal-ticked ,layer+3)
`(gnus-header-from ,layer+3b)
`(gnus-header-subject ,layer+3)
`(gnus-header-name ,layer-2)
`(gnus-header-content ,layer0)
`(message-header-to ,layer+3b)
`(message-header-cc ,layer0)
`(message-header-subject ,layer0)
`(message-header-other ,layer-2)
`(message-header-name ,layer-2)
`(message-header-xheader ((,class (:foreground ,blue))))
`(ebdb-person-name ,layer+3b)
;; Ivy and family
`(ivy-minibuffer-match-face-1 ((,class (:background "#eeeeee"))))
`(ivy-minibuffer-match-face-2 ((,class (:background ,grey :weight bold))))
`(ivy-minibuffer-match-face-3 ((,class (:background "light goldenrod" :weight semi-bold))))
`(ivy-minibuffer-match-face-4 ((,class (:background "misty rose" :weight semi-bold))))
`(ivy-current-match ((((class color) (background light))
:background "#d7d7d7" :foreground ,black)
(((class color) (background dark))
:background "#65a7e2" :foreground ,black)))
;; Error/failure, warning, and success
`(error ,layer+3b)
`(warning ((,class (:foreground ,orange))))
`(success ((,class (:foreground ,green)))))
(custom-theme-set-variables 'refinery-dark))
;;;###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 'refinery-dark)
;;; refinery-theme.el ends here
|