Package Scientific :: Package Visualization :: Module Color :: Class ColorScale
[frames] | no frames]

Class ColorScale

Mapping from a number interval to a color range

The color scale is blue - green - yellow - orange - red.

Instance Methods
Color
__call__(self, value)
Returns: the color corresponding to value
 
__init__(self, range)
Method Details

__call__(self, value)
(Call operator)

 
Parameters:
  • value (float) - the value within the range for which the color is requested. If the value is outside of the specified range, the edge of the range is used instead.
Returns: Color
the color corresponding to value

__init__(self, range)
(Constructor)

 
Parameters:
  • range (float or tuple) - a tuple of two numbers (the center of the interval and its width), or a single number specifying the width for a default center of zero