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

Class Color

object --+
         |
        Color

Represent a color as either an integer (colormap index) or a string (color name).

Provides the following properties and methods:

Instance Methods [hide private]
 
__init__(self, color)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__str__(self)
str(x)
 
__int__(self)
 
__eq__(self, other)
 
__ne__(self, other)
 
rgb(self)
Returns a tuple of (R, G, B) for this color, each ranging from 0 to 255.
 
rgb_float(self)
Returns a tuple of (R, G, B) for this color, each ranging from 0.0 to 1.0.

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

Properties [hide private]

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)

rgb(self)

 

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

Decorators:
  • @property

rgb_float(self)

 

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

Decorators:
  • @property