Blob


1 ;;; minimal-light-theme.el --- A light/dark minimalistic Emacs 27 theme. -*- lexical-binding: t; -*-
3 ;; Copyright (C) 2020 Omar Polo
4 ;; Copyright (C) 2014 Anler Hp
6 ;; Author: Anler Hp <anler86 [at] gmail.com>
7 ;; Keywords: color, theme, minimal
8 ;; X-URL: http://github.com/ikame/minimal-theme
9 ;; URL: http://github.com/ikame/minimal-theme
11 ;; This program is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation, either version 3 of the License, or
14 ;; (at your option) any later version.
16 ;; This program is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
24 ;;; Commentary:
25 ;;
26 ;; A minimalistic color theme to avoid distraction with
27 ;; colors. Based on monochrome theme.
29 ;;; Code:
30 (deftheme minimal "minimal light theme.")
32 (let* ((class '((class color) (min-colors 89)))
33 (foreground "#586e75")
34 (background "#ffffff") ;; "#fdf6e3"
35 (cursor "#333")
36 (border "grey90")
37 (minibuffer cursor)
38 (region "grey85")
39 (comment-delimiter "grey55")
40 (comment "grey30")
41 (constant foreground)
42 (string "grey40")
43 (modeline-foreground foreground)
44 (modeline-background "#e1dbca")
45 (modeline-foreground-inactive comment)
46 (modeline-background-inactive background)
47 (modeline-border-color "white")
48 (isearch-background modeline-background)
49 (hl-background "grey94")
50 (hl-face-background nil)
51 (failure "red")
52 (org-background "grey94"))
53 (custom-theme-set-faces
54 'minimal
56 ;; basic stuff
57 `(default ((,class (:background ,background :foreground ,foreground))))
58 `(fringe ((,class (:inherit default))))
59 `(cursor ((,class (:background ,cursor :inverse-video t))))
60 `(vertical-border ((,class (:foreground ,border))))
62 ;; minibuffer
63 `(minibuffer-prompt ((,class (:foreground ,minibuffer :weight bold))))
65 ;; region
66 `(region ((,class (:background ,region))))
67 `(secondary-selection ((,class (:background ,region))))
69 ;; faces
70 `(font-lock-builtin-face ((,class (:foreground ,foreground :weight bold))))
71 `(font-lock-constant-face ((,class (:foreground ,foreground :weight bold))))
72 `(font-lock-keyword-face ((,class (:foreground ,foreground :weight bold))))
73 `(font-lock-type-face ((,class (:foreground ,foreground :slant italic))))
74 `(font-lock-function-name-face ((,class (:foreground ,foreground :weight bold))))
75 `(font-lock-variable-name-face ((,class (:foreground ,foreground))))
77 `(font-lock-comment-delimiter-face ((,class (:foreground ,comment-delimiter))))
78 `(font-lock-comment-face ((,class (:foreground ,comment
79 :slant italic))))
80 `(font-lock-doc-face ((,class (:inherit (font-lock-comment-face)))))
81 `(font-lock-string-face ((,class (:foreground ,foreground :foreground ,string))))
83 ;; faces used by isearch
84 `(isearch ((,class (:foreground ,foreground :background ,isearch-background :weight normal))))
85 `(isearch-fail ((,class (:foreground ,failure :bold t))))
86 `(lazy-highlight
87 ((,class (:foreground ,foreground :background ,region))))
89 ;; diff-mode
90 `(diff-removed ((,class (:inherit nil
91 :foreground "#98005D"))))
92 `(diff-indicator-removed ((t (:inherit diff-removed))))
93 `(diff-added ((,class (:inherit nil
94 :foreground "#009DDC"))))
95 `(diff-indicator-added ((t (:inherit diff-added))))
96 `(diff-header ((,class (:inherit nil))))
97 `(diff-file-header ((,class (:inherit nil))))
99 ;; flymake-error
100 `(flymake-error ((,class :underline (:style line :color "Red1"))))
102 ;; ido-mode
103 `(ido-subdir ((,class (:foreground ,foreground :weight bold))))
104 `(ido-only-match ((,class (:foreground ,foreground :weight bold))))
106 ;; show-paren
107 `(show-paren-match
108 ((,class (:inherit highlight
109 :underline (:color ,foreground :style line)))))
110 `(show-paren-mismatch
111 ((,class (:foreground ,failure :weight bold))))
112 `(show-paren-match-expression
113 ((,class (:inherit default :background "#eee"))))
115 ;; highlight-sexp
116 `(hl-sexp-face
117 ((,class (:inherit show-paren-match-expression))))
119 ;; tab-bar
120 `(tab-bar ((,class :background ,modeline-background)))
121 `(tab-bar-tab ((,class :background ,modeline-background-inactive
122 :box (:line-width 4 :color ,modeline-background-inactive))))
123 `(tab-bar-tab-inactive ((,class :background ,modeline-background
124 :box (:line-width 4 :color ,modeline-background))))
126 ;; help. Don't print funny boxes around keybindings
127 `(help-key-binding ((,class)))
129 ;; modeline
130 `(mode-line
131 ((,class (:inverse-video unspecified
132 :overline ,border
133 :underline nil
134 :foreground ,modeline-foreground
135 :background ,modeline-background
136 :overline ,border
137 :box (:line-width 3 :color ,modeline-background)))))
138 `(mode-line-buffer-id ((,class (:weight bold))))
139 `(mode-line-inactive
140 ((,class (:inverse-video unspecified
141 :overline ,border
142 :underline nil
143 :foreground ,modeline-foreground-inactive
144 :background ,modeline-background-inactive
145 :box (:line-width 3 :color ,background)))))
147 ;; hl-line-mode
148 `(hl-line ((,class (:background ,hl-background))))
149 `(hl-line-face ((,class (:background ,hl-face-background))))
151 ;; highlight-stages-mode
152 `(highlight-stages-negative-level-face ((,class (:foreground ,failure))))
153 `(highlight-stages-level-1-face ((,class (:background ,org-background))))
154 `(highlight-stages-level-2-face ((,class (:background ,region))))
155 `(highlight-stages-level-3-face ((,class (:background ,region))))
156 `(highlight-stages-higher-level-face ((,class (:background ,region))))
158 ;; org-mode
159 `(org-level-1 ((,class (:foreground ,foreground :height 1.6))))
160 `(org-level-2 ((,class (:foreground ,foreground :height 1.5))))
161 `(org-level-3 ((,class (:foreground ,foreground :height 1.4))))
162 `(org-level-4 ((,class (:foreground ,foreground :height 1.3))))
163 `(org-level-5 ((,class (:foreground ,foreground :height 1.2))))
164 `(org-level-6 ((,class (:foreground ,foreground :height 1.1))))
165 `(org-level-7 ((,class (:foreground ,foreground))))
166 `(org-level-8 ((,class (:foreground ,foreground))))
168 `(org-ellipsis ((,class (:inherit org-ellipsis :underline nil))))
170 `(org-table ((,class (:inherit fixed-pitch))))
171 `(org-meta-line ((,class (:inherit (font-lock-comment-face fixed-pitch)))))
172 `(org-property-value ((,class (:inherit fixed-pitch))) t)
173 `(org-verbatim ((,class (:inherit (shadow fixed-pitch)))))
174 `(org-quote ((,class (:slant italic))))
176 `(org-document-title ((,class (:foreground ,foreground))))
178 `(org-link ((,class (:foreground ,foreground :underline t))))
179 `(org-tag ((,class (:background ,org-background :foreground ,foreground))))
180 `(org-warning ((,class (:background ,region :foreground ,foreground :weight bold))))
181 `(org-todo ((,class (:weight bold))))
182 `(org-done ((,class (:weight bold))))
183 `(org-headline-done ((,class (:foreground ,foreground))))
185 `(org-table ((,class (:background ,org-background))))
186 `(org-code ((,class (:background ,org-background))))
187 `(org-date ((,class (:background ,org-background :underline t))))
188 `(org-block ((,class (:background ,org-background))))
189 `(org-block-background ((,class (:background ,org-background :foreground ,foreground))))
190 `(org-block-begin-line
191 ((,class (:background ,org-background :foreground ,comment-delimiter :weight bold))))
192 `(org-block-end-line
193 ((,class (:background ,org-background :foreground ,comment-delimiter :weight bold))))
195 ;; outline
196 `(outline-1 ((,class (:inherit org-level-1))))
197 `(outline-2 ((,class (:inherit org-level-2))))
198 `(outline-3 ((,class (:inherit org-level-3))))
199 `(outline-4 ((,class (:inherit org-level-4))))
200 `(outline-5 ((,class (:inherit org-level-5))))
201 `(outline-6 ((,class (:inherit org-level-6))))
202 `(outline-7 ((,class (:inherit org-level-7))))
203 `(outline-8 ((,class (:inherit org-level-8))))
205 ;; js2-mode
206 `(js2-external-variable ((,class (:inherit base-faces :weight bold))))
207 `(js2-function-param ((,class (:inherit base-faces))))
208 `(js2-instance-member ((,class (:inherit base-faces))))
209 `(js2-jsdoc-html-tag-delimiter ((,class (:inherit base-faces))))
210 `(js2-jsdoc-html-tag-name ((,class (:inherit base-faces))))
211 `(js2-jsdoc-tag ((,class (:inherit base-faces))))
212 `(js2-jsdoc-type ((,class (:inherit base-faces :weight bold))))
213 `(js2-jsdoc-value ((,class (:inherit base-faces))))
214 `(js2-magic-paren ((,class (:underline t))))
215 `(js2-private-function-call ((,class (:inherit base-faces))))
216 `(js2-private-member ((,class (:inherit base-faces))))
218 ;; sh-mode
219 `(sh-heredoc ((,class (:inherit base-faces :slant italic))))
221 ;; telega
222 `(telega-msg-heading ((,class (:inherit base-faces :underline ,comment-delimiter
223 :foreground ,comment))))
224 `(telega-msg-user-title ((,class (:inherit telega-msg-heading))))
225 `(telega-msg-inline-reply ((,class (:inherit telega-msg-heading
226 :slant italic))))
228 ;; objed
229 `(objed-hl ((,class (:background ,region))))
231 ;; circe
232 `(circe-prompt-face ((,class (:inherit default))))))
234 ;;;###autoload
235 (when (and (boundp 'custom-theme-load-path) load-file-name)
236 (add-to-list 'custom-theme-load-path
237 (file-name-as-directory (file-name-directory load-file-name))))
239 (provide-theme 'minimal)
240 ;;; minimal-theme.el ends here