The Illustrator plugin SDK has a function (AIUITheme->IsUIThemeDark()) to check if the theme is dark or not. I perused the Creative Suite Extension Builder API and didn't find any obvious equivalent functions for extensions.
My best bet at this point is to just guess if a theme is dark based on the AppSkinInfo that I get from a postThemeColorChange callback.
Is there an easier way to do this, something I missed maybe?
I read that. It's where I found most of what I needed. However, as far as I can tell, there is no way to programatically find out if Illustrator is using a dark theme, other than infering it from the colors in the AppSkinInfo.
Yes. You need to infer it from the AppSkinInfo, but if you are using CS6, you can have the skinning change automatically.
There's more than just "dark" and "light" themes. There's a whole range. So I'm not sure that just geting "dark" or "light" will be very useful...
If you play with the Brightness slider, you'll see most components are drawn with only a "dark" or "light" theme, with nothing in-between, except for the background color. For the most part, all font colors, images, selection colors and others only have a "dark" or "light" mode. Dark themes are those with the Brightness setting set to 50% or less, and Light themes are those at 51% or higher. (If you play with the Brightness slider, you'll see how the UI goes through a big change at the 50-51% value, but only the background changes for other values).
I'm doing the auto-skinning. But I have some custom controls that need to be drawn correctly, based on the current theme.
For my purposes, just checking the color of the font is enough to know which theme is being used.
Thanks for your input on this, Harbs.
Europe, Middle East and Africa