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