Colors Class

From TouchDesigner 099 Wiki

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




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)


Get or set specific color option, given a string index.
   n = ui.colors['']
   ui.colors[''] = (1,0,0)


Iterate over each color option name.
   for n in ui.colors: