phelps.awt

Class Colors

public class Colors extends Object

Color management.

Version: $Revision: 1.2 $ $Date: 2003/06/01 08:00:03 $

Field Summary
static ColorTRANSPARENT
Canonical transparent color.
Method Summary
static voidaddColor(String n, Object o)
Put color in system list, which some behaviors use in menus.
static ColorgetColor(String spec)
static ColorgetColor(String spec, Color defaultColor)
Retrieve color by name (from sRGB set: "red", "maroon", ...) or create new color by hex code ("#ffffff", "#900").
static StringgetName(Color c)

Field Detail

TRANSPARENT

public static final Color TRANSPARENT
Canonical transparent color. Use ==, not equals().

Method Detail

addColor

public static void addColor(String n, Object o)
Put color in system list, which some behaviors use in menus.

getColor

public static Color getColor(String spec)

getColor

public static Color getColor(String spec, Color defaultColor)
Retrieve color by name (from sRGB set: "red", "maroon", ...) or create new color by hex code ("#ffffff", "#900").

getName

public static String getName(Color c)