public class ColorUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REVISION |
Constructor and Description |
---|
ColorUtil() |
Modifier and Type | Method and Description |
---|---|
static java.awt.Color |
addOffset(java.awt.Color color,
int offset)
Add an offset to the given color and return the corresponding color
|
static java.lang.String |
addOffset(java.lang.String colorStr,
int offset)
Add an offset to the given color and return an hexadecimal representation of the corresponding color
|
static java.awt.Color |
getColor(java.lang.String colorStr)
Return a color from a given hexadecimal string (eg #FF0000 will return a pure red.
|
static java.lang.String |
getStringColor(java.awt.Color color)
Returns the hexadecimal represention of this color.
|
public static final java.lang.String REVISION
public static java.awt.Color getColor(java.lang.String colorStr)
colorStr
- the string to be parsedpublic static java.lang.String getStringColor(java.awt.Color color)
color
- the color to processpublic static java.lang.String addOffset(java.lang.String colorStr, int offset)
colorStr
- the hexadecimal representation of the color (eg. "#ff0000");offset
- the offset to applyaddOffset(Color, int)
public static java.awt.Color addOffset(java.awt.Color color, int offset)
color
- the color to processoffset
- the offset to applyaddOffset(String, int)
Copyright © 2001-2010 Jalios SA. All Rights Reserved.