I&#x27;m not a fan of this...<p>&#x2F;* JS *&#x2F;
var styles = getComputedStyle(document.documentElement);
var value = String(styles.getPropertyValue(&#x27;--primary-color&#x27;)).trim();
&#x2F;&#x2F; value = &#x27;red&#x27;<p>Rather than calling &#x27;--primary-color&#x27;, you should really be able to call &#x27;color&#x27; which points to the variable and will still return red. Otherwise you&#x27;ll have to know the name of each variable being used, which is much more difficult than knowing the property.