com.ge.research.html
Class HTMLColors

java.lang.Object
  extended bycom.ge.research.html.HTMLColors

public class HTMLColors
extends java.lang.Object

Color codes for the HTML 4.0 standard color set, and other pre-defined color values. Colors are represented in hex notation. Also provides conversion methods to go between Color objects and HTML hex color strings.

Version:
$Revision: 1.1 $ $Date: 2006/08/11 00:17:33 $
Author:
garbiras
Created on:
Sep 9, 2002

Field Summary
static java.lang.String ACQUA
          The HTML 4.0 standard color AQUA
static java.lang.String BLACK
          The HTML 4.0 standard color BLACK
static java.lang.String BLUE
          The HTML 4.0 standard color BLUE
static java.lang.String DARK_GRAY
          A color representing a darker shade of GRAY
static java.lang.String FUSCIA
          The HTML 4.0 standard color FUSCIA
static java.lang.String GRAY
          The HTML 4.0 standard color GRAY
static java.lang.String GREEN
          The HTML 4.0 standard color GREEN
static java.lang.String LIGHT_GRAY
          A color representing a lighter shade of GRAY
static java.lang.String LIME
          The HTML 4.0 standard color LIME
static java.lang.String MAROON
          The HTML 4.0 standard color MAROON
static java.lang.String NAVY
          The HTML 4.0 standard color NAVY
static java.lang.String OLIVE
          The HTML 4.0 standard color OLIVE
static java.lang.String PURPLE
          The HTML 4.0 standard color PURPLE
static java.lang.String RED
          The HTML 4.0 standard color RED
static java.lang.String SILVER
          The HTML 4.0 standard color SILVER
static java.lang.String TEAL
          The HTML 4.0 standard color TEAL
static java.lang.String WHITE
          The HTML 4.0 standard color WHITE
static java.lang.String YELLOW
          The HTML 4.0 standard color YELLOW
 
Constructor Summary
HTMLColors()
           
 
Method Summary
static java.lang.String translateToHTMLColor(java.awt.Color javaColor)
          Converts a Color object into the HTML hex string equivalent color.
static java.awt.Color translateToJavaColor(java.lang.String hexColor)
          Converts an HTML hex representation of a color into the Color equivalent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLACK

public static final java.lang.String BLACK
The HTML 4.0 standard color BLACK

See Also:
Constant Field Values

NAVY

public static final java.lang.String NAVY
The HTML 4.0 standard color NAVY

See Also:
Constant Field Values

BLUE

public static final java.lang.String BLUE
The HTML 4.0 standard color BLUE

See Also:
Constant Field Values

GREEN

public static final java.lang.String GREEN
The HTML 4.0 standard color GREEN

See Also:
Constant Field Values

TEAL

public static final java.lang.String TEAL
The HTML 4.0 standard color TEAL

See Also:
Constant Field Values

LIME

public static final java.lang.String LIME
The HTML 4.0 standard color LIME

See Also:
Constant Field Values

ACQUA

public static final java.lang.String ACQUA
The HTML 4.0 standard color AQUA

See Also:
Constant Field Values

MAROON

public static final java.lang.String MAROON
The HTML 4.0 standard color MAROON

See Also:
Constant Field Values

PURPLE

public static final java.lang.String PURPLE
The HTML 4.0 standard color PURPLE

See Also:
Constant Field Values

OLIVE

public static final java.lang.String OLIVE
The HTML 4.0 standard color OLIVE

See Also:
Constant Field Values

GRAY

public static final java.lang.String GRAY
The HTML 4.0 standard color GRAY

See Also:
Constant Field Values

SILVER

public static final java.lang.String SILVER
The HTML 4.0 standard color SILVER

See Also:
Constant Field Values

RED

public static final java.lang.String RED
The HTML 4.0 standard color RED

See Also:
Constant Field Values

FUSCIA

public static final java.lang.String FUSCIA
The HTML 4.0 standard color FUSCIA

See Also:
Constant Field Values

YELLOW

public static final java.lang.String YELLOW
The HTML 4.0 standard color YELLOW

See Also:
Constant Field Values

WHITE

public static final java.lang.String WHITE
The HTML 4.0 standard color WHITE

See Also:
Constant Field Values

LIGHT_GRAY

public static final java.lang.String LIGHT_GRAY
A color representing a lighter shade of GRAY

See Also:
Constant Field Values

DARK_GRAY

public static final java.lang.String DARK_GRAY
A color representing a darker shade of GRAY

See Also:
Constant Field Values
Constructor Detail

HTMLColors

public HTMLColors()
Method Detail

translateToHTMLColor

public static final java.lang.String translateToHTMLColor(java.awt.Color javaColor)
Converts a Color object into the HTML hex string equivalent color.

Parameters:
javaColor - the color to produce the HTML hex representation of
Returns:
The HTML hex representation of the javaColor

translateToJavaColor

public static final java.awt.Color translateToJavaColor(java.lang.String hexColor)
Converts an HTML hex representation of a color into the Color equivalent.

Parameters:
hexColor - the HTML hex representation of the color to produce
Returns:
The Color equivalent of the HTML hex representation