public class ColorUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getNameFromRGB(String value)
Returns the name equivalent of the RGB color.
|
static String |
getRGBFromName(String name)
Returns the RGB equivalent of the named color.
|
static Color |
toColor(String value)
Returns a Color object that corresponds to the value.
|
static Color |
toColor(String value,
Color dflt)
Returns a Color object that corresponds to the value.
|
static String |
toString(Color value)
Converts a color to a web-friendly string format.
|
public static String getRGBFromName(String name)
name - The name of the color (case insensitive).public static String getNameFromRGB(String value)
value - The RGB value (e.g., #FFFAFA) of the color (case insensitive).public static Color toColor(String value)
value - The string representation of the color. This may be a color name or a text
representation of the color's rgb value.public static Color toColor(String value, Color dflt)
value - The string representation of the color. This may be a color name or a text
representation of the color's rgb value.dflt - Default color if value cannot be converted to a color.Copyright © 2023 Fujion Framework. All rights reserved.