Mixing.Mix<T>
Extension Method in Mixing
Declaration
public static Color Mix<T>(this Color color, Color other, float weight = 0.5F, bool mixAlpha = true)
where T : struct, IComponentModel
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.
Type Parameters
T | The type of component model to use. |
Parameters
color | The first color to mix. |
other | The second color to mix. |
weight | The weight of the color mix between [0..1] (default=0.5). |
mixAlpha | True to mix the alpha components, otherwise the alpha is unchanged (default=true). |
Returns
Color | The result of mixing the two colors. |