Package Scientific :: Package Visualization :: Module Color
[hide private]
[frames] | no frames]

Module Color



Color definitions for use in the modules VRML, VRML2, VMD, and PyMOL.

Classes [hide private]
  Color
RGB Color specification
  ColorScale
Mapping from a number interval to a color range
  SymmetricColorScale
Mapping of a symmetric number interval to a color range

Functions [hide private]
Color ColorByName(name)
Returns the color associated with name

Variables [hide private]
  _dark_colors = {'blue': Color((0.0, 0.0, 0.29999999999999999)), 'br...
  _full_colors = {'blue': Color((0.0, 0.0, 1.0)), 'brown': Color((0.5...
  _light_colors = {'blue': Color((0.29999999999999999, 0.2999999999999...

Function Details [hide private]

ColorByName(name)

 
Parameters:
  • name (str) - one of the predefined color names: black, white, grey, red, green, blue, yellow, magenta, cyan, orange, violet, olive, and brown. Any color can be prefixed by "light " or "dark " to yield a variant. The prefix must be separated from the color name by white space, e.g. "light green".
Returns: Color
the color associated with name
Raises:
  • KeyError - if the color name is not defined

Variables Details [hide private]

_dark_colors

Value:
{'black': Color((0.0, 0.0, 0.0)),
 'blue': Color((0.0, 0.0, 0.29999999999999999)),
 'brown': Color((0.17999999999999999, 0.12, 0.0)),
 'cyan': Color((0.0, 0.29999999999999999, 0.29999999999999999)),
 'green': Color((0.0, 0.29999999999999999, 0.0)),
 'grey': Color((0.14999999999999999, 0.14999999999999999, 0.1499999999
9999999)),
 'magenta': Color((0.29999999999999999, 0.0, 0.29999999999999999)),
...                                                                    
      

_full_colors

Value:
{'black': Color((0.0, 0.0, 0.0)),
 'blue': Color((0.0, 0.0, 1.0)),
 'brown': Color((0.59999999999999998, 0.40000000000000002, 0.0)),
 'cyan': Color((0.0, 1.0, 1.0)),
 'green': Color((0.0, 1.0, 0.0)),
 'grey': Color((0.5, 0.5, 0.5)),
 'magenta': Color((1.0, 0.0, 1.0)),
 'olive': Color((0.10000000000000001, 0.59999999999999998, 0.200000000
...                                                                    
      

_light_colors

Value:
{'black': Color((0.29999999999999999, 0.29999999999999999, 0.299999999
99999999)),
 'blue': Color((0.29999999999999999, 0.29999999999999999, 1.0)),
 'brown': Color((0.71999999999999997, 0.57999999999999996, 0.299999999
99999999)),
 'cyan': Color((0.29999999999999999, 1.0, 1.0)),
 'green': Color((0.29999999999999999, 1.0, 0.29999999999999999)),
 'grey': Color((0.64999999999999991, 0.64999999999999991, 0.6499999999
...