-
-
Notifications
You must be signed in to change notification settings - Fork 197
/
nano-base-colors.el
100 lines (87 loc) · 3.33 KB
/
nano-base-colors.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
;; ---------------------------------------------------------------------
;; GNU Emacs / N Λ N O - Emacs made simple
;; Copyright (C) 2020 - N Λ N O developers
;;
;; 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 <http://www.gnu.org/licenses/>.
;; ---------------------------------------------------------------------
;;
;; Defines the 9 basic colors of the nano theme.
;; The default values are loaded from well-known faces of Emacs.
;;
;; To change nano's appearance you therefore may:
;; - Load any Emacs theme before loading nano to change the appearance
;; - Load one of the few nano themes after this file. This will result inactive
;; the best experience.
;; - Set your own colors by customizing nano group
;;
;; ---------------------------------------------------------------------
(defgroup nano '()
"Faces and colors for the nano emacs theme")
;; Derive our default color set from classic Emacs faces.
;; This allows dropping nano components into already themed Emacsen with varying
;; degrees of visual appeal.
;;
;; We memorize the default colorset in this var in order not to confuse
;; customize: the STANDARD argument of defcustom gets re-evaluated by customize
;; to determine if the current value is default or not.
(defvar nano-base-colors--defaults
`((foreground . ,(face-foreground 'default nil t))
(background . ,(face-background 'default nil t))
(highlight . ,(face-background 'fringe nil t))
(critical . ,(face-foreground 'error nil t))
(salient . ,(face-foreground 'font-lock-keyword-face nil t))
(strong . ,(face-foreground 'default nil t))
(popout . ,(face-foreground 'font-lock-string-face nil t))
(subtle . ,(face-background 'mode-line-inactive nil t))
(faded . ,(face-foreground 'shadow nil t))))
(defun nano-base-colors--get (name)
"Get default color associated with symbol NAME."
(cdr (assoc name nano-base-colors--defaults)))
(defcustom nano-color-foreground (nano-base-colors--get 'foreground)
""
:type 'color
:group 'nano)
(defcustom nano-color-background (nano-base-colors--get 'background)
""
:type 'color
:group 'nano)
(defcustom nano-color-highlight (nano-base-colors--get 'highlight)
""
:type 'color
:group 'nano)
(defcustom nano-color-critical (nano-base-colors--get 'critical)
""
:type 'color
:group 'nano)
(defcustom nano-color-salient (nano-base-colors--get 'salient)
""
:type 'color
:group 'nano)
(defcustom nano-color-strong (nano-base-colors--get 'strong)
""
:type 'color
:group 'nano)
(defcustom nano-color-popout (nano-base-colors--get 'popout)
""
:type 'color
:group 'nano)
(defcustom nano-color-subtle (nano-base-colors--get 'subtle)
""
:type 'color
:group 'nano)
(defcustom nano-color-faded (nano-base-colors--get 'faded)
""
:type 'color
:group 'nano)
(provide 'nano-base-colors)