var bool = true; const hs = document.documentElement.style; if ( bool ) { hs.color = "#222" }