porescene.color.gradient module¶
- class porescene.color.gradient.DiscreteGradient(pairs, /, color_nan=Color('#888888'))[source]¶
Bases:
objectThis gradient can be used to map colors to a fixed set of values.
- class porescene.color.gradient.Gradient(colors=[Color('#FFFFFF'), Color('#000000')], boundary_lower=0.0, boundary_upper=1.0, /, color_nan=Color('#888888'), color_below=Color('#FFFFFF'), color_above=Color('#000000'), fit=False)[source]¶
Bases:
ABCAbstract base class for all types of gradient.
- property fit: bool¶
If true, values which exceed the given range, will be clipped to either the lower or upper boundary.
- property range¶
Nominal range which needs to be covered with colors.
- class porescene.color.gradient.SegmentedGradient(colors=[Color('#FFFFFF'), Color('#000000')], boundary_lower=0.0, boundary_upper=1.0, /, color_nan=Color('#888888'), color_below=Color('#FFFFFF'), color_above=Color('#000000'), fit=False)[source]¶
Bases:
GradientA gradient, which holds some segments with a color assigned to. Returns for a data-value the color of the corresponding segment.
- class porescene.color.gradient.SmoothGradient(colors=[Color('#FFFFFF'), Color('#000000')], boundary_lower=0.0, boundary_upper=1.0, /, color_nan=Color('#888888'), color_below=Color('#FFFFFF'), color_above=Color('#000000'), fit=False)[source]¶
Bases:
GradientA gradient which maps numerical values to a range of colors. Each numerical value has a distinct corresponding color.