|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openmali.vecmath2.util.ColorUtils
public final class ColorUtils
Methods to convert from hex to colors and vice versa.
Field Summary | |
---|---|
static int |
ALPHA_OPAQUE
|
static java.awt.Color |
BLACK_TRANSPARENT
|
Method Summary | |
---|---|
static int |
checkHexString(java.lang.String hexStr)
Checks the hex-string for validity. |
static int |
checkHexString(java.lang.String hexStr,
boolean throwException)
Checks the hex-string for validity. |
static java.lang.String |
colorToHex(java.awt.Color color)
|
static java.lang.String |
colorToHex(int red,
int green,
int blue)
|
static java.lang.String |
colorToHex(int red,
int green,
int blue,
int alpha)
|
static java.awt.Color |
hexToColor(java.lang.String hexStr)
|
static java.awt.Color |
hexToColor(java.lang.String hexStr,
boolean throwException)
|
static boolean |
hexToColor(java.lang.String hexStr,
boolean throwException,
int[] buffer)
|
static boolean |
hexToColor(java.lang.String hexStr,
int[] buffer)
|
static int |
hexToInt(char ch)
Convertes the char interpreded as hex to its corresponding int. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.awt.Color BLACK_TRANSPARENT
public static final int ALPHA_OPAQUE
Method Detail |
---|
public static final int hexToInt(char ch)
ch
-
public static final int checkHexString(java.lang.String hexStr, boolean throwException)
hexStr
- throwException
-
public static final int checkHexString(java.lang.String hexStr)
hexStr
-
public static final boolean hexToColor(java.lang.String hexStr, boolean throwException, int[] buffer)
public static final boolean hexToColor(java.lang.String hexStr, int[] buffer)
public static final java.awt.Color hexToColor(java.lang.String hexStr, boolean throwException)
public static final java.awt.Color hexToColor(java.lang.String hexStr)
public static final java.lang.String colorToHex(int red, int green, int blue, int alpha)
public static final java.lang.String colorToHex(int red, int green, int blue)
public static final java.lang.String colorToHex(java.awt.Color color)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |