Yes there are tests that have been done. Essentially you apply the CSS changes via JavaScript and measure the performance.
You will want to learn about scoping your CSS variables and the number of affected elements. As these numbers increase, so does your draw time.
There is a handy article on this subject at https://lisilinhart.info/posts/css-variables-performance/
TL;DR
be aware of style recalculations, since CSS Variables are inheritable — changing a variable on a parent can affect many children
prefer using single classes for elements to make style calculations easier for the browser
calc() has good performance with variables, but still has problems with browser support with certain units like deg or ms
prefer using setProperty rather than inline styles to set CSS variables in JavaScript
And another quote:
Via Javascript the --bg variable was first set on the .container parent element, which resulted in a fairly long duration of 76ms. Then the same variable was set on the first child .el , which only lasted about 1.9ms. So the more children a parent element has using this variable, the more expensive setting a CSS variable on this element gets.