Mixing.Mix

Extension Method in Mixing


Declaration

public static Color Mix(this Color color, Color other, float weight = 0.5F, bool mixAlpha = true)

Description

Returns the result of mixing the color with another color using a weight between [0..1]. A weight of 0 results in the first color, and a weight of 1 results in the second color.

Parameters

colorThe first color to mix.
otherThe second color to mix.
weightThe weight of the color mix between [0..1] (default=0.5).
mixAlphaTrue to mix the alpha components, otherwise the alpha is unchanged (default=true).

Returns

ColorThe result of mixing the two colors.