Previous Document Next Document

Object Model Reference : Classes : C : Color : Methods : Color.BlendWith


Color.BlendWith

Sub BlendWith(Color As Color, MixRatio As Long)

Description

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

VBA example

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.