In general Visio shapes have always supported a single solid colour and if you want two or more colors you need to group shapes together. There are some tricks using shadow offsets to add another color, but by and large it’s one color per shape. Visio 2013 changes that by introducing gradients and, aside from the standard use for gradients, this allows you to create regions of different colors across the shape.
To demonstrate this I thought I’d have a go at creating a traffic light shape.
Here’s a quick walkthrough of the process:
Creating the lights
1) Draw three circles and a rectangle and then select Operations / Combine on the Developer tab, which should result in a single shape with four geometry sections.
By default, the boolean rules governing overlapping geometries means that the rectangle geometry will be given the fill and the three Ellipse geometries will be empty.
2) You can reverse this behaviour by opening the ShapeSheet and setting the NoFill cell on the rectangle geometry to TRUE and the fill will be reversed.
So at this stage your geometry sections should look something like this:
3) You can now add the gradient, by right clicking the shape and selecting Format Shape. This will reveal the format task pane, you can select a gradient fill as per the screenshot below. The key point here is that you need to add two overlapping stops at each change in color so that you get a clean change and not a gradient.
If you switch over to the ShapeSheet again, you can see (and edit if you wish) the values that were set:
…and if you have another look at the comparison between the two NoFill cell options you can see how the gradient has be applied in thirds across the shape:
Completing the shape
To complete the shape you need a background, and you might be tempted to try and use the shadow color. Unfortunately, the shadow area will mirror the visible geometry and give you three more circles – not what you want.
So instead, I’ve allowed myself one more shape and added a group to hold the background color and white border.
For more reading:
- Chris Roth has a good post on “Making Shapes More Efficient: Using Fewer Shapes & Groups”
- Creating and Controlling Merged Shapes – Developing Visio Solutions
- How to add reflection, glow, rotation and other effects to your Visio shapes – Visio team blog
- VisGuy.com ‘Gradient’ tag