public final class ColorUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.awt.Color |
getColor(java.lang.String s)
Parse the specified string to a
Color . |
static java.awt.Color |
getColor(java.lang.String s,
java.awt.Color defaultColor)
Parse the specified string to a
Color . |
static java.lang.String |
toString(java.awt.Color c) |
public static java.awt.Color getColor(java.lang.String s)
Color
. Valid formats
are:
#FFFFFF
rgb(255,255,255)
s
- The string that will be parsed into a java.awt.Color.Color
. Or null if parsing fails.public static java.awt.Color getColor(java.lang.String s, java.awt.Color defaultColor)
Color
. Valid formats
are:
#FFFFFF
rgb(255,255,255)
s
- The string that will be parsed into a Color
.defaultColor
- The default color that will be returned when the
string couldn't be parsed or when the string is empty.Color
.public static java.lang.String toString(java.awt.Color c)
Copyright © Technia AB. All Rights Reserved.