Table of Contents

MIXCOLORS method (System)

Description

This method returns the result of mixing two colors using weighted ratios and a luminosity value.

Syntax

MixedColor = Exec_Method( "SYSTEM", "MIXCOLORS", Color1, Color2, LumRatio, 
                          Weight1, Weight2 )

Parameters

NameRequiredDescription
Color1YesFirst color to mix.
Color2YesSecond color to mix.
LumRatioNoThe ratio for the new color's luminosity. MIXCOLORS multiplies the luminosity of the mixed color by this ratio. Defaults to 1.
Weight1NoThe weighted ratio for the first color. Defaults to 1.
Weight2NoThe weighted ratio for the second color. Defaults to 1.

Returns

The mixed color value.

Remarks

N/A

Example

 
// Mix yellow and green for a darker, muddy green color//
   
   Color1 = 65535 ; // Yellow//
   Color2 = 65280 ; // Green//
   LRatio = 0.6   ; // Make it darker//
   
   NewColor = Exec_Method( "SYSTEM", "MIXCOLORS", Color1, Color2, LRatio, 1, 1 )
 
 
 

See Also

SYSTEM ALPHACOLOR method, SYSTEM DARKENCOLOR method, SYSTEM LIGHTENCOLOR method.