bootstack.style.get_theme_color#

bootstack.style.get_theme_color(token)#

Get a hex color value from a color token based on the active theme.

Parameters:

token (str) – Color token name (e.g., “primary”, “background”).

Returns:

Hex color string (e.g., “#007bff”).

Raises:

ValueError – If the color token is invalid.

Return type:

str

Examples

>>> primary = get_theme_color("primary")
>>> print(primary)  # "#007bff"