LangChain brand colors and semantic constants for the CLI.
Single source of truth for color values used in Python code (Rich markup,
Content.styled, Content.from_markup). CSS-side styling should reference
Textual CSS variables: built-in variables
($primary, $background, $text-muted, $error-muted, etc.) are set via
register_theme() in DeepAgentsApp.__init__, while the few app-specific
variables ($mode-bash, $mode-command, $skill, $skill-hover, $tool,
$tool-hover) are backed by these constants via App.get_theme_variable_defaults().
Code that needs custom CSS variable values should call
get_css_variable_defaults(dark=...). For the full semantic color palette, look
up the ThemeColors instance via ThemeEntry.REGISTRY.
Users can define custom themes in ~/.deepagents/config.toml under
[themes.<name>] sections. Each new theme section must include label (str);
dark (bool) defaults to False if omitted (set to True for dark themes).
Color fields are optional and fall back to the built-in dark/light palette based
on the dark flag. Sections whose name matches a built-in theme override its
colors without replacing it. See _load_user_themes() for details.
Background — visible blue tint, distinguishable from pure black.
Surface / card — clearly elevated above background.
Borders on dark backgrounds.
Borders on lighter / hovered backgrounds.
Body text — high contrast on dark backgrounds.
Primary accent blue.
Secondary accent / badges / labels.
Success / positive indicator.
Warning / caution indicator.
Error / destructive actions.
Muted / secondary text.
Subtle green-tinted background for diff additions.
Subtle pink-tinted background for diff removals / errors.
Panel — differentiated section background (above surface).
Skill invocation accent — border and header text.
Skill invocation hover — lighter variant for interactive feedback.
Tool call accent — border and header text.
Tool call hover — lighter variant for interactive feedback.
Background — warm neutral white.
Surface / card — slightly darker than background.
Borders on light backgrounds.
Borders on hovered / focused surfaces.
Body text — high contrast on light backgrounds.
Primary accent blue (darkened for light bg contrast).
Secondary accent (darkened for light bg contrast).
Success / positive (darkened for light bg contrast).
Warning / caution (darkened for light bg contrast).
Error / destructive (darkened for light bg contrast).
Muted / secondary text on light backgrounds.
Subtle green-tinted background for diff additions.
Subtle pink-tinted background for diff removals / errors.
Panel for light theme — differentiated section background.
Skill invocation accent (darkened for light bg contrast).
Skill invocation hover (darkened for light bg contrast).
Tool call accent (darkened for light bg contrast).
Tool call hover (darkened for light bg contrast).
Default accent for headings, borders, links, and active elements.
Accent used when running from an editable (dev) install.
Positive outcomes — tool success, approved actions.
Caution and notice states — auto-approve off, pending tool calls, notices.
De-emphasized text — timestamps, secondary labels.
Shell mode indicator — borders, prompts, and message prefixes.
Command mode indicator — borders, prompts, and message prefixes.
Added-line foreground in inline diffs.
Added-line background in inline diffs.
Removed-line foreground in inline diffs.
Removed-line background in inline diffs.
Unchanged context lines in inline diffs.
Tool call card border.
Tool call headers, slash-command tokens, and approval-menu commands.
Python files in tool-call file listings.
Config / data files in tool-call file listings.
Directories in tool-call file listings.
Loading spinner color.
Color set for the dark LangChain theme.
Color set for the light LangChain theme.
Theme name used when no preference is saved.
Rebuild the theme registry from disk and update ThemeEntry.REGISTRY.
Re-reads ~/.deepagents/config.toml for user-defined themes so that
/reload can pick up config changes without restarting the app.
Return custom CSS variable defaults for the given mode.
Most styling is handled by Textual's built-in CSS variables ($primary,
$text-muted, $error-muted, etc.). This function only returns
app-specific semantic variables that have no Textual equivalent.
Return the ThemeColors for the active Textual theme.
For custom themes (LangChain-branded and user-defined), the pre-built
ThemeColors from the registry is returned directly. For Textual built-in
themes, colors are resolved dynamically from the actual theme properties so
Python-side styling stays in sync with CSS variables.
Textual widget code should call this instead of reading the module-level ANSI constants, which are intended for Rich console output only.
Complete set of semantic colors for one theme variant.
Every field must be a 7-character hex color string (e.g., '#7AA2F7').
Metadata for a registered theme.