change root color js code example Example: change root color js document.documentElement.style.setProperty('--your-variable', '#YOURCOLOR');