API Reference for Enthought Tool Suite 3.2.0
Trait definition 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.
RGB versions of standard colors:
rgb_standard_colors = { }
Trait whose value must be an RGB color:
RGBColor = Trait('white', convert_to_color, rgb_standard_colors, editor = get_rgb_color_editor)
Converts a tuple or an integer to an RGB color value, or raises a TraitError if that is not possible.
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.
| Local name | Refers to |
|---|---|
| RGBColorEditor | enthought.traits.ui.editors.rgb_color_editor.RGBColorEditor |
| SequenceTypes | enthought.traits.trait_base.SequenceTypes |
| standard_colors | enthought.traits.ui.wx.color_trait.standard_colors |
| Trait | enthought.traits.traits.Trait |
| TraitError | enthought.traits.trait_errors.TraitError |
© Copyright 2002-2009 Enthought, Inc.