-
public class ColorHelperClass with color helper functions. Please note the functions were copied over from: https://developer.android.com/reference/android/support/v4/graphics/ColorUtils (old support lib) https://developer.android.com/reference/kotlin/androidx/core/graphics/ColorUtils (new Androidx lib) Maybe include one lib directly.
-
-
Method Summary
Modifier and Type Method Description static intHSLToColor(float h, float s, float l)Convert HSL to color value. static floatconstrain(float amount, float low, float high)Constrain float value. -
-
Method Detail
-
HSLToColor
static int HSLToColor(float h, float s, float l)
Convert HSL to color value.
- Parameters:
h- float h value form HSL colors- float s value form HSL colorl- float l value form HSL color
-
constrain
static float constrain(float amount, float low, float high)
Constrain float value.
- Parameters:
amount- input valuelow- lower boundhigh- upper bound
-
-
-
-