Scripting API

ColorUtility

class in UnityEngine · UnityEngine.CoreModule

4 of 4 of Unity's membersUnity's documentation
In Tassix

Colors to and from HTML strings ("#FF8000", "#F80", "red").

Methods 3

static string ToHtmlStringRGB(Color color)
static string ToHtmlStringRGBA(Color color)
static bool TryParseHtmlString(string htmlString, out Color color)

Parses "#RGB", "#RGBA", "#RRGGBB", "#RRGGBBAA" (alpha 1 when left out) or a color name; false (and white) otherwise.

Checked against Unity

Conformance scenarios that exercise it, recorded in Unity and compared event by event.