Documentation
¶
Index ¶
- Constants
- func ANSIPalette(t Theme) [16]color.Color
- func ActiveThemeName() string
- func AdaptiveColor(light, dark string) color.Color
- func ApplyGradient(text string, colorA, colorB color.Color) string
- func ApplyTheme(name string) error
- func ApplyThemeWithoutSave(name string) error
- func BodyWidth(termWidth int) int
- func ColorProfile() colorprofile.Profile
- func CompleteANSIFrom(s string) string
- func CompleteANSIOnly(s string) string
- func ContentWidth(termWidth int) int
- func CreateBadge(text string, c color.Color) string
- func CurrentThemeName() string
- func FirstLines(s string, count int) string
- func GetMarkdownTypography() *herald.Typography
- func GetUITypography() *herald.Typography
- func GutterBorder() lipgloss.Border
- func HexOf(c color.Color) string
- func HighlightFile(source, fileName string) string
- func HighlightLang(source, lang string) string
- func Indent(s string, n int) string
- func IsDarkBackground() bool
- func KitBanner() string
- func KitLogoFits(contentWidth int) bool
- func KitLogoLines(contentWidth int) []string
- func KitLogoLinesAt(contentWidth, frame int) []string
- func ListThemes() []string
- func NewNoteTypography(label string) *herald.Typography
- func NormalizeOutput(s string) string
- func ProjectThemesDir() string
- func RegisterThemeFromConfig(name string, ...)
- func RemapANSI16(s string, palette [16]color.Color) string
- func ResolveTerminalCapabilities()
- func SetTerminalCapabilities(darkBackground bool, colorProfile colorprofile.Profile)
- func SetTheme(theme Theme)
- func SplashBlock(lines []string) string
- func StripCursorControl(s string) string
- func StripForContext(s string) string
- func SupportsSmoothAnimation() bool
- func SyntaxStyle() *chroma.Style
- func ThemeGeneration() uint64
- func ToMarkdown(content string, width int) string
- func TrimTrailingResets(s string) string
- func UserThemesDir() string
- type CachedStyles
- type MarkdownThemeColors
- type StreamingMarkdown
- type StylingState
- type Theme
- type ThemeEntry
Constants ¶
const ( // ContentOffset is the column at which every block's text begins. ContentOffset = 2 // RightMargin is the number of columns deliberately left empty at the // right edge. Text that runs flush to the final column reads as though // it has been cut off even when it has not. RightMargin = 1 // BlockGap is the number of blank lines that follow every block in the // transcript. Spacing is the block's own responsibility: the scroll list // concatenates items verbatim and inserts nothing between them. BlockGap = 1 // MinContentWidth is the floor for any computed width. Below this a // block cannot render anything legible, so renderers clamp here and // accept horizontal overflow rather than producing negative widths or // wrapping every word onto its own line. MinContentWidth = 20 )
const GutterGlyph = "▌"
GutterGlyph is the single character used to mark a block's left edge throughout the UI: user messages, alerts, permission prompts and any other element that needs to be visually attributed.
One glyph, colored by role, replaces what used to be three competing conventions (a thick ┃ for user messages, a light │ for alerts, and bare indentation for tool bodies). A half-block reads as a deliberate stripe at any font weight, where box-drawing characters vary between terminals and invite the eye to look for a matching corner that never comes.
const KitLogoAnimationFrames = kitLogoSweepFrames + kitLogoScannerFrames
KitLogoAnimationFrames is the total number of frames in the startup animation. Frame indices at or beyond this render the resting logo.
const KitLogoHeight = 7
KitLogoHeight is the number of rows the wordmark block occupies.
Variables ¶
This section is empty.
Functions ¶
func ANSIPalette ¶ added in v0.118.0
ANSIPalette returns the 16 standard ANSI colours for a theme: indices 0-7 are the normal colours and 8-15 the bright ones.
The palette is derived rather than configured. Command output is content the theme does not own, so the mapping reuses the theme slots that already carry the right meaning: Error is red, Success is green, Warning is amber, Info is blue, and so on. A theme that wants different raw-output colours would need sixteen more knobs in the theme file, which is a poor trade for output most users never look at closely.
The result must be recomputed after a theme change, because it bakes in the colours resolved for the active background.
func ActiveThemeName ¶
func ActiveThemeName() string
ActiveThemeName returns the name of the currently active theme by comparing against known entries. Returns "custom" if no match is found.
func AdaptiveColor ¶
AdaptiveColor picks between a light-mode and dark-mode hex color string based on the detected terminal background. This replaces the old lipgloss.AdaptiveColor{Light: ..., Dark: ...} pattern from v1.
func ApplyGradient ¶
ApplyGradient applies a color gradient from colorA to colorB across the text. Uses ~8 color stops for performance rather than per-character coloring.
func ApplyTheme ¶
ApplyTheme loads a theme by name and sets it as the active global theme. The selection is persisted to ~/.config/kit/preferences.yml so it survives across sessions. Persistence errors are silently ignored — the theme is still applied in-memory even if the write fails.
func ApplyThemeWithoutSave ¶
ApplyThemeWithoutSave loads a theme by name and sets it as the active global theme without persisting the choice. Used at startup to restore a previously saved preference without redundantly re-writing it.
func BodyWidth ¶ added in v0.91.0
BodyWidth returns the number of columns available to content nested one level inside a block that already carries a marker — an alert body sitting behind a gutter bar, or tool output rendered beneath a tool header.
Nested content pays for its own indent on top of the block's, so it is one ContentOffset narrower than ContentWidth.
func ColorProfile ¶ added in v0.118.0
func ColorProfile() colorprofile.Profile
ColorProfile returns the active terminal's colour depth.
It is the read side of SetTerminalCapabilities. A caller that overrides the capabilities has to be able to read back what it replaced, because the setter has no inverse: without this there is no way to put the previous profile back once it has been changed.
func CompleteANSIFrom ¶ added in v0.118.0
CompleteANSIFrom returns s with a leading fragment of an escape sequence removed.
It is the counterpart of CompleteANSIOnly for the other end of a window. A block that shows only the tail of a very long line cuts at an arbitrary byte, and that byte can be the middle of a colour code; the half before the cut would otherwise be printed literally.
A fragment is recognised by its shape, because the caller cannot say whether the window starts mid-sequence: an optional introducer, then parameter bytes, then a final byte. Text that does not have that shape is returned unchanged, so ordinary content is never eaten. A string that begins with ESC is left alone; that is a sequence that starts cleanly, and CompleteANSIOnly is the function that judges it.
func CompleteANSIOnly ¶ added in v0.118.0
CompleteANSIOnly returns s with a trailing, unterminated escape sequence removed.
Output arrives in whatever sized pieces the program chose to write, so a stream boundary can land in the middle of a colour code. Drawn as-is the partial code is printed literally for one frame — a flash of `[38;2;255;0` in the middle of the transcript — and then disappears when the rest arrives. Dropping the partial tail removes the flash at the cost of showing that one colour a frame late, which is invisible.
This matters only while a command is still producing output. A finished buffer is complete by definition, so the scan finds a ground state at the end and returns s untouched.
func ContentWidth ¶ added in v0.91.0
ContentWidth returns the number of columns available to text that begins at ContentOffset within a terminal of the given total width, leaving RightMargin columns free at the right edge.
This is the budget for a top-level block: user messages, assistant prose, the splash, alerts.
func CreateBadge ¶
CreateBadge generates a styled badge or label with inverted colors (text on colored background) for highlighting important tags, statuses, or categories.
func CurrentThemeName ¶ added in v0.96.0
func CurrentThemeName() string
CurrentThemeName returns the name of the active theme, or "" when no theme has been applied by name and the lazily derived default is in effect.
func FirstLines ¶ added in v0.118.0
FirstLines returns the first count lines of s, or all of s when it has fewer.
func GetMarkdownTypography ¶
func GetMarkdownTypography() *herald.Typography
GetMarkdownTypography returns a herald.Typography configured with our active theme colors. The typography is cached and only rebuilt when the theme changes via SetTheme.
The theme is assembled from a palette plus per-element overrides rather than from a herald.Theme literal. WithTheme *replaces* the theme wholesale, so a literal leaves every field it does not mention at its zero value — and many of herald's fields are glyphs and widths, not colors. A literal therefore silently erased the list bullet char, the nested-list bullets and indent, the blockquote bar, the heading bar, the horizontal-rule char and width, and the entire table border set: `- item` rendered as a bare indented line, `---` rendered as nothing at all, and a table collapsed to `a│b`. Seeding from the palette keeps herald's defaults for every token and spends the overrides only where the color has to be ours.
func GetUITypography ¶ added in v0.85.1
func GetUITypography() *herald.Typography
GetUITypography returns the shared herald.Typography used for message block rendering, configured from the active theme. The instance is cached and only rebuilt after a theme change (SetTheme invalidates it).
func GutterBorder ¶ added in v0.89.0
GutterBorder returns a lipgloss border consisting only of a left edge drawn with GutterGlyph. Callers enable just the left side; the remaining fields exist because lipgloss requires a complete Border value.
func HexOf ¶ added in v0.96.0
HexOf renders a color as a "#rrggbb" string.
color.Color reports 16-bit premultiplied channels, so each is scaled down to 8 bits. A nil color yields "", which callers treat as "unset" rather than black — the two are not interchangeable when the value feeds a theme slot.
func HighlightFile ¶ added in v0.94.0
HighlightFile applies syntax highlighting to source, choosing a lexer from fileName and falling back to content analysis. Returns the source unchanged when no lexer matches or highlighting fails.
func HighlightLang ¶ added in v0.94.0
HighlightLang applies syntax highlighting to source using the lexer for the given language name or alias — the info string of a markdown fence, or a file extension. Returns the source unchanged for an unknown language.
func Indent ¶ added in v0.89.0
Indent prefixes every non-empty line of s with n spaces. Empty lines are left untouched so the indent never leaves trailing whitespace behind.
func IsDarkBackground ¶
func IsDarkBackground() bool
IsDarkBackground returns whether the active terminal has a dark background. Capabilities are resolved lazily on first use, or supplied ahead of time via SetTerminalCapabilities.
func KitBanner ¶
func KitBanner() string
KitBanner returns the KIT ASCII art title with KITT scanner lights, rendered with a KITT red gradient.
This is the banner used in `--help` output, where the art stands alone and is centered by its own leading padding. The TUI splash uses KitLogoLines instead, which is unpadded so it can sit inside a gutter-marked block.
func KitLogoFits ¶ added in v0.92.0
KitLogoFits reports whether the block art will render at the given content width, or whether KitLogoLines will fall back to a plain "KIT".
func KitLogoLines ¶ added in v0.89.0
KitLogoLines returns the KIT wordmark as gradient-colored lines, sized for a block that will be rendered at the given content width.
Fixed-width block art cannot wrap, so below the width it needs the wordmark degrades to a plain bold "KIT" rather than spilling across the terminal.
func KitLogoLinesAt ¶ added in v0.92.0
KitLogoLinesAt returns the wordmark at the given startup-animation frame. Frames at or beyond KitLogoAnimationFrames render the resting logo, so a caller that does not animate can simply ask for the final frame — which is what KitLogoLines does.
Colour is computed per cell as a function of (x, y, frame) and written into an ultraviolet buffer, because the effects vary along both axes and over time; that cannot be expressed as a gradient across a run of runes. Each row gets its own buffer sized to that row's own length, which keeps the art unpadded — a rectangular buffer would emit trailing spaces on the short rows, and the block is deliberately ragged so it can sit at any left offset.
func ListThemes ¶
func ListThemes() []string
ListThemes returns the names of all available themes (built-in + user).
func NewNoteTypography ¶ added in v0.91.0
func NewNoteTypography(label string) *herald.Typography
NewNoteTypography returns a Typography identical to the shared UI instance but with the Note alert relabelled — for one-off blocks that want a title like "Help" or "Warning" without changing the default "Info".
The result is not cached: callers are rare (slash-command output), and caching per label would keep a Typography alive for every label ever used.
func NormalizeOutput ¶ added in v0.118.0
NormalizeOutput prepares raw shell output for drawing in the scrollback. It is the whole pipeline in one call: StripCursorControl, then RemapANSI16, then a downsample to whatever colour depth the terminal can actually show.
The order matters. Cursor control has to go first, because a removed `\x1b[K` can unbalance the style state that the remap then rewrites. The downsample has to go last, so it sees the final truecolor values.
Calling this once per frame on a growing buffer is affordable: the two passes are a single sequential scan each, and the shell block only ever renders its visible window rather than the whole transcript.
func ProjectThemesDir ¶
func ProjectThemesDir() string
projectThemesDir returns .kit/themes/ relative to the working directory. Returns "" if the directory doesn't exist (does NOT create it).
func RegisterThemeFromConfig ¶
func RegisterThemeFromConfig(name string, primary, secondary, success, warning, error_, info, text, muted, veryMuted, background, border, mutedBorder, system, tool, accent, highlight, mdHeading, mdLink, mdKeyword, mdString, mdNumber, mdComment [2]string)
RegisterThemeFromConfig adds a theme to the runtime registry from an extension's ThemeColorConfig (string hex pairs). Replaces any existing entry with the same name. The theme is immediately available via ListThemes, LoadThemeByName, and ApplyTheme.
func RemapANSI16 ¶ added in v0.118.0
RemapANSI16 rewrites the basic 16-colour SGR codes in s to explicit 24-bit values from palette.
Programs emit `\x1b[31m` and leave the choice of red to the terminal. Inside the TUI that default is chosen for ordinary terminal text, not for text drawn on this application's background, so it is often unreadable. Rewriting the code to truecolor keeps the output legible whatever the terminal is configured to do.
Extended colours (`38`/`48`/`58` with `;5;n` or `;2;r;g;b`) and non-colour attributes (bold, italic, underline) pass through untouched, as do the default colour resets 39, 49 and 59.
func ResolveTerminalCapabilities ¶ added in v0.94.0
func ResolveTerminalCapabilities()
ResolveTerminalCapabilities eagerly resolves the terminal background and colour profile against the current process terminal, unless they have already been resolved or supplied via SetTerminalCapabilities.
The interactive frontend calls this once during startup, before the TUI takes over the terminal, so the background-detection OSC query runs at a point where it cannot race the event loop's reads of stdin. Headless frontends should call SetTerminalCapabilities instead and skip this, to avoid probing fds that do not describe their client.
func SetTerminalCapabilities ¶ added in v0.94.0
func SetTerminalCapabilities(darkBackground bool, colorProfile colorprofile.Profile)
SetTerminalCapabilities overrides the terminal background and colour profile used by every subsequent styling decision in this package.
It exists so a frontend can supply the capabilities of the terminal it is actually serving instead of inheriting whatever the process's own fds report. This replaces the former package-init probes, which fired once against the process stdin/stdout and could not represent more than one terminal.
Call this on the UI goroutine, the same as SetTheme: besides the mutex-guarded capability swap, it rebuilds theme-derived caches (currentTheme, the generation counter, the typography/style/syntax caches) that the render loop reads unsynchronized. It is intended to be called once during setup, before the render loop starts, or from within Update.
func SetTheme ¶
func SetTheme(theme Theme)
SetTheme updates the global UI theme, affecting all subsequent rendering operations. This allows runtime theme switching for different visual preferences. It also invalidates the markdownTypographyCache so the next call to GetMarkdownTypography picks up the new theme.
func SplashBlock ¶ added in v0.89.0
SplashBlock renders the startup splash: content lines indented to the shared content column, with no left stripe.
KIT anthropic · claude-opus-5 context ~/project/AGENTS.md skills btca-cli, kit-extensions
The splash carries no gutter glyph because it is not attributed to anyone — it is the application introducing itself, not a message from the user, the assistant or a tool. A stripe here would compete with the wordmark it sits beside and imply an authorship the block does not have.
The block costs exactly as many rows as it has something to say, so a session with no skills or extensions loaded produces a shorter splash.
Like every block in the transcript it carries its own trailing gap; the scroll list inserts nothing between items.
func StripCursorControl ¶ added in v0.118.0
StripCursorControl removes the escape sequences that move the cursor, erase regions of the screen, or change terminal modes. Programs such as `git push`, `cargo build` and `npm install` emit all of them to animate progress bars. Replayed as text inside a viewport, those sequences corrupt the render state rather than animating anything.
Preserved: SGR (colour and style) sequences, OSC hyperlinks, printable text. Stripped: CSI cursor movement, erase and scroll, save/restore cursor, DEC private mode set and reset, and the two-byte ESC save/restore sequences.
Bare carriage returns are resolved too: the text after the last \r on a line replaces the text before it. This is what turns a progress bar that repaints itself into the single final state of that bar.
This is not exactly what a real terminal shows. A terminal overwrites cell by cell, so `Downloading...\rDone` leaves `Doneding...` behind. Replacing the line instead keeps the transcript readable, which is the point of the transform. The one exception is a \r with nothing after it, which moves the cursor and writes nothing: there the text before it is kept, or a program that ends its line with a bare \r would lose that line entirely.
func StripForContext ¶ added in v0.118.0
StripForContext returns s with every escape sequence removed. This is the form that goes to the language model: the model reads text, and escape sequences are noise it can only misread.
func SupportsSmoothAnimation ¶ added in v0.92.0
func SupportsSmoothAnimation() bool
SupportsSmoothAnimation reports whether the terminal has the colour depth for a gradient animation to read as motion.
Below ANSI256 a sweep collapses onto a handful of available colours and strobes between them, which looks like a rendering fault rather than an effect. Honouring the profile also means NO_COLOR and non-TTY output opt out for free.
func SyntaxStyle ¶ added in v0.89.0
SyntaxStyle returns a chroma style built from the active theme's markdown colors.
Syntax highlighting used to be pinned to an external palette, which meant a warm red/amber theme rendered code in blues, purples and greens — a second, unrelated color scheme living inside the first. Deriving the style from the theme keeps code blocks in the same family as everything around them, and makes every user theme (and every custom theme file) apply to code as well.
Token backgrounds are left unset so the containing lipgloss style controls the fill; setting both produces visible seams at each token boundary.
func ThemeGeneration ¶ added in v0.93.0
func ThemeGeneration() uint64
ThemeGeneration returns a counter that increments on every theme change.
Anything that memoizes rendered output stamps the cached value with the generation it was produced at and discards it once the stamp no longer matches. That keeps colors correct across a theme switch without forcing eager re-rendering: each cache is rebuilt lazily, at most once per switch, and only when something asks for it again.
func ToMarkdown ¶
ToMarkdown renders markdown content using herald-md and wraps the result to the given width so that long lines do not overflow the terminal.
func TrimTrailingResets ¶ added in v0.118.0
TrimTrailingResets removes trailing whitespace and the bare reset sequences that programs append after their last line of output.
The reset sits between the content and the newline, so trimming only "\n" misses it: `\x1b[0m\n` is what `task` and several other tools emit, and the bytes in between are exactly what the loop below walks back over.
func UserThemesDir ¶
func UserThemesDir() string
userThemesDir returns ~/.config/kit/themes, creating it if needed.
Types ¶
type CachedStyles ¶ added in v0.59.0
type CachedStyles struct {
// render/blocks.go
FileTokenAccent lipgloss.Style // Foreground(Accent).Bold(true)
Muted lipgloss.Style // Foreground(Muted)
VeryMuted lipgloss.Style // Foreground(VeryMuted)
Accent lipgloss.Style // Foreground(Accent)
MarginBottom1 lipgloss.Style // MarginBottom(1)
// stream.go - spinner phases
SpinnerBright lipgloss.Style // Foreground(Primary)
SpinnerMed lipgloss.Style // Foreground(Muted)
SpinnerDim lipgloss.Style // Foreground(VeryMuted)
SpinnerOff lipgloss.Style // Foreground(MutedBorder)
// message_items.go - bash output
BashHeader lipgloss.Style // Foreground(Muted).Italic(true)
BashStderr lipgloss.Style // Foreground(Error)
// render/blocks.go - tool block
ToolSuccess lipgloss.Style // Foreground(Success)
ToolError lipgloss.Style // Foreground(Error)
ToolInfo lipgloss.Style // Foreground(Info).Bold(true)
ToolMuted lipgloss.Style // Foreground(Muted)
// common
ErrorFg lipgloss.Style // Foreground(Error)
TextBold lipgloss.Style // Foreground(Text).Bold(true)
}
CachedStyles holds pre-built lipgloss styles that are reused across render frames. Invalidated by SetTheme, lazily rebuilt on next access. Only accessed from BubbleTea's single-threaded Update/View cycle.
func GetCachedStyles ¶ added in v0.59.0
func GetCachedStyles() *CachedStyles
GetCachedStyles returns the pre-built style cache, creating it lazily from the current theme. Invalidated by SetTheme.
type MarkdownThemeColors ¶
type MarkdownThemeColors struct {
Text color.Color
Muted color.Color
Heading color.Color
Emph color.Color
Strong color.Color
Link color.Color
Code color.Color
Error color.Color
Keyword color.Color
String color.Color
Number color.Color
Comment color.Color
}
MarkdownThemeColors defines colors for markdown rendering and syntax highlighting.
type StreamingMarkdown ¶ added in v0.116.0
type StreamingMarkdown struct {
// contains filtered or unexported fields
}
StreamingMarkdown renders a markdown document that only ever grows at the end (a streaming LLM response) without re-rendering the whole document on every update.
ToMarkdown is linear in the document length, and a streaming message is re-rendered on every flush, so over a long response the total work is quadratic: ~50ms per render at 60KB. StreamingMarkdown splits the document at stable block boundaries (see stableMarkdownBoundary), keeps the rendered output of everything before the last boundary, and renders only the tail.
The split relies on herald joining top-level blocks with a blank line, so Render(content) equals ToMarkdown(content) for the boundaries chosen here. The boundary rule is conservative, but markdown has corner cases (e.g. a link reference definition in the tail that a link in the prefix uses), so callers should do one full ToMarkdown when the document is complete.
The zero value is ready to use. Not safe for concurrent use.
func (*StreamingMarkdown) Render ¶ added in v0.116.0
func (s *StreamingMarkdown) Render(content string, width int) string
Render returns the rendered markdown for content at width, reusing the cached prefix when content extends the previously rendered content.
func (*StreamingMarkdown) Reset ¶ added in v0.116.0
func (s *StreamingMarkdown) Reset()
Reset drops the cached prefix.
type StylingState ¶ added in v0.118.0
type StylingState struct {
// contains filtered or unexported fields
}
StylingState is a snapshot of everything SetTheme and SetTerminalCapabilities change: the theme, whether it was chosen or derived, and the terminal capabilities it was resolved against.
It exists because those setters have no inverse. SetTheme marks the theme explicit, so a caller that only meant to borrow a palette cannot put the derived behaviour back — and a derived theme keeps following the terminal's background, while an explicit one does not. SetTerminalCapabilities likewise overwrites the profile with nothing to restore it from. Restoring through SetTheme alone therefore leaves the package in a state no setter could produce.
func CaptureStylingState ¶ added in v0.118.0
func CaptureStylingState() StylingState
CaptureStylingState returns the current styling state, for handing back to StylingState.Restore once it has been overridden.
func (StylingState) Restore ¶ added in v0.118.0
func (s StylingState) Restore()
Restore puts the captured state back, including the derived-versus-explicit distinction that SetTheme cannot undo on its own.
type Theme ¶
type Theme struct {
Primary color.Color
Secondary color.Color
Success color.Color
Warning color.Color
Error color.Color
Info color.Color
Text color.Color
Muted color.Color
VeryMuted color.Color
Background color.Color
Border color.Color
MutedBorder color.Color
System color.Color
Tool color.Color
Accent color.Color
Highlight color.Color
// Diff block backgrounds
DiffInsertBg color.Color // Green-tinted bg for added lines
DiffDeleteBg color.Color // Red-tinted bg for removed lines
DiffEqualBg color.Color // Neutral bg for context lines
DiffMissingBg color.Color // Empty-cell bg when sides are uneven
// Code/output block backgrounds
CodeBg color.Color // Background for code blocks (Read tool)
GutterBg color.Color // Line-number gutter background
WriteBg color.Color // Green-tinted bg for Write tool content
// InputBg fills the composer bar. It is a shade off the terminal
// background — enough to read as a distinct surface, not enough to
// compete with message content for attention.
InputBg color.Color
// Markdown rendering and syntax highlighting colors
Markdown MarkdownThemeColors
}
Theme defines a comprehensive color scheme for the application's UI, supporting both light and dark terminal modes through adaptive colors. Inspired by the Knight Rider KITT aesthetic — scanner reds, amber dashboard glows, and dark cockpit tones.
func DefaultTheme ¶
func DefaultTheme() Theme
DefaultTheme creates and returns the default KIT theme inspired by the Knight Rider KITT aesthetic — scanner reds, amber dashboard glows, and a dark cockpit. Everything stays in the warm red/amber/gray family of KITT's instrument panel, with two deliberate exceptions.
Success and Error must never be mistaken for Warning or for the brand red, because they carry opposite meanings and they appear in the same places (the turn receipt, the activity row, tool markers). Success therefore leans olive-green and Error leans crimson: both still warm, both unmistakably not amber and not scanner red.
func GetTheme ¶
func GetTheme() Theme
GetTheme returns the currently active UI theme. The theme controls all color and styling decisions throughout the application's interface. On first use it lazily derives DefaultTheme against the active terminal capabilities.
func LoadThemeByName ¶
LoadThemeByName looks up a theme by name, loads it if needed, and returns it.
type ThemeEntry ¶
type ThemeEntry struct {
Name string // Display name (filename stem or preset name)
Source string // "builtin" or absolute file path
// contains filtered or unexported fields
}
ThemeEntry is a named, loadable theme — either built-in or discovered from disk.
func (*ThemeEntry) Theme ¶
func (e *ThemeEntry) Theme() (Theme, error)
Theme returns the resolved ui.Theme, loading from disk on first access.