Scripting API

Color32

struct in UnityEngine · UnityEngine.CoreModule

10 of 12 of Unity's membersUnity's documentation
In Tassix

RGBA color with byte components. Verified in conformance/recordings/value_types.jsonl.

Constructors 1

Color32(byte r, byte g, byte b, byte a)

Fields 4

byte a
byte b
byte g
byte r

Properties 1

byte this[int index] { get; set; }

Methods 3

static Color32 Lerp(Color32 a, Color32 b, float t)
static Color32 Lerp(in Color32 a, in Color32 b, float t)

Interpolates and truncates each channel, in double precision like Unity's editor (in float, 100 + (0 - 100) * 0.3 rounds up to 70).

static Color32 LerpUnclamped(Color32 a, Color32 b, float t)
static Color32 LerpUnclamped(in Color32 a, in Color32 b, float t)
string ToString()
string ToString(string? format)
string ToString(string? format, IFormatProvider? formatProvider)

Operators 1

static implicit operator Color32(Color c)
static implicit operator Color(Color32 c)

Clamps to [0, 1], scales to 255 and rounds half to even.

Not in Tassix yet 2

Equals GetHashCode