mircolor

xicsrt.util.mircolor

A module for dealing with colors.

This module is an extension/modification of parts of:
matplotlib.colors matplotlib.cm matplotlib.pyplot

There are a number of things that I don’t like about how the matplotlib versions handle things, so this is my attempt to correct some of these issues.

Maybe someday I’ll try to tackle the matplotlib code directly and create a replacement for the original code.

Example

norm = mircolor.Normalize(0.0, 1.0) grad = mircolor.getColorGradient(norm, ‘tab10’) color = grad.to_rgba(1.0)

getColorGradient(norm=None, cmap=None)[source]
class ColorGradient[source]
class LinearSegmentedColorGradient(norm=None, segmentdata=None)[source]
rgba_keys = ['red', 'blue', 'green', 'alpha']
to_rgba(value, alpha=None)[source]
setSegmentData(segmentdata_in)[source]

Private Members