[Color]

Attribute applies a tint color to the field's visual elements.

Parameters

Parameter
Type
Description

r

float

Red component (0-1).

g

float

Green component (0-1).

b

float

Blue component (0-1).

a

float

Alpha component (0-1).

Target

ColorTarget

Visual element to apply color.

Examples

[Color(1, 0, 0, 1)]
public string redText;

[Color(0, 1, 0, 1, Target = ColorTarget.Background)]
public int greenBackground;

[Color(0, 0, 1, 1, Target = ColorTarget.Content)]
public float blueContent;

Last updated