Class ColorFormat (PowerPoint VBA)

The class ColorFormat represents the color of a one-color object, the foreground or background color of an object with a gradient or patterned fill, or the pointer color. You can set colors to an explicit red-green-blue value (by using the RGB property) or to a color in the color scheme (by using the SchemeColor property).

Set

To use a ColorFormat class variable it first needs to be instantiated, for example

Dim cft as ColorFormat
Set cft = ActivePresentation.SlideShowSettings.PointerColor

The following procedures can be used to set variables of type ColorFormat: AnimationSettings.DimColor, ColorEffect.By, ColorEffect.From, ColorEffect.To, EffectInformation.Dim, EffectParameters.Color2, FillFormat.BackColor, FillFormat.ForeColor, Font.Color, Guide.Color, LineFormat.BackColor, LineFormat.ForeColor, ShadowFormat.ForeColor, SlideShowSettings.PointerColor, SlideShowView.PointerColor, ThreeDFormat.ContourColor and ThreeDFormat.ExtrusionColor

Brightness

Returns or sets the brightness of the specified picture or OLE object. The value for this property must be a number from 0.0 (dimmest) to 1.0 (brightest).

ActivePresentation.SlideShowSettings.PointerColor.Brightness = 0.3

ObjectThemeColor

Returns or sets the theme color of the specified ColorFormat object.

The value of the ObjectThemeColor property can be one of these MsoThemeColorIndex constants.

ActivePresentation.SlideShowSettings.PointerColor.ObjectThemeColor = msoThemeColorMixed

Parent

Returns the parent object for the specified object.

RGB

Returns or sets the red-green-blue (RGB) value of the specified color.

ActivePresentation.SlideShowSettings.PointerColor.RGB =  RGB(128, 128, 0)

SchemeColor

Returns or sets the color in the applied color scheme that's associated with the specified object.

Possible Values are ppAccent1 - Accent1, ppAccent2 - Accent2, ppAccent3 - Accent3, ppBackground - Background, ppFill - Fill, ppForeground - Foreground, ppNotSchemeColor - Not scheme color, ppSchemeColorMixed - Mixed scheme color, ppShadow - Shadow, ppTitle - Title.

The value of the SchemeColor property can be one of these PpColorSchemeIndex constants.

ActivePresentation.SlideShowSettings.PointerColor.SchemeColor = RGB(0,0,255)'blue

TintAndShade

Sets or returns the lightening or darkening of the color of a specified shape.

You can enter a value from -1 (darkest) to 1 (lightest) for the TintAndShade property, 0 (zero) being neutral.

ActivePresentation.SlideShowSettings.PointerColor.TintAndShade =

Type

Represents the type of color.

The value of the Type property can be one of these MsoColorType constants.

Dim mctType As Office.MsoColorType
mctType = ActivePresentation.SlideShowSettings.PointerColor.Type