## org.das2.util.ColorUtil

single place to contain Color-Name mapping. These include an old set of 10 or so color names, plus the 130 or so web color names like "SaddleBrown" and "DarkOrchid".

## ColorUtil( )

## LIGHT_PINK

## PINK

## CRIMSON

## LAVENDER_BLUSH

## PALE_VIOLET_RED

## HOT_PINK

## DEEP_PINK

## MEDIUM_VIOLET_RED

## ORCHID

## THISTLE

## PLUM

## VIOLET

## MAGENTA

## FUCHSIA

## DARK_MAGENTA

## PURPLE

## MEDIUM_ORCHID

## DARK_VIOLET

## DARK_ORCHID

## INDIGO

## BLUE_VIOLET

## MEDIUM_PURPLE

## MEDIUM_SLATE_BLUE

## SLATE_BLUE

## DARK_SLATE_BLUE

## LAVENDER

## GHOST_WHITE

## BLUE

## MEDIUM_BLUE

## MIDNIGHT_BLUE

## DARK_BLUE

## NAVY

## ROYAL_BLUE

## CORNFLOWER_BLUE

## LIGHT_STEEL_BLUE

## LIGHT_SLATE_GRAY

## SLATE_GRAY

## DODGER_BLUE

## ALICE_BLUE

## STEEL_BLUE

## LIGHT_SKY_BLUE

## SKY_BLUE

## DEEP_SKY_BLUE

## LIGHT_BLUE

## POWDER_BLUE

## CADET_BLUE

## AZURE

## LIGHT_CYAN

## PALE_TURQUOISE

## CYAN

## AQUA

## DARK_TURQUOISE

## DARK_SLATE_GRAY

## DARK_CYAN

## TEAL

## MEDIUM_TURQUOISE

## LIGHT_SEA_GREEN

## TURQUOISE

## AQUAMARINE

## MEDIUM_AQUAMARINE

## MEDIUM_SPRING_GREEN

## MINT_CREAM

## SPRING_GREEN

## MEDIUM_SEA_GREEN

## SEA_GREEN

## HONEYDEW

## LIGHT_GREEN

## PALE_GREEN

## DARK_SEA_GREEN

## LIME_GREEN

## LIME

## FOREST_GREEN

## GREEN

## DARK_GREEN

## CHARTREUSE

## LAWN_GREEN

## GREEN_YELLOW

## DARK_OLIVE_GREEN

## YELLOW_GREEN

## OLIVE_DRAB

## BEIGE

## LIGHT_GOLDENROD_YELLOW

## IVORY

## LIGHT_YELLOW

## YELLOW

## OLIVE

## DARK_KHAKI

## LEMON_CHIFFON

## PALE_GOLDENROD

## KHAKI

## GOLD

## CORNSILK

## GOLDENROD

## DARK_GOLDENROD

## FLORAL_WHITE

## OLD_LACE

## WHEAT

## MOCCASIN

## ORANGE

## PAPAYA_WHIP

## BLANCHED_ALMOND

## NAVAJO_WHITE

## ANTIQUE_WHITE

## TAN

## BURLY_WOOD

## BISQUE

## DARK_ORANGE

## LINEN

## PERU

## PEACH_PUFF

## SANDY_BROWN

## CHOCOLATE

## SADDLE_BROWN

## SEASHELL

## SIENNA

## LIGHT_SALMON

## CORAL

## ORANGE_RED

## DARK_SALMON

## TOMATO

## MISTY_ROSE

## SALMON

## SNOW

## LIGHT_CORAL

## ROSY_BROWN

## INDIAN_RED

## RED

## BROWN

## FIRE_BRICK

## DARK_RED

## MAROON

## WHITE

## WHITE_SMOKE

## GAINSBORO

## LIGHT_GREY

## SILVER

## DARK_GRAY

## GRAY

## DIM_GRAY

## BLACK

## decodeColor

decodeColor( String s ) → java.awt.Color

decode the color, throwing a RuntimeException when the color is not parsable. Valid entries include:

- "red"
- "RED"
- "0xFF0000"
- "0xff0000"
- "#00000000" (transparent)
- "0x00ffffff" (transparent)
- "#ffeedd"
- "LightPink" (X11 color names)

This also allows a color name to follow the RGB like so:

- "0xFFFF00 (Purple)"

to improve legibility of .vap files. X11 color names can be found at wikipedia.

### Parameters

s - the string representation

### Returns:

the color

### See Also:

https://en.wikipedia.org/wiki/X11_color_names
http://cng.seas.rochester.edu/CNG/docs/x11color.html
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## encodeColor

encodeColor( java.awt.Color color ) → String

return either a named color or #00aaff for opaque colors and #80aaff00 for transparent colors.

### Parameters

color - a Color

### Returns:

named color or hex string like "#FF0000" for Red.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getNamedColors

getNamedColors( ) → java.util.Map

return a map of the named colors.

### Returns:

a map of the named colors.
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## getRicePaperColor

getRicePaperColor( ) → java.awt.Color

return standard color for slightly masking background.

### Returns:

a java.awt.Color
[search for examples] [view on GitHub] [view on old javadoc] [view source]

## nameForColor

nameForColor( java.awt.Color color ) → String

return the preferred name for the color

### Parameters

color - a Color

### Returns:

the preferred name (or #RGB) for the color
[search for examples] [view on GitHub] [view on old javadoc] [view source]