# get_theme_colors

> **Function** in `deepagents_cli`

📖 [View in docs](https://reference.langchain.com/python/deepagents-cli/theme/get_theme_colors)

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.

## Signature

```python
get_theme_colors(
    widget_or_app: App | object | None = None,
) -> ThemeColors
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `widget_or_app` | `App \| object \| None` | No | Textual `App`, a mounted widget, or `None`. (default: `None`) |

## Returns

`ThemeColors`

`ThemeColors` for the active theme.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/88c2b5cb874dc1d093acf54d2a967ba6e085c99b/libs/cli/deepagents_cli/theme.py#L803)