Is it possible to get CSS custom property with JS?

So I’ve tried to get custom prop in a bunch of variations of

// ...

No luck - I always get an empty string. Does UXP support that at all?

As a workaround I get the theme with batchPlay, but I have no idea what actual colors are depending on the themes :frowning: