main
  1;;; modus-tonski-bg-light-theme.el --- Tonski BG light on modus-operandi -*- lexical-binding: t -*-
  2
  3;; Author: Vincent Demeester
  4;; Based on: tonski-modus-ts-focus palette with Alabaster BG wash approach
  5;; Keywords: faces, theme, accessibility
  6
  7;;; Commentary:
  8;;
  9;; Tonski BG light: background-wash syntax highlighting using color
 10;; hues from the tonski-modus-ts-focus palette.  Strings get a blue
 11;; wash (from #004080), comments a grey wash (from #555555),
 12;; definitions a green wash (from #006800), parameters a subtle bg.
 13;; Constants keep ochre foreground (#804000).
 14
 15;;; Code:
 16
 17(require 'modus-alabaster-bg)
 18
 19(defconst modus-tonski-bg-light-palette
 20  (modus-themes-generate-palette
 21   '(
 22     ;; Base surfaces
 23     (bg-main      "#FFFFFF")
 24     (bg-dim       "#F8F8F8")
 25     (bg-active    "#C0D8F0")   ; selection — blue tint
 26     (bg-inactive  "#E8E8E8")
 27     (border       "#D0D0D0")
 28     (fringe       "#FFFFFF")
 29     (fg-main      "#000000")
 30     (fg-dim       "#555555")
 31     (fg-alt       "#888888")
 32     (cursor       "#000088")
 33
 34     ;; BG washes — pastel versions of tonski foreground colors
 35     ;; String (#004080 deep blue) → light blue wash
 36     (tonski-bg-string-bg      "#E0ECF5")
 37     ;; Comment (#555555 grey) → light warm grey wash
 38     (tonski-bg-comment-bg     "#EEEEEE")
 39     ;; Function (#006800 dark green) → light green wash
 40     (tonski-bg-definition-bg  "#E5F2E0")
 41     ;; Escape → slightly deeper blue wash
 42     (tonski-bg-escape-bg      "#D0E0F0")
 43     ;; Error (#a60000 dark red) → light red wash
 44     (tonski-bg-error-bg       "#F5E0E0")
 45     ;; Parameter bg (from tonski original)
 46     (tonski-bg-param-bg       "#EEEEEE")
 47
 48     ;; Foreground accents — from tonski palette
 49     (alabaster-bg-constant    "#804000")   ; ochre — the one fg exception
 50     (alabaster-bg-active      "#000088")   ; dark blue for links/interactive
 51     (alabaster-bg-error-fg    "#A60000")   ; dark red
 52     (alabaster-bg-punctuation "#555555")
 53     (alabaster-bg-operator    "#000000")
 54     (alabaster-bg-bracket     "#555555")
 55
 56     ;; Modus accent vocabulary — tonski palette
 57     (red          "#A60000")
 58     (red-warmer   "#A60000")
 59     (red-cooler   "#A60000")
 60     (red-faint    "#A60000")
 61     (red-intense  "#A60000")
 62     (green        "#006800")
 63     (green-warmer "#006800")
 64     (green-cooler "#006800")
 65     (green-faint  "#006800")
 66     (green-intense "#006800")
 67     (yellow        "#804000")
 68     (yellow-warmer "#804000")
 69     (yellow-cooler "#804000")
 70     (yellow-faint  "#804000")
 71     (yellow-intense "#804000")
 72     (blue         "#000088")
 73     (blue-warmer  "#000088")
 74     (blue-cooler  "#004080")
 75     (blue-faint   "#000088")
 76     (blue-intense "#000088")
 77     (magenta         "#880088")
 78     (magenta-warmer  "#880088")
 79     (magenta-cooler  "#880088")
 80     (magenta-faint   "#880088")
 81     (magenta-intense "#880088")
 82     (cyan         "#008888")
 83     (cyan-warmer  "#008888")
 84     (cyan-cooler  "#008888")
 85     (cyan-faint   "#008888")
 86     (cyan-intense "#008888")
 87     (rust   "#804000")
 88     (gold   "#804000")
 89     (olive  "#006800")
 90     (slate  "#000088")
 91     (indigo "#880088")
 92     (maroon "#A60000")
 93     (pink   "#880088")
 94
 95     ;; Colored backgrounds — derived from tonski hues
 96     (bg-red-intense "#F5E0E0")
 97     (bg-red-subtle  "#F5E0E0")
 98     (bg-red-nuanced "#F5E0E0")
 99     (bg-green-intense   "#E5F2E0")
100     (bg-green-subtle    "#E5F2E0")
101     (bg-green-nuanced   "#E5F2E0")
102     (bg-yellow-intense  "#F5EED8")
103     (bg-yellow-subtle   "#F5EED8")
104     (bg-yellow-nuanced  "#F5EED8")
105     (bg-blue-intense    "#E0ECF5")
106     (bg-blue-subtle     "#E0ECF5")
107     (bg-blue-nuanced    "#E0ECF5")
108     (bg-magenta-intense "#F0E0F0")
109     (bg-magenta-subtle  "#F0E0F0")
110     (bg-magenta-nuanced "#F0E0F0")
111     (bg-cyan-intense    "#E0F0F0")
112     (bg-cyan-subtle     "#E0F0F0")
113     (bg-cyan-nuanced    "#E0F0F0")
114
115     ;; Thematic slots
116     (bg-clay     "#FFFFFF")
117     (fg-clay     "#A60000")
118     (bg-ochre    "#FFFFFF")
119     (fg-ochre    "#804000")
120     (bg-lavender "#FFFFFF")
121     (fg-lavender "#880088")
122     (bg-sage     "#FFFFFF")
123     (fg-sage     "#006800")
124     (bg-graph-red-0     "#A60000")
125     (bg-graph-red-1     "#A60000")
126     (bg-graph-green-0   "#006800")
127     (bg-graph-green-1   "#006800")
128     (bg-graph-yellow-0  "#804000")
129     (bg-graph-yellow-1  "#804000")
130     (bg-graph-blue-0    "#000088")
131     (bg-graph-blue-1    "#000088")
132     (bg-graph-magenta-0 "#880088")
133     (bg-graph-magenta-1 "#880088")
134     (bg-graph-cyan-0    "#008888")
135     (bg-graph-cyan-1    "#008888")
136
137     ;; Editor chrome
138     (bg-completion      "#E8E8E8")
139     (bg-popup           "#FFFFFF")
140     (bg-hover           "#C0D8F0")
141     (bg-hover-secondary "#F8F8F8")
142     (bg-hl-line         "#F8F8F8")
143     (bg-region          "#C0D8F0")
144     (fg-region          "#000000")
145     (bg-mode-line-active       "#F8F8F8")
146     (fg-mode-line-active       "#000000")
147     (border-mode-line-active   "#D0D0D0")
148     (bg-mode-line-inactive     "#E8E8E8")
149     (fg-mode-line-inactive     "#555555")
150     (border-mode-line-inactive "#D0D0D0")
151     (modeline-err     "#A60000")
152     (modeline-warning "#A60000")
153     (modeline-info    "#000088")
154     (bg-tab-bar     "#E8E8E8")
155     (bg-tab-current "#FFFFFF")
156     (bg-tab-other   "#F8F8F8")
157     (fg-line-number-inactive "#888888")
158     (fg-line-number-active   "#000000")
159     (bg-line-number-inactive "#FFFFFF")
160     (bg-line-number-active   "#F8F8F8")
161
162     ;; Diff — washes matching tonski hues
163     (bg-added         "#E5F2E0")
164     (bg-added-faint   "#E5F2E0")
165     (bg-added-refine  "#D0E8C8")
166     (bg-added-fringe  "#006800")
167     (fg-added         "#006800")
168     (fg-added-intense "#006800")
169     (bg-removed         "#F5E0E0")
170     (bg-removed-faint   "#F5E0E0")
171     (bg-removed-refine  "#F0CECE")
172     (bg-removed-fringe  "#A60000")
173     (fg-removed         "#A60000")
174     (fg-removed-intense "#A60000")
175     (bg-changed         "#F5EED8")
176     (bg-changed-faint   "#F5EED8")
177     (bg-changed-refine  "#EEE0C0")
178     (bg-changed-fringe  "#804000")
179     (fg-changed         "#804000")
180     (fg-changed-intense "#804000")
181     (bg-diff-context "#FFFFFF")
182
183     ;; Search
184     (bg-search-current    "#F5EED8")
185     (bg-search-lazy       "#E0ECF5")
186     (bg-search-static     "#E0ECF5")
187     (bg-search-replace    "#F5E0E0")
188     (bg-search-rx-group-0 "#E0ECF5")
189     (bg-search-rx-group-1 "#E5F2E0")
190     (bg-search-rx-group-2 "#F0E0F0")
191     (bg-search-rx-group-3 "#F5EED8")
192     (bg-paren-match      "#FFFFFF")
193     (bg-paren-expression "#FFFFFF")
194     (fg-paren-match      "#000088")
195     (bg-prose-block-delimiter "#F8F8F8")
196     (fg-prose-block-delimiter "#000000")
197     (bg-prose-block-contents  "#F8F8F8")
198
199     ;; Terminal
200     (bg-term-black        "#000000")
201     (fg-term-black        "#000000")
202     (bg-term-black-bright "#555555")
203     (fg-term-black-bright "#555555")
204     (bg-term-white        "#888888")
205     (fg-term-white        "#888888")
206     (bg-term-white-bright "#FFFFFF")
207     (fg-term-white-bright "#FFFFFF"))
208   nil
209   modus-themes-operandi-palette
210   modus-alabaster-bg-common-palette-mappings)
211  "Full palette for `modus-tonski-bg-light'.")
212
213(defcustom modus-tonski-bg-light-palette-overrides nil
214  "Palette overrides for `modus-tonski-bg-light'."
215  :group 'modus-themes
216  :type '(repeat (list symbol (choice symbol string))))
217
218;; Tonski BG washes using tonski-derived hues.
219(defconst modus-tonski-bg-light-custom-faces
220  '(
221    ;; No bold/italic for syntax
222    '(modus-themes-bold ((t (:weight normal))))
223    '(modus-themes-slant ((t (:slant normal))))
224
225    ;; Strings: blue wash (from tonski #004080)
226    '(font-lock-string-face
227      ((t (:foreground "#000000" :background "#E0ECF5"))))
228    '(font-lock-doc-face
229      ((t (:foreground "#000000" :background "#E0ECF5"))))
230
231    ;; Comments: warm grey wash (from tonski #555555)
232    '(font-lock-comment-face
233      ((t (:foreground "#555555" :background "#EEEEEE" :slant italic))))
234    '(font-lock-comment-delimiter-face
235      ((t (:foreground "#555555" :background "#EEEEEE" :slant italic))))
236
237    ;; Definitions: green wash (from tonski #006800)
238    '(font-lock-function-name-face
239      ((t (:foreground "#000000" :background "#E5F2E0"))))
240
241    ;; Constants: ochre foreground (the one fg exception, from tonski #804000)
242    '(font-lock-constant-face
243      ((t (:foreground "#804000"))))
244
245    ;; Escapes: deeper blue wash
246    '(font-lock-escape-face
247      ((t (:foreground "#000000" :background "#D0E0F0"))))
248    '(font-lock-regexp-grouping-backslash
249      ((t (:foreground "#000000" :background "#D0E0F0"))))
250
251    ;; Errors: red wash (from tonski #a60000)
252    '(font-lock-warning-face
253      ((t (:foreground "#A60000" :background "#F5E0E0" :weight normal))))
254
255    ;; Parameters: subtle grey bg (from tonski original)
256    '(font-lock-variable-name-face
257      ((t (:foreground "#000000" :background unspecified))))
258
259    ;; Bracket matching: underline with dark blue
260    '(show-paren-match
261      ((t (:foreground "#000088" :background unspecified :underline t))))
262    '(show-paren-match-expression
263      ((t (:foreground "#000088" :background unspecified :underline t))))
264
265    ;; Org TODO/DONE: background washes
266    '(org-todo
267      ((t (:foreground "#000000" :background "#F5E0E0" :weight bold))))
268    '(org-done
269      ((t (:foreground "#000000" :background "#E5F2E0"))))
270    '(org-headline-done
271      ((t (:foreground "#888888"))))
272    '(org-agenda-done
273      ((t (:foreground "#000000" :background "#E5F2E0"))))
274    '(org-checkbox-statistics-todo
275      ((t (:foreground "#000000" :background "#F5E0E0"))))
276    '(org-checkbox-statistics-done
277      ((t (:foreground "#000000" :background "#E5F2E0"))))
278
279    ;; Plain tree-sitter faces
280    '(font-lock-function-call-face
281      ((t (:foreground "#000000" :background unspecified))))
282    '(font-lock-variable-use-face
283      ((t (:foreground "#000000" :background unspecified))))
284    '(font-lock-property-use-face
285      ((t (:foreground "#000000" :background unspecified)))))
286  "Custom face specifications for `modus-tonski-bg-light'.")
287
288;;;###theme-autoload
289(modus-themes-theme
290 'modus-tonski-bg-light
291 'modus-alabaster-bg
292 "Tonski BG light palette on modus-operandi."
293 'light
294 'modus-themes-operandi-palette
295 'modus-tonski-bg-light-palette
296 'modus-tonski-bg-light-palette-overrides
297 'modus-tonski-bg-light-custom-faces)
298
299(provide-theme 'modus-tonski-bg-light)
300;;; modus-tonski-bg-light-theme.el ends here