public final class UITools
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.awt.Color |
getColorFromHTML(java.lang.String s)
Returns a
java.awt.Color from a given String
with an given alpha space (default alpha is 255). |
static java.awt.Color |
getColorFromHTML(java.lang.String s,
int alpha) |
static java.lang.String |
getHTMLFromColor(java.awt.Color c)
Returns the html value for the given
Color> |
static java.awt.Color |
getRandomColor()
Returns a random generated
Color in HSB model |
public static java.awt.Color getColorFromHTML(java.lang.String s)
java.awt.Color
from a given String
with an given alpha space (default alpha is 255). Returns null if the
given String dont matches on HTMLCOLORCODE_PATTERN.s
- the html string to get Color
foralpha
- the alpha space to get the new Color
forColor
from the given html stringpublic static java.awt.Color getColorFromHTML(java.lang.String s, int alpha)
public static java.awt.Color getRandomColor()
Color
in HSB modelColor
public static java.lang.String getHTMLFromColor(java.awt.Color c)
Color>
c
- the Color
to get the html-color forCopyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.