Skip navigation
Currently Being Moderated

Apps color theme - how to find the current theme?

Jun 19, 2012 4:05 AM

Tags: #styles #themes #extension_builder

Hi,

I'd like to dynamically change some button icons depending on the color theme in Photoshop CS6.

So far I've been able to sync my extension with the theme via CSInterface.instance.autoThemeColorChange = true;

The extension is listening for an AppReskinEvent.APPLICATION_RESKIN event, firing the appropriate event handler which deals with HostEnvironment and AppSkinInfo variables.

 

I plan to use .setStyle() to dynamically sync the button's icon: I'm wondering whether there's or not a way to find the current theme (Black - Dark Gray - Mid Gray - Light Gray) in order to init the icon correctly.

Currently, I'm doing it testing against a component's property - for instance the focus color of a numericStepper (which I know changes depending on the theme's darkness - it's blue for light themes and orange for dark ones - and I've traced the exact colors so I can write the appropriate conditional), but it seems to me rather clumsy.

Any suggestion to better deal with it?

 

Thanks

 

Davide

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points