aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/face_data.py
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-20 03:46:11 -0400
committerCraig Jennings <c@cjennings.net>2026-06-20 03:46:11 -0400
commit5662248ad525006f33def1b1e658f4c4220a3e9a (patch)
tree666b9cbd65d2a648856a07a6c27758c5df477f82 /scripts/theme-studio/face_data.py
parent0679c47c54dd935a0cc7d87c64081262b4367697 (diff)
downloaddotemacs-5662248ad525006f33def1b1e658f4c4220a3e9a.tar.gz
dotemacs-5662248ad525006f33def1b1e658f4c4220a3e9a.zip
feat(theme-studio): add ansi-color faces to drive all ANSI consumers
theme-studio could theme ghostel-color-* but not the base ansi-color-* faces. build-inventory.el skips built-in faces, and ansi-color is part of Emacs core, so the 16 base ANSI faces never reached the dropdown. That left vterm, eshell, and compilation buffers on stock ANSI colors no matter the theme. I added ansi-color as a bespoke app (the same path shr already uses for a built-in library), with the 16 palette faces seeded to match the ghostel colors. Theming ansi-color-* now sets the 16 colors for every ANSI consumer at once. ghostel-color-* inherit these, so clearing a ghostel-color face lets it follow ansi-color rather than holding its own value.
Diffstat (limited to 'scripts/theme-studio/face_data.py')
-rw-r--r--scripts/theme-studio/face_data.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/theme-studio/face_data.py b/scripts/theme-studio/face_data.py
index 58e38a906..d94f23068 100644
--- a/scripts/theme-studio/face_data.py
+++ b/scripts/theme-studio/face_data.py
@@ -143,6 +143,21 @@ GHOSTEL_SEED={
"ghostel-color-blue":{"fg":"blue"},"ghostel-color-magenta":{"fg":"regal"},"ghostel-color-cyan":{"fg":"sage"},"ghostel-color-white":{"fg":"silver"},
"ghostel-color-bright-black":{"fg":"steel"},"ghostel-color-bright-red":{"fg":"#de4949"},"ghostel-color-bright-green":{"fg":"#84b068"},"ghostel-color-bright-yellow":{"fg":"#eed376"},
"ghostel-color-bright-blue":{"fg":"#7a9abe"},"ghostel-color-bright-magenta":{"fg":"#b07fd0"},"ghostel-color-bright-cyan":{"fg":"#7fc0a8"},"ghostel-color-bright-white":{"fg":"white"}}
+# ansi-color (built-in, not in the inventory): the 16 ANSI palette faces that every
+# ANSI consumer resolves -- vterm, eshell, compilation, and ghostel (whose
+# ghostel-color-* faces :inherit these). Theming ansi-color-* drives the 16
+# colors everywhere at once. Seed mirrors the ghostel palette so the two agree.
+# Note: a face left unset here inherits nothing extra; a consumer that sets its
+# own color directly (e.g. a seeded ghostel-color-red) overrides this inheritance.
+ANSI_COLOR_FACES=("ansi-color-black ansi-color-red ansi-color-green ansi-color-yellow "
+ "ansi-color-blue ansi-color-magenta ansi-color-cyan ansi-color-white "
+ "ansi-color-bright-black ansi-color-bright-red ansi-color-bright-green ansi-color-bright-yellow "
+ "ansi-color-bright-blue ansi-color-bright-magenta ansi-color-bright-cyan ansi-color-bright-white").split()
+ANSI_COLOR_SEED={
+ "ansi-color-black":{"fg":"pewter"},"ansi-color-red":{"fg":"terracotta"},"ansi-color-green":{"fg":"emerald"},"ansi-color-yellow":{"fg":"gold"},
+ "ansi-color-blue":{"fg":"blue"},"ansi-color-magenta":{"fg":"regal"},"ansi-color-cyan":{"fg":"sage"},"ansi-color-white":{"fg":"silver"},
+ "ansi-color-bright-black":{"fg":"steel"},"ansi-color-bright-red":{"fg":"#de4949"},"ansi-color-bright-green":{"fg":"#84b068"},"ansi-color-bright-yellow":{"fg":"#eed376"},
+ "ansi-color-bright-blue":{"fg":"#7a9abe"},"ansi-color-bright-magenta":{"fg":"#b07fd0"},"ansi-color-bright-cyan":{"fg":"#7fc0a8"},"ansi-color-bright-white":{"fg":"white"}}
# auto-dim-other-buffers: non-selected windows recede to a faded fg on a near-black
# bg. The -hide face keeps org hidden text invisible in a dimmed window (fg=bg).
AUTODIM_FACES=("auto-dim-other-buffers auto-dim-other-buffers-hide").split()
@@ -341,6 +356,7 @@ BESPOKE_APP_SPECS=[
("gnus","gnus (mu4e article view)","gnus",GNUS_FACES,"gnus-",GNUS_SEED),
("org-faces","org-faces","orgfaces",ORGFACES_FACES,"org-faces-",ORGFACES_SEED),
("ghostel","ghostel","ghostel",GHOSTEL_FACES,"ghostel-",GHOSTEL_SEED),
+ ("ansi-color","ansi-color (vterm/eshell/compilation/ghostel)","ansicolor",ANSI_COLOR_FACES,"ansi-color-",ANSI_COLOR_SEED),
("auto-dim-other-buffers","auto-dim","autodim",AUTODIM_FACES,"auto-dim-other-buffers-",AUTODIM_SEED),
("dashboard","dashboard","dashboard",DASHBOARD_FACES,"dashboard-",DASHBOARD_SEED),
("lsp-mode","lsp-mode","lsp",LSP_FACES,"lsp-",LSP_SEED),