|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.umd.cfar.lamp.viper.util.ColorUtilities
A quick hack for placeholder colors, these color utility methods and static items allow quick access to colors by their English name.
Field Summary | |
static java.awt.Color |
translucent
|
static java.util.Map |
WEB_COLOR_NAMES
A map of web color names, e.g. |
Constructor Summary | |
ColorUtilities()
|
Method Summary | |
static java.awt.Color |
getColor(java.lang.String name)
Gets the java color corresponding to the given CSS color name. |
static double[] |
rgb2xyz(double[] RGB)
Converts from the given RGB triplet into a corresponding XYZ triplet. |
static double[] |
xyz2rgb(double[] XYZ)
Converts from XYZ to RGB. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.util.Map WEB_COLOR_NAMES
antiquewhiteor
salmon. For a comprehensive list, see the w3c's css color module documenation.
public static java.awt.Color translucent
Constructor Detail |
public ColorUtilities()
Method Detail |
public static java.awt.Color getColor(java.lang.String name)
name
- the color name, e.g. khakior
burlywood
null
if no color
matches. XXX: Should it throw an illegal argument exception?public static double[] rgb2xyz(double[] RGB)
RGB
- red, green and blue components, in the range from 0 to 1
public static double[] xyz2rgb(double[] XYZ)
XYZ
- a color in XYZ space
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |