The new theming model in Visio 2013 delivers a lot of flexibility and allows you to not only set an overarching theme for the page, but also to set variants around that theme and individual styles based on color, effects and font components. If you want to go further, you can create your own custom color schemes via the UI and, if you want to delve into the ShapeSheet, certain custom theme effects as well.
Via the UI
As I described in ‘Using themes in Visio 2013’, once you’ve selected a theme for page you can create a new custom colors scheme from the Design / Variants / Colors dropdown in the ribbon. Clicking the Create New Theme Colors item displays a dialog from where you can choose a custom palette.
The resulting colors are then stored in a hidden master, which you can see in the Drawing Explorer.
Once you have your new custom colors master you’re free to copy (right-click on the node in the Drawing Explorer) and paste it into any new document. Note – you can’t paste into the Drawing Explorer for your target document, but you can paste it onto the page and then delete the resulting instance shape…the master will be retained and is then available in the colors dropdown.
Down in the ShapeSheet
So let’s look at what’s happening further down. Visio 2013 supports two types of theme – a Dynamic Theme, where the actual value of a color, effect or font is calculated based on a number of factors, and a Fixed Theme, where color or effect values are taken directly from the master in which they are stored.
Custom Dynamic Theme Color Scheme
If you open up the ShapeSheet of the master generated using the above method you’ll see that not only did you get the nine colors in the dialog, but also a further seven variant colors.
This is the only customizable component of the new dynamic theming and all that’s available via the UI. It’s called a custom dynamic theme color scheme.
Once the custom (dynamic) theme color master is available it can be applied to a page or shape by adding a reference to the master via its GUID (unique ID) in the target shape’s ColorSchemeIndex cell within the Theme Properties ShapeSheet section. In order for the master to be identified, the cell has to evaluate to 65535 and so the formula would look like this:
If you apply the custom theme colors via the UI then this cell gets populated for you, but you can also apply it manually or via code if required.
If you’re wondering how to get hold of the master’s GUID you could run a little bit of code print them out to the Immediate window:
Custom Fixed Color and Effect Schemes
An alternative is available, although I suspect this is just to support legacy documents, and that’s custom fixed color and effect schemes. This fixed element of the theming model is basically the old 2007/2010 way of theming. It gives you access to the following properties (all User cells within a hidden master):
Using Fixed Theming you add a User cell to your target shape or master named User.msvThemeColors or User.msvThemeEffects and set its formula to include the USE ShapeSheet function surrounding the GUID of the hidden theme master. You can then reference the User cell values by using the THEME function passing in the string name of the property you’re after. For example if you want to point to the theme’s Line color property you’d type:
Note the missing ‘msvTheme’ part of the User cell name.
If you want to find out more about the custom fixed color and effects schemes then there was an excellent article written about it here: “Designing Shapes for Use with Themes in Visio 2007”
So that brings me to the end of my exploration of the new theming model in Visio 2013…for the time being at any rate.