Class ColorExtensions
Inheritance
object
ColorExtensions
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: InsaneScatterbrain.Extensions
Syntax
public static class ColorExtensions
Methods
CreateArray(Color, int)
Creates a color array of the given length, each element is filled with the given color.
Declaration
public static Color[] CreateArray(this Color color, int length)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Color | color | The color to fill the array with. |
int | length | The length of the array. |
Returns
Type | Description |
---|---|
UnityEngine.Color[] | An array of colors of given length filled with given color. |
CreateArray(Color32, int)
Creates a color array of the given length, each element is filled with the given color.
Declaration
public static Color32[] CreateArray(this Color32 color, int length)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Color32 | color | The color to fill the array with. |
int | length | The length of the array. |
Returns
Type | Description |
---|---|
UnityEngine.Color32[] | An array of colors of given length filled with given color. |
IsEqualTo(Color32, Color32)
Checks if another color is equal to the color.
Declaration
public static bool IsEqualTo(this Color32 color, Color32 otherColor)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Color32 | color | The color. |
UnityEngine.Color32 | otherColor | The other color. |
Returns
Type | Description |
---|---|
bool | True if the color and the other color are equal. |