Color Class
The color class holds a single 4 component color (R, G, B, A).
v = tdu.Color() # starts as (0, 0, 0, 1)
v2 = tdu.Color(0, 0, 1, 1)
values = [0, 1, 0, 1]
v3 = tdu.Color(values)
green = v3[1] # access individual elements by index. Same as v3.g
Members
r
→ float
:
Gets or sets the red component of the color.
g
→ float
:
Gets or sets the green component of the color.
b
→ float
:
Gets or sets the blue component of the color.
a
→ float
:
Gets or sets the alpha component of the color.
Methods
[index]
→ float
:
Sample values may be accessed from a Color using the [] subscript operator.
copy()
→ Color
:
Returns a new color that is a copy of the color.
TouchDesigner Build: