Arithmetic.MultipliedBy

Extension Method in Arithmetic

Declaration

public static Color MultipliedBy(this Color color, Color other, bool multiplyAlpha = true)

Description

Returns the result of multiplying 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).

Returns

ColorThe new color with the multiplied components.

Overload

Declaration

public static Color MultipliedBy(this Color color, float multiplier, bool multiplyAlpha = true)

Description

Returns the result of multiplying 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).

Returns

ColorThe new color with the multiplied components.