Extension methods for the UnityEngine.Color type.

namespace Sirenix.Utilities
public static class ColorExtensions


Namespace: Sirenix.Utilities
Assembly: Sirenix.OdinInspector

Static Methods

Return Type Definition Description
bool TryParseString(string, ref Color) Tries to parse a string to a Color. The following formats are supported: "new Color(0.4, 0, 0, 1)", "#FFEEBBFF", "#FFEECC", "FFEEBBFF", "FFEECC"

Extension Methods

Return Type Definition Description
Color Lerp(this Color[], float) Lerps between multiple colors.
Color MoveTowards(this Color, Color, float) Moves the towards implementation for Color.
Color NormalizeRGB(this Color) Normalizes the RGB values of the color ignoring the alpha value.
Color Pow(this Color, float) Pows the color with the specified factor.
string ToCSharpColor(this Color) Converts a color to a string formatted to c#