Arithmetic.Multiply

Extension Method in Arithmetic

Declaration

public static void Multiply(this ref Color color, Color other, bool multiplyAlpha = true)

Description

Multiplies the components of the color with another color. Clamps the values in the range [0..1].

Parameters

colorThe color being multiplied.
otherThe color to multiply by.
multiplyAlphaTrue to multiply the alpha components, otherwise it is left unmodified (default=true).

Overload

Declaration

public static void Multiply(this ref Color color, float multiplier, bool multiplyAlpha = true)

Description

Multiplies the components of the color by a multiplier. Clamps the values in the range [0..1].

Parameters

colorThe color being multiplied.
multiplierThe amount to multiply the color by.
multiplyAlphaTrue to multiply the alpha component, otherwise it is left unmodified (default=true).