Hi there everyone,
A client of ours has multiple color sets they want to utilize for different theme variations. I noticed in the Theme Editor that I can only select one color for each part (i.e. - red for the accent, yellow for the alternate accent, etc.)
I’m aware that I could clone their main theme and swap the colors to whatever other color sets they would like..however, is it possible on a CSS/Javascript side, or even with a toggle module, to swap out the colors on the fly to other designated ‘color sets’ that I could create in the CSS file?
If the simpler solution is to create clones of the theme with different color variations, I can do that..but being able to toggle separate theme colorations on the fly from a module bar sounded alot cleaner and more appealing for me.
Is this possible?
Thanks!
P.S. - Forgive me if this is in the incorrect location. This is only my second post here.
@Kadranos child themes preconfigured with each of the color schemes would be the most user friendly on their side, it would make selecting the templates and building the pages default to the color schemes they want.
If you have to swap colors or add overrides at the module level, then someone is manually adjusting every page for the alternate schemes.
The other option would be to create one child theme that has the color variants built into the theme settings via the fields.json and then have a module at the page level where they choose the color scheme (like a “page settings” module that’s hidden and not visible in the DND). Then they would set each color scheme in a single child theme and select it at the page level so it automatically applies to all of the modules based on the color scheme selected and which module variables are controlled by that change.
It’s a pretty big undertaking, so if you’ve already built their website pages or they have a lot of existing content using a theme already, that may not be the best route.
Hi Jennifer!
Thank you for the response. I went ahead and developed multiple child themes as this was the simpler solution.
There was no need for the additional complexity as they are a relatively new client of ours with very few pages at the moment. I’ll of course reference this post if I ever need to go back and make additional changes, so again thank you! ![]()
You’re welcome @Kadranos, happy to help! I’m glad you found a solution that works for what you and your clients need now.