I am defining my theme colors as variables in my CSS file. Then I want to use the same colors in my JavaScript (it takes values from a database and generates graphs). I do not want to specify the colors again in the JS. Can I load a list of colors from the CSS, and if so, how?
CSS file:
/* http://www.colorhunt.co/c/43601 */ :root{ --maincolor: #113f67; --secondcolor: #34699a; --thirdcolor: #408ab4; --fourthcolor: #65c6c4; }