public class SVGNamedColorFormat extends Object implements ColorFormat
Name | SVGNamedColorFormat |
---|---|
Format |
|
Description |
|
Example of valid values |
|
Notes | |
Links |
SVGNamedColor
,
Serialized FormConstructor and Description |
---|
SVGNamedColorFormat() |
Modifier and Type | Method and Description |
---|---|
String |
format(Color color)
Formats the color to a string representation of this format.
|
SVGNamedColor[] |
getAllNamedColors() |
boolean |
isAlphaSupported()
Do the implemtation supports Alpha (opacity).
|
Color |
parse(String text)
Parse a text string to a Color.
|
public boolean isAlphaSupported()
ColorFormat
isAlphaSupported
in interface ColorFormat
true
if the ColorFormat supports Alpha, otherwise false
.public Color parse(String text) throws ColorFormatException
ColorFormat
parse
in interface ColorFormat
text
- a text string with the color format.ColorFormatException
- if the text is null
or can not be parse by this format.Color
public String format(Color color) throws NullPointerException
ColorFormat
format
in interface ColorFormat
color
- the color.NullPointerException
- if color is null
.public SVGNamedColor[] getAllNamedColors()