schrodinger :: structutils :: color :: Color :: Class Color
[hide private]
[frames] | no frames]

Class Color

object --+
         |
        Color

Represent a color as either an integer (colormap index), string (color name), or an RGB value (tuple/list of 3 ints, values 0-255).

Provides the following properties and methods:

When object is initialized from the RGB value, the Color.index and Color.name attributes are set to the closest color in the mmcolor palette.

Instance Methods [hide private]
 
__init__(self, color)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__str__(self)
str(x)
 
__repr__(self)
repr(x)
 
__int__(self)
 
__eq__(self, other)
 
__ne__(self, other)

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]
  rgb_float
Returns a tuple of (R, G, B) for this color, each ranging from 0.0 to 1.0.

Inherited from object: __class__

Method Details [hide private]

__init__(self, color)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

 

str(x)

Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

 

repr(x)

Overrides: object.__repr__
(inherited documentation)

Property Details [hide private]

rgb_float


Returns a tuple of (R, G, B) for this color, each ranging from 0.0 to
1.0.

Get Method:
unreachable.rgb_float(self) - Returns a tuple of (R, G, B) for this color, each ranging from 0.0 to 1.0.