If your customers are using modern browsers, you might want to look into using CSS variables.
Basically, you define your palette with a few main vars
--main-color: #abc; //default-main-color;
--secondary-color: #def; //secondary-color;
--optional-tertiary-color: var(--main-color); //inherits from main if not specified
…then you use these vars in your CSS file
body {
color: var(--main-color);
}
h1, h2, h3, h4 {
color: var(--secondary-color);
}
…then you can use javascript to override these wherever you’re setting up the file.
if (client == 'santa') {
document.body.style.setProperty('--main-color', 'red');
document.body.style.setProperty('--secondary-color', 'black');
document.body.style.setProperty('--optional-tertiary-color', 'gold');
}
There are obviously many other ways to do this, like custom includes, or adding classes to your elements based on the client, but this is working really well for us.
NB: If you’re using SASS/SCSS and want to implement something like this you might want to look at https://github.com/malyw/css-vars