ChartRamp class final

Discrete color ramp for mapping normalized 0..1 values to colors.

Constructors

ChartRamp(List<UvColor> colors)
Creates a ramp from an explicit list of UvColors.
const
ChartRamp.fromHexes(List<String> hexes)
Creates a ramp from a list of hex color strings.
factory
ChartRamp.thermal()
A blue-to-red thermal ramp.
factory

Properties

colors List<UvColor>
The ordered color stops in this ramp.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

colorFor(double value) → UvColor
Returns the color for a normalized value in 0..1.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
styleFor(double value, {bool background = false}) → UvStyle
Returns a UvStyle for a normalized value, as foreground or background.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited