Package net.nullved.pmweatherapi.util
Class ColorMap
java.lang.Object
net.nullved.pmweatherapi.util.ColorMap
A builder-based representation of
You can create a new
ColorTables.
Should hopefully be able to produce identical results.
You can create a new
ColorMap builder with ColorMap.Builder.of(Color).
Use ColorMap.Builder.addPoint(Color, float) to add a new point to lerp between.
Use ColorMap.Builder.override(Color, float) to add a new point to override the color at.- Since:
- 0.14.15.6
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA Builder pattern for creating aColorMapstatic final recordRepresents a Lerp Segment -
Method Summary
-
Method Details
-
minValue
public float minValue()Gets the smallest value a color is defined for- Returns:
- The minimum value
- Since:
- 0.14.15.6
-
maxValue
public float maxValue()Gets the largest value a color is defined for- Returns:
- The maximum value
- Since:
- 0.14.15.6
-
get
Gets theColorfor the specific value -
lerp
Lerps between two colors
-