Class ColorExtensions
Inheritance
System.Object
ColorExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: InsaneScatterbrain.Extensions
Syntax
public static class ColorExtensions
Methods
CreateArray(Color, Int32)
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. |
System.Int32 | length | The length of the array. |
Returns
Type | Description |
---|---|
UnityEngine.Color[] | An array of colors of given length filled with given color. |
CreateArray(Color32, Int32)
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. |
System.Int32 | 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 |
---|---|
System.Boolean | True if the color and the other color are equal. |