public class HslaColor
extends java.lang.Object
Class for representing HSLA color (Hue, Saturation, Lightness, Alpha)
Modifier and Type | Field and Description |
---|---|
float |
A
Alpha (opacity) [0.0f, 1.0f]
|
int |
H
Hue [0, 360]
|
int |
L
Lightness [0, 100]
|
int |
S
Saturation [0, 100]
|
Constructor and Description |
---|
HslaColor(int h,
int s,
int l,
float a)
Constructor for HslaColor
|
Modifier and Type | Method and Description |
---|---|
static java.awt.Color |
convertHslaToRgba(HslaColor hslaColor)
Uses https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_RGB
|
public final int H
Hue [0, 360]
public final int S
Saturation [0, 100]
public final int L
Lightness [0, 100]
public float A
Alpha (opacity) [0.0f, 1.0f]
public HslaColor(int h, int s, int l, float a)
Constructor for HslaColor
h
- Hue [0, 360]s
- Saturation [0, 100]l
- Lightness [0, 100]a
- Alpha (opacity) [0.0f, 1.0f]public static java.awt.Color convertHslaToRgba(HslaColor hslaColor)
Uses https://en.wikipedia.org/wiki/HSL_and_HSV#HSL_to_RGB
hslaColor
- HSLA color to convert