Zmodyfikuj root w JavaScript

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