Components.Copy

Extension Method in Components


Declaration

public static Color Copy(this Color color, bool copyAlpha = true)

Description

Returns a copy of the color.

Parameters

colorThe color to copy.
copyAlphaWhether to copy the alpha component (default=true).

Returns

ColorA copy of the color.

Overload

Declaration

public static void Copy(this ref Color color, Color other, bool copyAlpha = true)

Description

Sets the components of the color to match another color.

Parameters

colorThe color to set the components of.
otherThe color to copy the components from.
copyAlphaWhether to copy the alpha component (default=true).