Colors Class

From Derivative
Jump to navigation Jump to search

The Colors Class describes the application colors. It can be accessed from the global ui object.


No operator specific members.



Set the colors to their default values.

Special Functions

The Colors class is an iterable object that contains a set of named color attributes. The len, subscript and assignment operators are defined.

Each name can be used to get or set a triplet of values corresponding to that color.


Returns the total color options.

a = len(ui.colors)

[<color option name>]triplet(r,g,b):

Get or set specific color option, given a string key.

n = ui.colors['']
ui.colors[''] = (1,0,0)


Iterate over each color option name.

for n in ui.colors:
	ui.colors[n] = myColorsList[n]

TouchDesigner Build: