ColorFormat.BaseRGB Property

Publisher Developer Reference

Returns or sets an MsoRGBType constant that represents the original RGB color format before color-changing properties, such as tinting and shading, are applied. Read/write.

Syntax

expression.BaseRGB

expression   A variable that represents a ColorFormat object.

Return Value
MsoRGBType

Example

This example creates a shape, sets the fill color and lightens the color; then it creates a second shape and applies the original RGB color of the first shape to the second shape.

Visual Basic for Applications
  Sub SetBaseRGB()
    Dim shpOne As Shape
With ActiveDocument.Pages(1).Shapes
    Set shpOne = .AddShape(Type:=msoShapeHeart, _
        Left:=150, Top:=150, Width:=300, Height:=300)
    With shpOne.Fill.ForeColor
        .RGB = RGB(Red:=160, Green:=0, Blue:=255)
        .TintAndShade = 0.9
    End With
    .AddShape(Type:=msoShapeRectangle, Left:=62, _
        Top:=500, Width:=488, Height:=100).Fill _
        .ForeColor.RGB = shpOne.Fill.ForeColor.<strong class="bterm">BaseRGB</strong>
End With

End Sub

See Also