Colors Class

From TouchDesigner 099 Wiki

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


Members


Methods

resetToDefaults()

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.

len(Colors)int

Returns the total color options.
   a = len(ui.colors)

[index]triplet

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

Iterator

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