There are a couple of supported ways, but the best is probably to set a "data-" attribute on one of the HTML elements in your template. You can then read that attibute's value from the Javascript DOM.
General developer forum
Access theme settings from js
This discussion has been locked so you can no longer reply to it.