Lanterna adapter for internal com.blockether.vis.internal.theme tokens.
Lanterna adapter for internal `com.blockether.vis.internal.theme` tokens.
(apply-theme! theme-id)Apply registered theme id to the TUI adapter vars. Future paints use the updated Lanterna colors/widths/spacing without requiring channels to ship their own theme declaration.
Apply registered theme id to the TUI adapter vars. Future paints use the updated Lanterna colors/widths/spacing without requiring channels to ship their own theme declaration.
(chip-tint tint)Foreground/background pair for a semantically COLOURED button chip
(components/button!'s :tint). The cap is FILLED with the accent colour and
the label painted in the inverse-tab foreground for contrast — the same
filled-cap treatment hovered header buttons use, so a tinted chip reads as a
real button, not decoration. Unknown tints fall back to the neutral button
palette.
Foreground/background pair for a semantically COLOURED button chip (`components/button!`'s `:tint`). The cap is FILLED with the accent colour and the label painted in the inverse-tab foreground for contrast — the same filled-cap treatment hovered header buttons use, so a tinted chip reads as a real button, not decoration. Unknown tints fall back to the neutral button palette.
(contrast-ink bg)Label colour for text painted ON the FILL colour bg: whichever of the
dialog's ink and its surface sits further from bg in luminance.
Every theme keeps one of that pair light and the other dark, so a filled chip (a PRIMARY/FALLBACK badge, say) stays legible whatever hue the active theme gives it — no per-theme label colour to keep in sync.
Label colour for text painted ON the FILL colour `bg`: whichever of the dialog's ink and its surface sits further from `bg` in luminance. Every theme keeps one of that pair light and the other dark, so a filled chip (a PRIMARY/FALLBACK badge, say) stays legible whatever hue the active theme gives it — no per-theme label colour to keep in sync.
(mix-color a b t)Colour a moved t (0.0-1.0) of the way toward colour b.
Colour `a` moved `t` (0.0-1.0) of the way toward colour `b`.
(table-head-bg bg)Background for a table's HEADER row: bg driven MOST of the way to the
theme's ink.
The header is not one more zebra stripe - it is the sheet's label row, so it
gets a solid strip and (with contrast-ink) inverted text on top: dark band /
light letters on a light theme, the exact inverse on a dark one. Same
derivation as zebra-bg, so an unseen theme needs no new token.
Background for a table's HEADER row: `bg` driven MOST of the way to the theme's ink. The header is not one more zebra stripe - it is the sheet's label row, so it gets a solid strip and (with `contrast-ink`) inverted text on top: dark band / light letters on a light theme, the exact inverse on a dark one. Same derivation as `zebra-bg`, so an unseen theme needs no new token.
(zebra-bg bg)Background for the ALTERNATING row of a striped table: the row's own
background bg mixed a tenth of the way toward the theme's ink.
Derived instead of a palette token, so the stripe darkens on a light theme and lightens on a dark one, and a theme this build has never seen - a user's own, or one an extension registers at runtime - gets a legible zebra without one more colour to keep in sync across every palette.
Background for the ALTERNATING row of a striped table: the row's own background `bg` mixed a tenth of the way toward the theme's ink. Derived instead of a palette token, so the stripe darkens on a light theme and lightens on a dark one, and a theme this build has never seen - a user's own, or one an extension registers at runtime - gets a legible zebra without one more colour to keep in sync across every palette.
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 |