Determine Theme

Is there a way to determine the theme in a panel extension? I know for the background i can keep it transparent but knowing the colour of the text to use I have not yet found a way.

There is no current way to get if the website is dark mode or not.