Class ContrastCurve
java.lang.Object
org.glavo.monetfx.internal.dynamiccolor.ContrastCurve
A class containing a value that changes with the contrast level.
Usually represents the contrast requirements for a dynamic color on its background. The four values correspond to values for contrast levels -1.0, 0.0, 0.5, and 1.0, respectively.
-
Constructor Summary
ConstructorsConstructorDescriptionContrastCurve(double low, double normal, double medium, double high) Creates a `ContrastCurve` object. -
Method Summary
Modifier and TypeMethodDescriptiondoubleget(double contrastLevel) Returns the value at a given contrast level.
-
Constructor Details
-
ContrastCurve
public ContrastCurve(double low, double normal, double medium, double high) Creates a `ContrastCurve` object.- Parameters:
low- Value for contrast level -1.0normal- Value for contrast level 0.0medium- Value for contrast level 0.5high- Value for contrast level 1.0
-
-
Method Details
-
get
public double get(double contrastLevel) Returns the value at a given contrast level.- Parameters:
contrastLevel- The contrast level. 0.0 is the default (normal); -1.0 is the lowest; 1.0 is the highest.- Returns:
- The value. For contrast ratios, a number between 1.0 and 21.0.
-