Contents Previous Next

### 8.2.5 Specifying slice colors and using themes

Another typical change would be to change the colors of the slices. There are two fundamental ways of doing this. You either manually specify the colors for the slices as an array using the method SetSliceColors() If you specify fewer colors than the number of slices they will just wrap around.

Another way is to use one of the pre-defined color "themes". This is just a predefined set of colors that will be used for the slices. You choose what "theme" you like to use with the method ( SetTheme() ) At the time of this writing the available themes are

- "earth"
- "pastel"
- "sand"
- "water"

The following example shows the same pie using the different "themes" in order.

Figure 132: [src]

Figure 133: [src]

Figure 134: [src]

Figure 135: [src]

A complete color chart of all available colors in the different themes can be found here

Another simple change is to remove the border ( or change it's colors ) that separates each slice. This can be done by a call to ShowBorder()

Contents Previous Next