org.openmali.vecmath2.util
Class ColorUtil
java.lang.Object
org.openmali.vecmath2.util.ColorUtil
public final class ColorUtil
- extends java.lang.Object
Methods to convert from hex to colors and vice versa.
- Author:
- Marvin Froehlich (aka Qudus)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
hexToInt
public static final int hexToInt(char ch)
- Convertes the char interpreded as hex to its corresponding int.
Returns -1, if the char is not a hex char.
- Parameters:
ch -
- Returns:
- the corresponding int or -1
hexToColor
public static final void hexToColor(java.lang.String hexStr,
float[] buffer)
hexToColor
public static final Colorf hexToColor(java.lang.String hexStr,
Colorf out)
hexToColor
public static final Colorf hexToColor(java.lang.String hexStr)
colorToHex
public static final java.lang.String colorToHex(Colorf color)