1 ;;; refinery-dark-theme.el --- refined, minimalist, layered dark theme -*- lexical-binding: t; -*-
3 ;; Copyright (C) 2020 Amin Bandali
5 ;; Author: Amin Bandali <bandali@gnu.org>
9 ;; This program is free software; you can redistribute it and/or modify
10 ;; it under the terms of the GNU General Public License as published by
11 ;; the Free Software Foundation, either version 3 of the License, or
12 ;; (at your option) any later version.
14 ;; This program is distributed in the hope that it will be useful,
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 ;; GNU General Public License for more details.
19 ;; You should have received a copy of the GNU General Public License
20 ;; along with this program. If not, see <https://www.gnu.org/licenses/>.
24 ;; This is the dark variant of the Refinery theme. Please see
25 ;; `refinery.el' for the commentary.
29 (deftheme refinery-dark
30 "A minimalist high-contrast dark theme for GNU Emacs.
31 Includes themed faces for modes/packages like Isearch, Gnus,
32 Message, EBDB, and Ivy.")
34 (let* (;; supported classes of terminals
35 (class '((class color
) (min-colors 16)))
49 (red "#ff4b4b") ; #d70000 ; #a40000
54 (layer-2 `((,class
(:foreground
,grey-2
))))
55 (layer-1 `((,class
(:foreground
,grey-1
))))
56 (layer0 `((,class
(:foreground
,grey-3
:background
,grey-0
))))
57 (layer0-inv `((,class
(:background
,white
))))
58 (layer+1 `((,class
(:foreground
,yellow
:background
,black
))))
59 (layer+2 `((,class
(:foreground
,grey-3
:weight bold
))))
60 (layer+3 `((,class
(:foreground
,red
))))
61 (layer+3b
`((,class
(:foreground
,red
:weight bold
))))
62 (layer+4 `((,class
(:foreground
,red
:background
,grey
))))
63 (layer+4-inv
`((,class
(:foreground
,grey
:background
,red
))))
64 (layer+4b
`((,class
(:foreground
,red
:background
,grey
:weight bold
))))
65 (layer+4b-inv
`((,class
(:foreground
,grey
:background
,red
:weight bold
))))
68 (box `(:line-width -
1 :style released-button
)))
70 (custom-theme-set-faces
77 `(linum ((,class
(:background
,grey
))))
78 `(fringe ((,class
(:background
,black
))))
79 `(highlight ((,class
(:background
,yellow
+2))))
80 `(hl-line ((,class
(:background
,yellow
+1))))
81 `(region ((,class
(:background
,yellow
+1))))
82 `(secondary-selection ((,class
(:background
,yellow
+2))))
83 `(isearch ((,class
(:foreground
,white
:background
,grey-1
))))
84 `(lazy-highlight ((,class
(:background
,grey
))))
85 `(trailing-whitespace ,layer
+4b-inv
)
86 `(whitespace-trailing ,layer
+4b-inv
)
89 `(show-paren-match ,layer
+4b
)
90 `(show-paren-mismatch ,layer
+4b-inv
)
92 ;; Comments and documentation
93 `(font-lock-comment-face ,layer
+3)
94 `(font-lock-doc-face ,layer
+3)
96 ;; Function definitions
97 `(font-lock-function-name-face ,layer
+2)
100 `(font-lock-string-face ,layer
+1)
102 ;; Constants, variables, and their types
103 `(font-lock-constant-face ,layer0
)
104 `(font-lock-variable-name-face ,layer0
)
105 `(font-lock-type-face ,layer0
)
107 ;; Built-ins and keywords
108 `(font-lock-builtin-face ,layer-1
)
109 `(font-lock-keyword-face ,layer-2
)
111 ;; Mode line and minibuffer prompt
112 `(mode-line ((,class
(:background
,grey
:box
,box
))))
113 `(mode-line-inactive ((,class
(:background
"#e1e1e1" :box
,box
))))
114 `(minibuffer-prompt ,layer
+2)
116 ;; Characters displayed as sequences using `^' or `\'
117 `(escape-glyph ,layer
+3)
119 ;; Gnus, Message, and EBDB
120 `(gnus-group-mail-3 ,layer
+2)
121 `(gnus-group-mail-3-empty ,layer-1
)
122 `(gnus-summary-normal-ticked ,layer
+3)
123 `(gnus-header-from ,layer
+3b
)
124 `(gnus-header-subject ,layer
+3)
125 `(gnus-header-name ,layer-2
)
126 `(gnus-header-content ,layer0
)
127 `(message-header-to ,layer
+3b
)
128 `(message-header-cc ,layer0
)
129 `(message-header-subject ,layer0
)
130 `(message-header-other ,layer-2
)
131 `(message-header-name ,layer-2
)
132 `(message-header-xheader ((,class
(:foreground
,blue
))))
133 `(ebdb-person-name ,layer
+3b
)
136 `(ivy-minibuffer-match-face-1 ((,class
(:background
"#eeeeee"))))
137 `(ivy-minibuffer-match-face-2 ((,class
(:background
,grey
:weight bold
))))
138 `(ivy-minibuffer-match-face-3 ((,class
(:background
"light goldenrod" :weight semi-bold
))))
139 `(ivy-minibuffer-match-face-4 ((,class
(:background
"misty rose" :weight semi-bold
))))
140 `(ivy-current-match ((((class color
) (background light
))
141 :background
"#d7d7d7" :foreground
,black
)
142 (((class color
) (background dark
))
143 :background
"#65a7e2" :foreground
,black
)))
145 ;; Error/failure, warning, and success
147 `(warning ((,class
(:foreground
,orange
))))
148 `(success ((,class
(:foreground
,green
)))))
150 (custom-theme-set-variables 'refinery-dark
))
153 (when (and (boundp 'custom-theme-load-path
) load-file-name
)
154 (add-to-list 'custom-theme-load-path
155 (file-name-as-directory
156 (file-name-directory load-file-name
))))
158 (provide-theme 'refinery-dark
)
159 ;;; refinery-theme.el ends here