public final class CssColorSpecUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static double[] |
hslToRgb(double hue,
double sat,
double light)
Converts the given HSL color to RGB.
|
static double[] |
hwbToRgb(double hue,
double white,
double black)
Converts the given HWB color to RGB.
|
static double[] |
rgbToHsl(double red,
double green,
double blue)
Converts the given RGB color to HSL.
|
static double[] |
rgbToHwb(double red,
double green,
double blue)
Converts the given HWB color to RGB.
|
public static double[] hslToRgb(double hue,
double sat,
double light)
hue - Hue as degrees: 0..360sat - Saturation as percentage: 0..100light - Lightness as percentage: 0..100public static double[] rgbToHsl(double red,
double green,
double blue)
red - Red component of the color, normalized to 0..1.green - Green component of the color, normalized to 0..1.blue - Blue component of the color, normalized to 0..1.public static double[] hwbToRgb(double hue,
double white,
double black)
hue - Hue as degrees: 0..360white - Whiteness as percentage: 0..100black - Blackness as percentage: 0..100public static double[] rgbToHwb(double red,
double green,
double blue)
red - Red component of the color, normalized to 0..1.green - Green component of the color, normalized to 0..1.blue - Blue component of the color, normalized to 0..1.