Updated to 2.7.0.beta5 this morning and lots of colors had changed. Looks like the Color Palette isn’t being read correctly and the default color palette that you get when you click on New Palette is being used instead. The two themes below use two different color Palettes, but both end up with the Discourse “New Color Palette” → Base palette: Light defined in the first line of the CSS
If I start with a blank new theme and add a palette, it works as expected, but for my existing themes, the Default Light Palette gets loaded instead of the Palette that is assigned.
It seems like what’s happening is that it loads the correct palette for the base theme, but not for any of the components. So the parts of the page that don’t use a component have the correct colors, but the parts that rely on a component load the default Discourse “Light” palette instead of using the palette that’s assigned to the Theme.
From Developer Tools
color_definitions.scss has the correct palette
Thanks @gkln and @smrtey for the additional details… one thing to try is to disable components one by one to see if that changes anything… It’s possible there’s a silent error that’s not being called out somewhere, and that may be breaking CSS for components.
It seems to happen with any component that uses scss color variables. Everything works fine if I manually add the colors to every individual component:
but that is far from an ideal solution. I don’t see how I can troubleshoot this. There is absolutely no way I have the capacity to figure out what could make Discourse load a different color palette.
ok, @pmusaraj took a closer look and found the bug… it has been fixed here:
…so updating your sites again should fix it.
If these are theme components you’ve built, we recommend updating them to use CSS custom properties instead of our SCSS variables. The switch means you can use automatic dark mode, and makes color overrides easier. More details here: