Skip to content

Latest commit

 

History

History
75 lines (45 loc) · 1.5 KB

PowerPoint.RGBColor.RGB.md

File metadata and controls

75 lines (45 loc) · 1.5 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
RGBColor.RGB property (PowerPoint)
vbapp10.chm538003
vbapp10.chm538003
PowerPoint.RGBColor.RGB
0535b619-1d3d-a106-8b99-46ea5c02917f
06/08/2017
medium

RGBColor.RGB property (PowerPoint)

Returns or sets the red-green-blue (RGB) value of a specified color-scheme color or extra color when used with a PpColorSchemeIndex constant. Read/write.

Syntax

expression. RGB

expression A variable that represents a RGBColor object.

Return value

MsoThemeColorSchemeIndex

Remarks

Use the Colors method to return a RGBColor object.

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

ppAccent1
ppAccent2
ppAccent3
ppBackground
ppFill
ppForeground
ppShadow
ppTitle

Example

This example displays the value of the red, green, and blue components of the fill forecolor for shape one on slide one in the active document.

Set myDocument = ActivePresentation.Slides(1)

c = myDocument.Shapes(1).Fill.ForeColor.RGB

redComponent = c Mod 256

greenComponent = c \ 256 Mod 256

blueComponent = c \ 65536 Mod 256

MsgBox "RGB components: " & redComponent & _
    ", " & greenComponent & ", " & blueComponent

See also

RGBColor Object

[!includeSupport and feedback]