Zmodyfikuj root w JavaScript
document.documentElement.style.setProperty('--your-variable', '#YOURCOLOR');
Rolly Craft
document.documentElement.style.setProperty('--your-variable', '#YOURCOLOR');