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)
将HLS颜色转换为RGBA颜色
|
static HlsColor |
rgbToHls(Color rgbColor)
将RGBA颜色转换为HLS颜色
|
public float a
public float h
public float l
public float s
public static HlsColor rgbToHls(Color rgbColor)
rgbColor - RGB颜色public static Color hlsToRgb(HlsColor hlsColor)
hlsColor - HLS颜色public 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 © 2024. All rights reserved.