Internal, channel-agnostic Vis theme data.
Keep this namespace pure data: no Lanterna, Swing, browser, or terminal backend imports. Channels adapt these tokens to their own render types.
Internal, channel-agnostic Vis theme data. Keep this namespace pure data: no Lanterna, Swing, browser, or terminal backend imports. Channels adapt these tokens to their own render types.
(available-theme-ids)(available-theme-ids extensions)Theme ids from the process registry plus optional unregistered extension
descriptor maps. Normally extensions are already installed into themes
by register-extension!; the argument remains for pure tests/previews.
Theme ids from the process registry plus optional unregistered extension descriptor maps. Normally extensions are already installed into `themes` by `register-extension!`; the argument remains for pure tests/previews.
(color k)(color theme-map k)Return RGB vector for palette token k in theme-map (or selected/default theme).
Return RGB vector for palette token `k` in `theme-map` (or selected/default theme).
The built-in theme id used when config has no explicit theme.
The built-in theme id used when config has no explicit theme.
(extension-theme-map? x)True for extension :ext/theme declarations.
Shape is intentionally plain EDN for third-party packages:
{:ext/theme {"THEME_NAME" {"PADDING" "0px"}}}
Theme names may be strings or keywords. Values may be compact setting maps or full theme maps.
True for extension `:ext/theme` declarations.
Shape is intentionally plain EDN for third-party packages:
{:ext/theme {"THEME_NAME" {"PADDING" "0px"}}}
Theme names may be strings or keywords. Values may be compact setting maps
or full theme maps.(extension-theme-settings)(extension-theme-settings theme-registry)Return a registry in extension :ext/theme compact settings shape.
Return a registry in extension `:ext/theme` compact settings shape.
(extension-themes extensions)Merge :ext/theme maps from registered extension descriptors.
Later extensions override earlier themes with the same name.
Merge `:ext/theme` maps from registered extension descriptors. Later extensions override earlier themes with the same name.
Default palette. Kept as a named var for channels that only need colours.
Default palette. Kept as a named var for channels that only need colours.
Deprecated misspelling retained as an alias for callers/searches using
'pallete'. Prefer palette.
Deprecated misspelling retained as an alias for callers/searches using 'pallete'. Prefer `palette`.
(register-theme! theme-map)(register-theme! id theme-map)Add or replace one theme in the process registry.
Arity 1 expects a full theme map with :name. Arity 2 accepts either a
full theme map or a compact settings map such as {"PADDING" "0px"}.
Add or replace one theme in the process registry.
Arity 1 expects a full theme map with `:name`. Arity 2 accepts either a
full theme map or a compact settings map such as `{"PADDING" "0px"}`.(register-themes! theme-map)Add every entry from an extension-style theme map.
{"THEME_NAME" {"PADDING" "0px"}}
Values may be compact settings maps or full theme maps.
Add every entry from an extension-style theme map.
{"THEME_NAME" {"PADDING" "0px"}}
Values may be compact settings maps or full theme maps.(reset-themes!)Reset process registry to built-in themes. Test/dev helper.
Reset process registry to built-in themes. Test/dev helper.
(rgb->css [r g b])Hex CSS color ("#rrggbb") for an RGB triple.
Hex CSS color ("#rrggbb") for an RGB triple.
(rgb? x)True when x is an RGB triple [r g b], each channel 0..255.
True when `x` is an RGB triple `[r g b]`, each channel 0..255.
(theme id)Return registered theme by id (string or keyword). Unknown ids fall back to
default-theme.
Return registered theme by id (string or keyword). Unknown ids fall back to `default-theme`.
(theme->web-css-vars {:keys [palette]})CSS custom-property map ("--bg" -> "#rrggbb") for a theme map - the palette-named tokens, the derived bg/fg mixes, and the luminance-delta-normalized border hairlines.
CSS custom-property map ("--bg" -> "#rrggbb") for a theme map -
the palette-named tokens, the derived bg/fg mixes, and the
luminance-delta-normalized border hairlines.(theme-registry)Return current immutable theme registry map.
Return current immutable theme registry map.
(unregister-theme! id)Remove a theme id. Built-ins reset to their built-in value instead of being removed, so the registry always keeps light and dark available.
Remove a theme id. Built-ins reset to their built-in value instead of being removed, so the registry always keeps light and dark available.
Hairline border vars keyed to a TARGET luminance delta from the ground (NOT
a raw mix ratio): each is mixed from --bg toward the palette's :border-fg
just far enough to hit that delta. Borders then read with equal weight on
EVERY theme — the same presence vis-light's hairline carries — even where a
palette's own border color sits close to its background (Solarized), instead
of washing out to near-white.
Hairline border vars keyed to a TARGET luminance delta from the ground (NOT a raw mix ratio): each is mixed from `--bg` toward the palette's `:border-fg` just far enough to hit that delta. Borders then read with equal weight on EVERY theme — the same presence vis-light's hairline carries — even where a palette's own border color sits close to its background (Solarized), instead of washing out to near-white.
CSS vars DERIVED from the palette as a bg->fg mix ratio, so hover/dim text track any theme's ground automatically (light or dark).
CSS vars DERIVED from the palette as a bg->fg mix ratio, so hover/dim text track any theme's ground automatically (light or dark).
The shared TUI/web theme contract: CSS custom property -> palette token. The web channel renders these straight from the SAME palette the TUI paints with, so every registered theme works in both places.
The shared TUI/web theme contract: CSS custom property -> palette token. The web channel renders these straight from the SAME palette the TUI paints with, so every registered theme works in both places.
(web-css-root theme-or-id)A :root{...} CSS block for a theme id (or theme map): every shared
var from theme->web-css-vars plus color-scheme, ready to serve
AFTER the static stylesheet so it overrides the baked-in defaults.
A `:root{...}` CSS block for a theme id (or theme map): every shared
var from `theme->web-css-vars` plus `color-scheme`, ready to serve
AFTER the static stylesheet so it overrides the baked-in defaults.cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |