Namespace: | Sirenix.Utilities |
Assembly: | Sirenix.Utilities |
public static class ColorExtensions
public static Color Lerp(this Color[] colors, float t)
UnityEngine.Color[] | colors | The colors. |
System.Single | t | The t. |
UnityEngine.Color |
public static Color MoveTowards(this Color from, Color to, float maxDelta)
UnityEngine.Color | from | From color. |
UnityEngine.Color | to | To color. |
System.Single | maxDelta | The maximum delta. |
UnityEngine.Color |
public static Color NormalizeRGB(this Color color)
UnityEngine.Color | color | The color. |
UnityEngine.Color |
public static float PerceivedLuminosity(this Color color, bool includeAlpha = true)
UnityEngine.Color | color | The current UnityEngine.Color. |
System.Boolean | includeAlpha | Determines if the UnityEngine.Color.a value should impact the result. |
System.Single | The System.Single value representing the luminosity. |
public static Color Pow(this Color color, float factor)
UnityEngine.Color | color | The color. |
System.Single | factor | The factor. |
UnityEngine.Color |
public static string ToCSharpColor(this Color color)
UnityEngine.Color | color | The color. |
System.String | new Color(r, g, b, a) |
public static bool TryParseString(string colorStr, out Color color)
System.String | colorStr | The color string. |
UnityEngine.Color | color | The color. |
System.Boolean | Returns true if the parse was a success. |