ColorSchemes Object

PowerPoint Developer Reference

A collection of all the ColorScheme objects in the specified presentation. Each ColorScheme object represents a color scheme, which is a set of colors that are used together on a slide.

Example

Use the ColorSchemes property to return the ColorSchemes collection. Use ColorSchemes(index), where index is the color scheme index number, to return a single ColorScheme object. The following example deletes color scheme two from the active presentation.

Visual Basic for Applications
  ActivePresentation.ColorSchemes(2).Delete

Use the Add method to create a new color scheme and add it to the ColorSchemes collection. The following example adds a color scheme to the active presentation and sets the title color and background color for the color scheme (because no argument was used with the Add method, the added color scheme is initially identical to the first standard color scheme in the presentation).

Visual Basic for Applications
  With ActivePresentation.ColorSchemes.Add
    .Colors(ppTitle).RGB = RGB(255, 0, 0)
    .Colors(ppBackground).RGB = RGB(128, 128, 0)
End With

Set the ColorScheme property of a Slide, SlideRange, or Master object to return the color scheme for one slide, a set of slides, or a master, respectively. The following example sets the color scheme for all the slides in the active presentation to the third color scheme in the presentation.

Visual Basic for Applications
  With ActivePresentation
    .Slides.Range.ColorScheme = .ColorSchemes(3)
End With

See Also