Is there a way to overwrites all colors?

I am working with a strict color palette and changing the color_schemes results in undesired combinations.

I was wondering if you are aware of a theme that overwrites all colors so I could write my own color functions and modify the whole palette without replacing them one by one.

Thank you, any feedback is appreciated.

1 Like

We haven’t posted it on Meta yet (will next week) but you can override all colors in a theme in your theme’s about.json file (see the color scheme section of Developer’s guide to Discourse Themes)

You can override $primary and other colors as mentioned in the post, but you can also override secondary colors like $primary-low, $primary-high, etc… You can see all the color variables listed here Discourse Theme Creator

Note that at the moment this level of color overrides is only available in remote themes, not themes created locally in the admin ui.


Thanks for the great news and the feature, @awesomerobot, @david.

I just checked it out from a theme repo and it looks amazing. Would this also work with theme cli (discourse_theme watch)?

It would be great if you could include a brief usage for each color and the recommended contrast ratio from their parent variable in the upcoming post.

Are there plans for expanding all color selections to colors schemes in the admin ui anytime soon?

You can now override the colors in a remote theme, see: Override values for auto-generated color variables