Object Model Reference : Classes : C : Color : Methods : Color.BlendWith |
Sub BlendWith(Color As Color, MixRatio As Long)
Member of Color
The BlendWidth method mixes the color with the given color using the specified ratio.
Parameter
|
Description
|
Color
|
Specifies the color to be blended
|
MixRatio
|
Specifies the ratio in which to blend the colors
|
The following VBA example creates two colors, blends them together, and fills the active shape with the blended color.
Sub Test() |
Dim c1 As Color |
Dim c2 As Color |
'Blend a Red and Green Color at 50% |
Set c1 = CreateRGBColor(255, 0, 0) |
Set c2 = CreateRGBColor(0, 255, 0) |
c1.BlendWith c2, 50 |
ActiveShape.Fill.ApplyUniformFill c1 |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.