Get Theme Colors from Plugin

I develop a plugin that shows a dialog interface. I would like to make the dialog’s colors match the user’s current theme.

Could you provide a way to get the current value of different css variables from within the plugin?

getComputedStyle(window.parent.document.documentElement).getPropertyValue('--ls-active-primary-color') only works with local versions of plugins, not with ones distributed via the marketplace.

logseq needs to provide an official API / mechanism for this.

1 Like

correction: There is no way for plugins to access the theme colors · Issue #8896 · logseq/logseq · GitHub