public class HlsColor extends Object
| 构造器和说明 |
|---|
HlsColor() |
| 限定符和类型 | 方法和说明 |
|---|---|
static Color |
calculateColor(Color theme,
String tintV)
Convert RGB to HSL and then adjust the luminance part
|
static float |
calculateFinalLumValue(Double tint,
float lum)
If tint is supplied, then it is applied to the value of the color to determine the final color applied.
|
static Color |
hlsToRgb(HlsColor hlsColor)
Convert hls color to rgba
|
static HlsColor |
rgbToHls(Color rgbColor)
Convert rgba color to hls Color
|
public float a
public float h
public float l
public float s
public static HlsColor rgbToHls(Color rgbColor)
rgbColor - rgb Colorpublic static Color hlsToRgb(HlsColor hlsColor)
hlsColor - hls colorpublic static float calculateFinalLumValue(Double tint, float lum)
The tint value is stored as a double from -1.0 .. 1.0, where -1.0 means 100% darken
and 1.0 means 100% lighten. Also, 0.0 means no change.
In loading the value, it is converted to HLS where HLS values are (0..HLSMAX), where HLSMAX is currently 255.
Referer: Tint
tint - Specifies the tint value applied to the color.lum - Luminance partCopyright © 2023. All rights reserved.