| Modifier and Type | Field and Description |
|---|---|
static Pattern |
HEX_PATTERN
Case-insensitive
Pattern with regular expression matching the
default hexadecimal color presentation pattern:'#' followed by six [\da-fA-F] characters. |
static Pattern |
HSL_PATTERN
Case-insensitive
Pattern with regular expression matching common
HSL presentation patterns:'hsl' followed by one [0-360] value and two [0-100] percentage value. |
static Pattern |
HSLA_PATTERN
Case-insensitive
Pattern with regular expression matching common
HSLA presentation patterns:'hsla' followed by one [0-360] value, two [0-100] percentage values, and one [0.0-1.0] value. |
static Pattern |
RGB_PATTERN
Case-insensitive
Pattern with regular expression matching common
RGB color presentation patterns:'rgb' followed by three [0-255] number values. |
static Pattern |
RGBA_PATTERN
Case-insensitive
Pattern with regular expression matching common
RGBA presentation patterns:'rgba' followed by three [0-255] values and one [0.0-1.0] value. |
| Modifier and Type | Method and Description |
|---|---|
static Color |
getHexPatternColor(Matcher matcher)
|
static Color |
getHSLAPatternColor(Matcher matcher)
|
static Color |
getHSLPatternColor(Matcher matcher)
|
static Color |
getRGBAPatternColor(Matcher matcher)
|
static Color |
getRGBPatternColor(Matcher matcher)
|
static Color |
stringToColor(String input)
|
public static final Pattern HEX_PATTERN
Pattern with regular expression matching the
default hexadecimal color presentation pattern:[\da-fA-F] characters.
Pattern contains named groups red, green, and
blue, which represent the individual values.
public static final Pattern RGB_PATTERN
Pattern with regular expression matching common
RGB color presentation patterns:
Pattern contains named groups red, green, and
blue, which represent the individual values.
public static final Pattern RGBA_PATTERN
Pattern with regular expression matching common
RGBA presentation patterns:
Pattern contains named groups red, green,
blue, and alpha, which represent the individual
values.
public static final Pattern HSL_PATTERN
Pattern with regular expression matching common
HSL presentation patterns:
Pattern contains named groups hue,saturation,
and light, which represent the individual values.
public static final Pattern HSLA_PATTERN
Pattern with regular expression matching common
HSLA presentation patterns:
Pattern contains named groups hue,saturation,
light, and alpha, which represent the
individual values.
public static Color stringToColor(String input)
Color from any of the following String inputs:
HEX_PATTERNRGB_PATTERNRGBA_PATTERNHSL_PATTERNHSLA_PATTERN
Parsing is case-insensitive.
input - String inputColor parsed from inputNumberFormatException - Input does not match any recognized patternCopyright © 2022 Vaadin Ltd. All rights reserved.