I need to have a dynamic theme for my website that comes from a database, possible values are theme-1, theme-2 etc. and I want each one to change the color palette of the site, i.e the primary tailwind color being green for theme-1 but blue for theme-2.
I have tried using https://github.com/upupming/tailwindcss-themeable but it is such an overkill as it regenerates all the colors and has a very cumbersome and long prefix before each class. I want to define the 'theme-1' class at the body level and do something along the lines of this pseudo code
.theme-2 {
/* primary-500 is now color: blue */
}
I am using Tailwind v2 due to dependency constraints.