0 Replies Latest reply on Jun 19, 2012 4:05 AM by DBarranca

    Apps color theme - how to find the current theme?

    DBarranca Level 4

      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