All colors in sphinx-design are controlled via CSS variables. To customize the theme, create a .css file in your project's _static directory and include it in your Sphinx conf.py configuration.
To customize semantic colors, you should define three specific variables for each color name:
--sd-color-{name}: The base color.--sd-color-{name}-highlight: The color used for interaction states (like hovering over a button). Defaults to a 15% darker version of the base color.--sd-color-{name}-text: The color used for text displayed on top of that color background.
Semantic color names available: primary, secondary, success, info, warning, danger, light, muted, and dark.
# In your Sphinx conf.py
html_static_path = ['_static']
html_css_files = ['custom.css']
/* In your _static/custom.css */
:root {
--sd-color-primary: #your-color;
--sd-color-primary-highlight: #your-highlight-color;
--sd-color-primary-text: #your-text-color;
}