Examples:
The following VBA example uses a separate Color object to take an object's fill color and convert it to RGB, then checks if the color is red (that is, its Red component value is greater than 150, and both Blue and Green values are less than 100). If this is the case, the object is filled with black. Otherwise, the object's fill remains unchanged.
Sub Test()
Dim c As New Color
Dim s As Shape
For Each s In ActiveSelection.Shapes
If s.Fill.Type = cdrUniformFill Then
c.CopyAssign s.Fill.UniformColor
c.ConvertToRGB
If c.RGBRed > 150 And c.RGBGreen < 100 And c.RGBBlue < 100 Then
s.Fill.UniformColor.RGBAssign 0, 0, 0
End If
End If
Next s
End Sub