traitsui.null.rgb_color_trait module

Trait definitions for an RGB-based color, which is a tuple of the form (red, green, blue), where red, green and blue are floats in the range from 0.0 to 1.0.

traitsui.null.rgb_color_trait.convert_to_color(object, name, value)[source]

Converts a tuple or an integer to an RGB color value, or raises a TraitError if that is not possible.

traitsui.null.rgb_color_trait.get_rgb_color_editor(*args, **traits)[source]

Checks that value can be converted to a value in the range 0.0 to 1.0.

If so, it returns the floating point value; otherwise, it raises a TraitError.