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 :background "#FFC9EA"
92 :foreground ,foreground))))
93 `(diff-indicator-removed ((t (:inherit diff-removed))))
94 `(diff-added ((,class (:inherit nil
95 :background "#C4EFFF"
96 :foreground ,foreground))))
97 `(diff-indicator-added ((t (:inherit diff-added))))
98 `(diff-header ((,class (:inherit nil :background "#dddddd"))))
99 `(diff-file-header ((,class (:inherit diff-header))))
101 ;; flymake-error
102 `(flymake-error ((,class :underline (:style line :color "Red1"))))
104 ;; ido-mode
105 `(ido-subdir ((,class (:foreground ,foreground :weight bold))))
106 `(ido-only-match ((,class (:foreground ,foreground :weight bold))))
108 ;; show-paren
109 `(show-paren-match
110 ((,class (:inherit highlight
111 :underline (:color ,foreground :style line)))))
112 `(show-paren-mismatch
113 ((,class (:foreground ,failure :weight bold))))
114 `(show-paren-match-expression
115 ((,class (:inherit default :background "#eee"))))
117 ;; highlight-sexp
118 `(hl-sexp-face
119 ((,class (:inherit show-paren-match-expression))))
121 ;; tab-bar
122 `(tab-bar ((,class :background ,modeline-background)))
123 `(tab-bar-tab ((,class :background ,modeline-background-inactive
124 :box (:line-width 4 :color ,modeline-background-inactive))))
125 `(tab-bar-tab-inactive ((,class :background ,modeline-background
126 :box (:line-width 4 :color ,modeline-background))))
128 ;; help. Don't print funny boxes around keybindings
129 `(help-key-binding ((,class)))
131 ;; modeline
132 `(mode-line
133 ((,class (:inverse-video unspecified
134 :overline ,border
135 :underline nil
136 :foreground ,modeline-foreground
137 :background ,modeline-background
138 :overline ,border
139 :box (:line-width 3 :color ,modeline-background)))))
140 `(mode-line-buffer-id ((,class (:weight bold))))
141 `(mode-line-inactive
142 ((,class (:inverse-video unspecified
143 :overline ,border
144 :underline nil
145 :foreground ,modeline-foreground-inactive
146 :background ,modeline-background-inactive
147 :box (:line-width 3 :color ,background)))))
149 ;; hl-line-mode
150 `(hl-line ((,class (:background ,hl-background))))
151 `(hl-line-face ((,class (:background ,hl-face-background))))
153 ;; highlight-stages-mode
154 `(highlight-stages-negative-level-face ((,class (:foreground ,failure))))
155 `(highlight-stages-level-1-face ((,class (:background ,org-background))))
156 `(highlight-stages-level-2-face ((,class (:background ,region))))
157 `(highlight-stages-level-3-face ((,class (:background ,region))))
158 `(highlight-stages-higher-level-face ((,class (:background ,region))))
160 ;; org-mode
161 `(org-level-1 ((,class (:foreground ,foreground :height 1.6))))
162 `(org-level-2 ((,class (:foreground ,foreground :height 1.5))))
163 `(org-level-3 ((,class (:foreground ,foreground :height 1.4))))
164 `(org-level-4 ((,class (:foreground ,foreground :height 1.3))))
165 `(org-level-5 ((,class (:foreground ,foreground :height 1.2))))
166 `(org-level-6 ((,class (:foreground ,foreground :height 1.1))))
167 `(org-level-7 ((,class (:foreground ,foreground))))
168 `(org-level-8 ((,class (:foreground ,foreground))))
170 `(org-ellipsis ((,class (:inherit org-ellipsis :underline nil))))
172 `(org-table ((,class (:inherit fixed-pitch))))
173 `(org-meta-line ((,class (:inherit (font-lock-comment-face fixed-pitch)))))
174 `(org-property-value ((,class (:inherit fixed-pitch))) t)
175 `(org-verbatim ((,class (:inherit (shadow fixed-pitch)))))
176 `(org-quote ((,class (:slant italic))))
178 `(org-document-title ((,class (:foreground ,foreground))))
180 `(org-link ((,class (:foreground ,foreground :underline t))))
181 `(org-tag ((,class (:background ,org-background :foreground ,foreground))))
182 `(org-warning ((,class (:background ,region :foreground ,foreground :weight bold))))
183 `(org-todo ((,class (:weight bold))))
184 `(org-done ((,class (:weight bold))))
185 `(org-headline-done ((,class (:foreground ,foreground))))
187 `(org-table ((,class (:background ,org-background))))
188 `(org-code ((,class (:background ,org-background))))
189 `(org-date ((,class (:background ,org-background :underline t))))
190 `(org-block ((,class (:background ,org-background))))
191 `(org-block-background ((,class (:background ,org-background :foreground ,foreground))))
192 `(org-block-begin-line
193 ((,class (:background ,org-background :foreground ,comment-delimiter :weight bold))))
194 `(org-block-end-line
195 ((,class (:background ,org-background :foreground ,comment-delimiter :weight bold))))
197 ;; outline
198 `(outline-1 ((,class (:inherit org-level-1))))
199 `(outline-2 ((,class (:inherit org-level-2))))
200 `(outline-3 ((,class (:inherit org-level-3))))
201 `(outline-4 ((,class (:inherit org-level-4))))
202 `(outline-5 ((,class (:inherit org-level-5))))
203 `(outline-6 ((,class (:inherit org-level-6))))
204 `(outline-7 ((,class (:inherit org-level-7))))
205 `(outline-8 ((,class (:inherit org-level-8))))
207 ;; js2-mode
208 `(js2-external-variable ((,class (:inherit base-faces :weight bold))))
209 `(js2-function-param ((,class (:inherit base-faces))))
210 `(js2-instance-member ((,class (:inherit base-faces))))
211 `(js2-jsdoc-html-tag-delimiter ((,class (:inherit base-faces))))
212 `(js2-jsdoc-html-tag-name ((,class (:inherit base-faces))))
213 `(js2-jsdoc-tag ((,class (:inherit base-faces))))
214 `(js2-jsdoc-type ((,class (:inherit base-faces :weight bold))))
215 `(js2-jsdoc-value ((,class (:inherit base-faces))))
216 `(js2-magic-paren ((,class (:underline t))))
217 `(js2-private-function-call ((,class (:inherit base-faces))))
218 `(js2-private-member ((,class (:inherit base-faces))))
220 ;; sh-mode
221 `(sh-heredoc ((,class (:inherit base-faces :slant italic))))
223 ;; telega
224 `(telega-msg-heading ((,class (:inherit base-faces :underline ,comment-delimiter
225 :foreground ,comment))))
226 `(telega-msg-user-title ((,class (:inherit telega-msg-heading))))
227 `(telega-msg-inline-reply ((,class (:inherit telega-msg-heading
228 :slant italic))))
230 ;; objed
231 `(objed-hl ((,class (:background ,region))))
233 ;; circe
234 `(circe-prompt-face ((,class (:inherit default))))))
236 ;;;###autoload
237 (when (and (boundp 'custom-theme-load-path) load-file-name)
238 (add-to-list 'custom-theme-load-path
239 (file-name-as-directory (file-name-directory load-file-name))))
241 (provide-theme 'minimal)
242 ;;; minimal-theme.el ends here