main
  1;;; modus-alabaster-bg-light-theme.el --- Alabaster BG light on modus-operandi -*- lexical-binding: t -*-
  2
  3;; Author: Vincent Demeester
  4;; Based on: https://github.com/tonsky/sublime-scheme-alabaster (Alabaster BG)
  5;;           https://github.com/dpassen/modus-alabaster
  6;; Keywords: faces, theme, accessibility
  7
  8;;; Commentary:
  9;;
 10;; Alabaster BG light: background-wash syntax highlighting on a white
 11;; canvas.  Strings get green wash, comments yellow wash, definitions
 12;; blue wash.  Only constants use a distinct foreground (purple).
 13
 14;;; Code:
 15
 16(require 'modus-alabaster-bg)
 17
 18(defconst modus-alabaster-bg-light-palette
 19  (modus-themes-generate-palette
 20   '(
 21     ;; Base surfaces — Tonsky Alabaster BG upstream values
 22     (bg-main      "#FFFFFF")
 23     (bg-dim       "#F7F7F7")
 24     (bg-active    "#B4D8FD")   ; selection
 25     (bg-inactive  "#E0E0E0")
 26     (border       "#E0E0E0")
 27     (fringe       "#FFFFFF")
 28     (fg-main      "#000000")
 29     (fg-dim       "#777777")
 30     (fg-alt       "#AAAAAA")
 31     (cursor       "#007ACC")
 32
 33     ;; BG-variant semantic colors
 34     ;; These are the background washes from Alabaster BG
 35     (alabaster-bg-string-bg      "#F1FADF")   ; green wash for strings
 36     (alabaster-bg-escape-bg      "#DBECB6")   ; darker green for escapes
 37     (alabaster-bg-comment-bg     "#FFFABC")   ; yellow wash for comments
 38     (alabaster-bg-definition-bg  "#DBF1FF")   ; blue wash for definitions
 39     (alabaster-bg-error-bg       "#FFE0E0")   ; red wash for errors
 40
 41     ;; Foreground accents (only constants + errors use fg color)
 42     (alabaster-bg-constant    "#7A3E9D")
 43     (alabaster-bg-active      "#007ACC")
 44     (alabaster-bg-error-fg    "#CC3333")
 45     (alabaster-bg-punctuation "#00000090")
 46     (alabaster-bg-operator    "#000000")
 47     (alabaster-bg-bracket     "#00000075")
 48
 49     ;; Modus accent vocabulary
 50     (red          "#CC3333")
 51     (red-warmer   "#CC3333")
 52     (red-cooler   "#CC3333")
 53     (red-faint    "#CC3333")
 54     (red-intense  "#CC3333")
 55     (green        "#448C27")
 56     (green-warmer "#448C27")
 57     (green-cooler "#448C27")
 58     (green-faint  "#448C27")
 59     (green-intense "#448C27")
 60     (yellow        "#FFBC5D")
 61     (yellow-warmer "#FFBC5D")
 62     (yellow-cooler "#FFBC5D")
 63     (yellow-faint  "#FFBC5D")
 64     (yellow-intense "#FFBC5D")
 65     (blue         "#325CC0")
 66     (blue-warmer  "#325CC0")
 67     (blue-cooler  "#325CC0")
 68     (blue-faint   "#325CC0")
 69     (blue-intense "#325CC0")
 70     (magenta         "#7A3E9D")
 71     (magenta-warmer  "#7A3E9D")
 72     (magenta-cooler  "#7A3E9D")
 73     (magenta-faint   "#7A3E9D")
 74     (magenta-intense "#7A3E9D")
 75     (cyan         "#007ACC")
 76     (cyan-warmer  "#007ACC")
 77     (cyan-cooler  "#007ACC")
 78     (cyan-faint   "#007ACC")
 79     (cyan-intense "#007ACC")
 80     (rust   "#FFBC5D")
 81     (gold   "#FFBC5D")
 82     (olive  "#448C27")
 83     (slate  "#325CC0")
 84     (indigo "#7A3E9D")
 85     (maroon "#CC3333")
 86     (pink   "#7A3E9D")
 87
 88     ;; Colored backgrounds — mostly plain for BG variant
 89     (bg-red-intense "#FFE0E0")
 90     (bg-red-subtle  "#FFE0E0")
 91     (bg-red-nuanced "#FFE0E0")
 92     (bg-green-intense   "#F1FADF")
 93     (bg-green-subtle    "#F1FADF")
 94     (bg-green-nuanced   "#F1FADF")
 95     (bg-yellow-intense  "#FFFABC")
 96     (bg-yellow-subtle   "#FFFABC")
 97     (bg-yellow-nuanced  "#FFFABC")
 98     (bg-blue-intense    "#DBF1FF")
 99     (bg-blue-subtle     "#DBF1FF")
100     (bg-blue-nuanced    "#DBF1FF")
101     (bg-magenta-intense "#F9E0FF")
102     (bg-magenta-subtle  "#F9E0FF")
103     (bg-magenta-nuanced "#F9E0FF")
104     (bg-cyan-intense    "#DBF1FF")
105     (bg-cyan-subtle     "#DBF1FF")
106     (bg-cyan-nuanced    "#DBF1FF")
107
108     ;; Thematic slots
109     (bg-clay     "#FFFFFF")
110     (fg-clay     "#CC3333")
111     (bg-ochre    "#FFFFFF")
112     (fg-ochre    "#FFBC5D")
113     (bg-lavender "#FFFFFF")
114     (fg-lavender "#7A3E9D")
115     (bg-sage     "#FFFFFF")
116     (fg-sage     "#448C27")
117     (bg-graph-red-0     "#D2322D")
118     (bg-graph-red-1     "#D2322D")
119     (bg-graph-green-0   "#6ABF40")
120     (bg-graph-green-1   "#6ABF40")
121     (bg-graph-yellow-0  "#EC8013")
122     (bg-graph-yellow-1  "#EC8013")
123     (bg-graph-blue-0    "#325CC0")
124     (bg-graph-blue-1    "#325CC0")
125     (bg-graph-magenta-0 "#7A3E9D")
126     (bg-graph-magenta-1 "#7A3E9D")
127     (bg-graph-cyan-0    "#007ACC")
128     (bg-graph-cyan-1    "#007ACC")
129
130     ;; Editor chrome
131     (bg-completion      "#E0E0E0")
132     (bg-popup           "#FFFFFF")
133     (bg-hover           "#B4D8FD")
134     (bg-hover-secondary "#F7F7F7")
135     (bg-hl-line         "#F7F7F7")
136     (bg-region          "#B4D8FD")
137     (fg-region          "#000000")
138     (bg-mode-line-active       "#F7F7F7")
139     (fg-mode-line-active       "#000000")
140     (border-mode-line-active   "#E0E0E0")
141     (bg-mode-line-inactive     "#E0E0E0")
142     (fg-mode-line-inactive     "#777777")
143     (border-mode-line-inactive "#E0E0E0")
144     (modeline-err     "#CC3333")
145     (modeline-warning "#CC3333")
146     (modeline-info    "#007ACC")
147     (bg-tab-bar     "#E0E0E0")
148     (bg-tab-current "#FFFFFF")
149     (bg-tab-other   "#F7F7F7")
150     (fg-line-number-inactive "#777777")
151     (fg-line-number-active   "#000000")
152     (bg-line-number-inactive "#FFFFFF")
153     (bg-line-number-active   "#F7F7F7")
154
155     ;; Diff — use washes that match the BG philosophy
156     (bg-added         "#F1FADF")
157     (bg-added-faint   "#F1FADF")
158     (bg-added-refine  "#DBECB6")
159     (bg-added-fringe  "#6ABF40")
160     (fg-added         "#6ABF40")
161     (fg-added-intense "#448C27")
162     (bg-removed         "#FFE0E0")
163     (bg-removed-faint   "#FFE0E0")
164     (bg-removed-refine  "#FFCECE")
165     (bg-removed-fringe  "#D2322D")
166     (fg-removed         "#D2322D")
167     (fg-removed-intense "#D2322D")
168     (bg-changed         "#FFFABC")
169     (bg-changed-faint   "#FFFABC")
170     (bg-changed-refine  "#FFE8A0")
171     (bg-changed-fringe  "#EC8013")
172     (fg-changed         "#EC8013")
173     (fg-changed-intense "#EC8013")
174     (bg-diff-context "#FFFFFF")
175
176     ;; Search
177     (bg-search-current    "#FFBC5D")
178     (bg-search-lazy       "#FFBC5D")
179     (bg-search-static     "#FFBC5D")
180     (bg-search-replace    "#FFBC5D")
181     (bg-search-rx-group-0 "#FFBC5D")
182     (bg-search-rx-group-1 "#FFBC5D")
183     (bg-search-rx-group-2 "#FFBC5D")
184     (bg-search-rx-group-3 "#FFBC5D")
185     (bg-paren-match      "#FFFFFF")
186     (bg-paren-expression "#FFFFFF")
187     (fg-paren-match      "#007ACC")
188     (bg-prose-block-delimiter "#F7F7F7")
189     (fg-prose-block-delimiter "#000000")
190     (bg-prose-block-contents  "#F7F7F7")
191
192     ;; Terminal
193     (bg-term-black        "#000000")
194     (fg-term-black        "#000000")
195     (bg-term-black-bright "#777777")
196     (fg-term-black-bright "#777777")
197     (bg-term-white        "#AAAAAA")
198     (fg-term-white        "#AAAAAA")
199     (bg-term-white-bright "#FFFFFF")
200     (fg-term-white-bright "#FFFFFF"))
201   nil
202   modus-themes-operandi-palette
203   modus-alabaster-bg-common-palette-mappings)
204  "Full palette for `modus-alabaster-bg-light'.")
205
206(defcustom modus-alabaster-bg-light-palette-overrides nil
207  "Palette overrides for `modus-alabaster-bg-light'."
208  :group 'modus-themes
209  :type '(repeat (list symbol (choice symbol string))))
210
211;; The heart of Alabaster BG: background washes on syntax faces.
212(defconst modus-alabaster-bg-light-custom-faces
213  '(
214    ;; No bold/italic for syntax
215    '(modus-themes-bold ((t (:weight normal))))
216    '(modus-themes-slant ((t (:slant normal))))
217
218    ;; Strings: green background wash
219    '(font-lock-string-face
220      ((t (:foreground "#000000" :background "#F1FADF"))))
221    '(font-lock-doc-face
222      ((t (:foreground "#000000" :background "#F1FADF"))))
223
224    ;; Comments: yellow background wash
225    '(font-lock-comment-face
226      ((t (:foreground "#000000" :background "#FFFABC"))))
227    '(font-lock-comment-delimiter-face
228      ((t (:foreground "#000000" :background "#FFFABC"))))
229
230    ;; Definitions: blue background wash
231    '(font-lock-function-name-face
232      ((t (:foreground "#000000" :background "#DBF1FF"))))
233
234    ;; Constants: purple foreground (the one exception — keeps fg color)
235    '(font-lock-constant-face
236      ((t (:foreground "#7A3E9D"))))
237
238    ;; Escapes: darker green background
239    '(font-lock-escape-face
240      ((t (:foreground "#000000" :background "#DBECB6"))))
241    '(font-lock-regexp-grouping-backslash
242      ((t (:foreground "#000000" :background "#DBECB6"))))
243
244    ;; Errors: red wash
245    '(font-lock-warning-face
246      ((t (:foreground "#CC3333" :background "#FFE0E0" :weight normal))))
247
248    ;; Bracket matching: underline, no fill
249    '(show-paren-match
250      ((t (:foreground "#007ACC" :background unspecified :underline t))))
251    '(show-paren-match-expression
252      ((t (:foreground "#007ACC" :background unspecified :underline t))))
253
254    ;; Org TODO/DONE: background washes
255    '(org-todo
256      ((t (:foreground "#000000" :background "#FFE0E0" :weight bold))))
257    '(org-done
258      ((t (:foreground "#000000" :background "#F1FADF"))))
259    '(org-headline-done
260      ((t (:foreground "#777777"))))
261    '(org-agenda-done
262      ((t (:foreground "#000000" :background "#F1FADF"))))
263    '(org-checkbox-statistics-todo
264      ((t (:foreground "#000000" :background "#FFE0E0"))))
265    '(org-checkbox-statistics-done
266      ((t (:foreground "#000000" :background "#F1FADF"))))
267
268    ;; Tree-sitter faces (these inherit from font-lock but let's be explicit)
269    '(font-lock-function-call-face
270      ((t (:foreground "#000000" :background unspecified))))
271    '(font-lock-variable-use-face
272      ((t (:foreground "#000000" :background unspecified))))
273    '(font-lock-property-use-face
274      ((t (:foreground "#000000" :background unspecified)))))
275  "Custom face specifications for `modus-alabaster-bg-light'.")
276
277;;;###theme-autoload
278(modus-themes-theme
279 'modus-alabaster-bg-light
280 'modus-alabaster-bg
281 "Alabaster BG light palette on modus-operandi."
282 'light
283 'modus-themes-operandi-palette
284 'modus-alabaster-bg-light-palette
285 'modus-alabaster-bg-light-palette-overrides
286 'modus-alabaster-bg-light-custom-faces)
287
288(provide-theme 'modus-alabaster-bg-light)
289;;; modus-alabaster-bg-light-theme.el ends here