def to_wx_color ( self, editor, color=None ):
        """ Gets the wxPython color equivalent of the object trait.
        """
        if color is None:
            try:
                color = getattr( editor.object, editor.name + '_' )
            except __HOLE__:
                color = getattr( editor.object, editor.name )
        if isinstance(color, tuple):
            return wx.Colour( int( color[0] * 255.0 ),
                              int( color[1] * 255.0 ),
                              int( color[2] * 255.0 ) )
        return color

    #---------------------------------------------------------------------------
    #  Gets the application equivalent of a wxPython value:
    #---------------------------------------------------------------------------
dataset/ETHPy150Open enthought/traitsui/traitsui/wx/rgb_color_editor.py/ToolkitEditorFactory.to_wx_color