public class ColorPalette
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static java.awt.Color |
BLACK |
The Constant BLACK.
|
static java.awt.Color |
BLUE |
The Constant BLUE.
|
static java.awt.Color |
BROWN |
The Constant BROWN.
|
static java.awt.Color |
BURGUNDY |
The Constant BURGUNDY.
|
static java.awt.Color |
CADET_BLUE |
The Constant CADET_BLUE.
|
static java.awt.Color[] |
COLORS |
The Constant COLORS.
|
static java.awt.Color |
CYAN |
The Constant CYAN.
|
static java.awt.Color |
DARK_BLUE |
The Constant DARK_BLUE.
|
static java.awt.Color |
DARK_CYAN |
The Constant DARK_CYAN.
|
static java.awt.Color |
DARK_GRAY |
The Constant DARK_GRAY.
|
static java.awt.Color |
DARK_GREEN |
The Constant DARK_GREEN.
|
static java.awt.Color |
DARK_MAGENTA |
The Constant DARK_MAGENTA.
|
static java.awt.Color |
DARK_PURPLE |
The Constant DARK_PURPLE.
|
static java.awt.Color |
DARK_RED |
The Constant DARK_RED.
|
static java.awt.Color |
DARK_SLATE_GRAY |
The Constant DARK_SLATE_GRAY.
|
static java.awt.Color |
FOREST_GREEN |
The Constant FOREST_GREEN.
|
static java.awt.Color |
GOLD |
The Constant GOLD.
|
static java.awt.Color |
GRASS_GREEN |
The Constant GRASS_GREEN.
|
static java.awt.Color |
GREEN |
The Constant GREEN.
|
static java.awt.Color |
LIGHT_GRAY |
The Constant LIGHT_GRAY.
|
static java.awt.Color |
LIGHT_GREEN |
The Constant LIGHT_GREEN.
|
static java.awt.Color |
LIGHT_PURPLE |
The Constant LIGHT_PURPLE.
|
static java.awt.Color |
LIGHT_SLATE_GRAY |
The Constant LIGHT_SLATE_GRAY.
|
static java.awt.Color |
MAGENTA |
The Constant MAGENTA.
|
static java.awt.Color |
MIDNIGHT_BLUE |
The Constant MIDNIGHT_BLUE.
|
static java.awt.Color |
NAVY_BLUE |
The Constant NAVY_BLUE.
|
static java.awt.Color |
ORANGE |
The Constant ORANGE.
|
static java.awt.Color |
PASTEL_GREEN |
The Constant PASTEL_GREEN.
|
static java.awt.Color |
PINK |
The Constant PINK.
|
static java.awt.Color |
PLUM |
The Constant PLUM.
|
static java.awt.Color |
PURPLE |
The Constant PURPLE.
|
static java.awt.Color |
RED |
The Constant RED.
|
static java.awt.Color |
ROYAL_BLUE |
The Constant ROYAL_BLUE.
|
static java.awt.Color |
SALMON |
The Constant SALMON.
|
static double |
SCALEFACTOR |
The Constant SCALEFACTOR.
|
static java.awt.Color |
SKY_BLUE |
The Constant SKY_BLUE.
|
static java.awt.Color |
SLATE_BLUE |
The Constant SLATE_BLUE.
|
static java.awt.Color |
SLATE_GRAY |
The Constant SLATE_GRAY.
|
static java.awt.Color |
STEEL_BLUE |
The Constant STEEL_BLUE.
|
static java.awt.Color |
TURQUOISE |
The Constant TURQUOISE.
|
static java.awt.Color |
VIOLET_RED |
The Constant VIOLET_RED.
|
static java.awt.Color |
WHITE |
The Constant WHITE.
|
static java.awt.Color |
YELLOW |
The Constant YELLOW.
|
| Constructor | Description |
|---|---|
ColorPalette() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.util.List<java.lang.String> |
convertToHtmlColors(java.awt.Color[] colors) |
Convert to html colors.
|
static long |
getColorOrderIndex(java.awt.Color color,
int size) |
Gets the color order index.
|
static int |
getOrderIndex(java.awt.Color color) |
Gets the order index.
|
static int |
getOrderIndex(java.lang.String color) |
Gets the order index.
|
static java.awt.Color[] |
heat(int n) |
Generate heat color palette.
|
static java.awt.Color[] |
heat(int n,
float alpha) |
Generate heat color palette.
|
static java.awt.Color[] |
jet(int n) |
Generate jet color palette.
|
static java.awt.Color[] |
jet(int n,
float alpha) |
Generate jet color palette.
|
static java.awt.Color[] |
rainbow(int n) |
Generate rainbow color palette.
|
static java.awt.Color[] |
rainbow(int n,
float alpha) |
Generate rainbow color palette.
|
static java.awt.Color[] |
redblue(int n) |
Generate red-blue color palette.
|
static java.awt.Color[] |
redblue(int n,
float alpha) |
Generate red-blue color palette.
|
static java.awt.Color[] |
redgreen(int n) |
Generate red-green color palette.
|
static java.awt.Color[] |
redgreen(int n,
float alpha) |
Generate red-green color palette.
|
static java.awt.Color[] |
terrain(int n) |
Generate terrain color palette.
|
static java.awt.Color[] |
terrain(int n,
float alpha) |
Generate terrain color palette.
|
static java.awt.Color[] |
topo(int n) |
Generate topo color palette.
|
static java.awt.Color[] |
topo(int n,
float alpha) |
Generate topo color palette.
|
public static final java.awt.Color WHITE
public static final java.awt.Color BLACK
public static final java.awt.Color LIGHT_GRAY
public static final java.awt.Color DARK_GRAY
public static final java.awt.Color SLATE_GRAY
public static final java.awt.Color LIGHT_SLATE_GRAY
public static final java.awt.Color DARK_SLATE_GRAY
public static final java.awt.Color RED
public static final java.awt.Color DARK_RED
public static final java.awt.Color VIOLET_RED
public static final java.awt.Color GREEN
public static final java.awt.Color DARK_GREEN
public static final java.awt.Color LIGHT_GREEN
public static final java.awt.Color PASTEL_GREEN
public static final java.awt.Color FOREST_GREEN
public static final java.awt.Color GRASS_GREEN
public static final java.awt.Color BLUE
public static final java.awt.Color NAVY_BLUE
public static final java.awt.Color SLATE_BLUE
public static final java.awt.Color ROYAL_BLUE
public static final java.awt.Color CADET_BLUE
public static final java.awt.Color MIDNIGHT_BLUE
public static final java.awt.Color SKY_BLUE
public static final java.awt.Color STEEL_BLUE
public static final java.awt.Color DARK_BLUE
public static final java.awt.Color MAGENTA
public static final java.awt.Color DARK_MAGENTA
public static final java.awt.Color CYAN
public static final java.awt.Color DARK_CYAN
public static final java.awt.Color PURPLE
public static final java.awt.Color LIGHT_PURPLE
public static final java.awt.Color DARK_PURPLE
public static final java.awt.Color ORANGE
public static final java.awt.Color PINK
public static final java.awt.Color YELLOW
public static final java.awt.Color GOLD
public static final java.awt.Color BROWN
public static final java.awt.Color SALMON
public static final java.awt.Color TURQUOISE
public static final java.awt.Color BURGUNDY
public static final java.awt.Color PLUM
public static final java.awt.Color[] COLORS
public static final double SCALEFACTOR
public static java.awt.Color[] terrain(int n)
n - the number of colors in the palette.public static java.awt.Color[] terrain(int n,
float alpha)
n - the number of colors in the palette.alpha - the parameter in [0,1] for transparency.public static java.awt.Color[] topo(int n)
n - the number of colors in the palette.public static java.awt.Color[] topo(int n,
float alpha)
n - the number of colors in the palette.alpha - the parameter in [0,1] for transparency.public static java.awt.Color[] jet(int n)
n - the number of colors in the palette.public static java.awt.Color[] jet(int n,
float alpha)
n - the number of colors in the palette.alpha - the parameter in [0,1] for transparency.public static java.awt.Color[] redgreen(int n)
n - the number of colors in the palette.public static java.awt.Color[] redgreen(int n,
float alpha)
n - the number of colors in the palette.alpha - the parameter in [0,1] for transparency.public static java.awt.Color[] redblue(int n)
n - the number of colors in the palette.public static java.awt.Color[] redblue(int n,
float alpha)
n - the number of colors in the palette.alpha - the parameter in [0,1] for transparency.public static java.awt.Color[] heat(int n)
n - the number of colors in the palette.public static java.awt.Color[] heat(int n,
float alpha)
n - the number of colors in the palette.alpha - the parameter in [0,1] for transparency.public static java.awt.Color[] rainbow(int n)
n - the number of colors in the palette.public static java.awt.Color[] rainbow(int n,
float alpha)
n - the number of colors in the palette.alpha - the parameter in [0,1] for transparency.public static java.util.List<java.lang.String> convertToHtmlColors(java.awt.Color[] colors)
colors - the colorspublic static int getOrderIndex(java.lang.String color)
color - the colorpublic static int getOrderIndex(java.awt.Color color)
color - the colorpublic static long getColorOrderIndex(java.awt.Color color,
int size)
color - the colorsize - the size