ColorFormat.Brightness property (Word)

Returns a Single that represents the brightness of a specified shape color. Read/write.

Syntax

expression.Brightness

expression A variable that represents a 'ColorFormat' object.

Remarks

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

Example

The following code example creates a new shape in the active document, sets the fill color, and brightens the color.

Sub NewTintedShape() 
 Dim shpHeart As Shape 
 
 Set shpHeart = ActiveDocument.Shapes _ 
 .AddShape(Type:=msoShapeHeart, Left:=150, _ 
 Top:=150, Width:=250, Height:=250) 
 With shpHeart.Fill.ForeColor 
 .RGB = RGB(Red:=255, Green:=28, Blue:=0) 
 .Brightness = 0.4 
 End With 
End Sub

See also

ColorFormat Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.