public final class JaxoColor
extends java.lang.Object
colordvi
package (approximately) and a predefined set of
gray shades.Modifier and Type | Field and Description |
---|---|
static int |
ALL_COLORS_MODE
Any Color can be chosen.
|
static java.awt.Color |
APRICOT
The color Apricot.
|
static java.awt.Color |
AQUAMARINE
The color Aquamarine.
|
static java.awt.Color |
BITTERSWEET
The color Bittersweet.
|
static java.awt.Color |
BLACK
The color Black.
|
static java.awt.Color |
BLUE
The color Blue.
|
static java.awt.Color |
BLUE_GREEN
The color BlueGreen.
|
static java.awt.Color |
BLUE_VIOLET
The color BlueViolet.
|
static java.awt.Color |
BRICK_RED
The color BrickRed.
|
static java.awt.Color |
BROWN
The color Brown.
|
static java.awt.Color |
BURNT_ORANGE
The color BurntOrange.
|
static java.awt.Color |
CADET_BLUE
The color CadetBlue.
|
static java.awt.Color |
CARNATION_PINK
The color CarnationPink.
|
static java.awt.Color |
CERULEAN
The color Cerulean.
|
static java.awt.Color |
CORNFLOWER_BLUE
The color CornflowerBlue.
|
static java.awt.Color |
CYAN
The color Cyan.
|
static java.awt.Color |
DANDELION
The color Dandelion.
|
static java.awt.Color |
DARK_ORCHID
The color DarkOrchid.
|
static java.awt.Color |
EMERALD
The color Emerald.
|
static java.awt.Color |
FOREST_GREEN
The color ForestGreen.
|
static java.awt.Color |
FUCHSIA
The color Fuchsia.
|
static java.awt.Color |
GOLDEN_ROD
The color Goldenrod.
|
static java.awt.Color |
GRAY
The color Gray.
|
static java.awt.Color |
GRAYSCALE105
The color GrayScale105.
|
static java.awt.Color |
GRAYSCALE120
The color GrayScale120.
|
static java.awt.Color |
GRAYSCALE135
The color GrayScale135.
|
static java.awt.Color |
GRAYSCALE15
The color GrayScale15.
|
static java.awt.Color |
GRAYSCALE150
The color GrayScale150.
|
static java.awt.Color |
GRAYSCALE165
The color GrayScale165.
|
static java.awt.Color |
GRAYSCALE180
The color GrayScale180.
|
static java.awt.Color |
GRAYSCALE195
The color GrayScale195.
|
static java.awt.Color |
GRAYSCALE210
The color GrayScale210.
|
static java.awt.Color |
GRAYSCALE225
The color GrayScale225.
|
static java.awt.Color |
GRAYSCALE240
The color GrayScale240.
|
static java.awt.Color |
GRAYSCALE30
The color GrayScale30.
|
static java.awt.Color |
GRAYSCALE45
The color GrayScale45.
|
static java.awt.Color |
GRAYSCALE60
The color GrayScale60.
|
static java.awt.Color |
GRAYSCALE75
The color GrayScale75.
|
static java.awt.Color |
GRAYSCALE90
The color GrayScale90.
|
static java.awt.Color |
GREEN
The color Green.
|
static java.awt.Color |
GREEN_YELLOW
The color GreenYellow.
|
static int |
JAXO_COLORS_MODE
All Colors defined in JaxoColor can be chosen.
|
static int |
JAXO_COLORS_NO_GRAYSCALES_MODE
Colors defined in JaxoColor except grayscales can be chosen.
|
static java.awt.Color |
JUNGLE_GREEN
The color JungleGreen.
|
static java.awt.Color |
LAVENDER
The color Lavender.
|
static java.awt.Color |
LIME_GREEN
The color LimeGreen.
|
static java.awt.Color |
MAGENTA
The color Magenta.
|
static java.awt.Color |
MAHOGANY
The color Mahagony.
|
static java.awt.Color |
MAROON
The color Maroon.
|
static java.awt.Color |
MELON
The color Melon.
|
static java.awt.Color |
MIDNIGHT_BLUE
The color MidnightBlue.
|
static java.awt.Color |
MULBERRY
The color Mulberry.
|
static java.awt.Color |
NAVY_BLUE
The color NavyBlue.
|
static java.awt.Color |
OLIVE_GREEN
The color OliveGreen.
|
static java.awt.Color |
ORANGE
The color Orange.
|
static java.awt.Color |
ORANGE_RED
The color OrangeRed.
|
static java.awt.Color |
ORCHID
The color Orchid.
|
static java.awt.Color |
PEACH
The color Peach.
|
static java.awt.Color |
PERIWINKLE
The color Periwinkle.
|
static java.awt.Color |
PINE_GREEN
The color PineGreen.
|
static java.awt.Color |
PLUM
The color Plum.
|
static java.awt.Color |
PROCESS_BLUE
The color ProcessBlue.
|
static java.awt.Color |
PURPLE
The color Purple.
|
static java.awt.Color |
RAWSIENNA
The color RawSienna.
|
static java.awt.Color |
RED
The color Red.
|
static java.awt.Color |
RED_ORANGE
The color RedOrange.
|
static java.awt.Color |
RED_VIOLET
The color RedViolet.
|
static java.awt.Color |
RHODAMINE
The color Rhodamine.
|
static java.awt.Color |
ROYAL_BLUE
The color RoyalBlue.
|
static java.awt.Color |
ROYAL_PURPLE
The color RoyalPurple.
|
static java.awt.Color |
RUBINE_RED
The color RubineRed.
|
static java.awt.Color |
SALMON
The color Salmon.
|
static java.awt.Color |
SEA_GREEN
The color SeaGreen.
|
static java.awt.Color |
SEPIA
The color Sepia.
|
static java.awt.Color |
SKY_BLUE
The color SkyBlue.
|
static java.awt.Color |
SPRING_GREEN
The color SpringGreen.
|
static java.awt.Color |
TAN
The color Tan.
|
static java.awt.Color |
TEAL_BLUE
The color TealBlue.
|
static java.awt.Color |
THISTLE
The color Thistle.
|
static java.awt.Color |
TURQUOISE
The color Turquoise.
|
static java.awt.Color |
VIOLET
The color Violet.
|
static java.awt.Color |
VIOLET_RED
The color VioletRed.
|
static java.awt.Color |
WHITE
The color White.
|
static java.awt.Color |
WILDSTRAWBERRY
The color WildStrawberry.
|
static java.awt.Color |
YELLOW
The color Yellow.
|
static java.awt.Color |
YELLOW_GREEN
The color YellowGreen.
|
static java.awt.Color |
YELLOW_ORANGE
The color YellowOrange.
|
Modifier and Type | Method and Description |
---|---|
static java.awt.Color |
getClosestColorTo(java.awt.Color refcolor,
int mode)
Return the Color closest (in the specified mode) to the given color.
|
static java.awt.Color |
getColor(int i)
Returns the color at index i of the colorList.
|
static java.awt.Color |
getColor(java.lang.String cName)
Returns the color corresponding to the name cName,
or the default color if none.
|
static java.awt.Color |
getColor(java.lang.String cName,
int mode)
Returns the color corresponding to the name cName, or the
default color if none.
|
static int |
getColorCount()
Returns the number of colors defined by JaxoColor.
|
static java.lang.String |
getColorName(java.awt.Color color)
Returns the name of the closest defined color to 'color'.
|
static java.lang.String |
getColorName(java.awt.Color color,
int space)
Returns the name of the closest defined color (in the mode)
color.
|
static java.lang.String |
getColorName(int i)
Returns the name of the color at index i in the colorList.
|
static java.awt.Color |
getDefaultColor()
Returns the current default color.
|
static java.awt.Color |
getDefaultFillColor(java.awt.Color lineColor)
Returns the current default fill color for the given line color.
|
static java.awt.Color |
getGrayScaleColor(float f)
Returns the grayscale that corresponds to the float value f.
|
static float |
getGrayScaleFloat(java.awt.Color color)
Returns a string representation of a Color that gives the grayscale
of color, or sets it to '0.0' (black), if color is not a grayscale.
|
static java.lang.String |
getLatexColorCommand(java.awt.Color color)
Returns a String containing the LaTex color command
(as used by the package colordvi) to set the color.
|
static boolean |
isDefinedColor(java.awt.Color color)
Checks whether the given color is a defined Color.
|
static boolean |
isDefinedColor(java.awt.Color color,
int mode)
Checks whether the given color is a defined Color in the given mode.
|
static boolean |
isDefinedColorName(java.lang.String cName)
Checks whether the given name is for a defined Color.
|
static boolean |
isDefinedColorName(java.lang.String cName,
int mode)
Checks whether the given name is for a Color defined in the given mode.
|
static boolean |
isGrayScale(java.awt.Color color)
Checks whether the 'color' is closest to one of the gray scales
defined in this class.
|
public static final int JAXO_COLORS_MODE
public static final int JAXO_COLORS_NO_GRAYSCALES_MODE
public static final int ALL_COLORS_MODE
public static final java.awt.Color GREEN_YELLOW
public static final java.awt.Color YELLOW
public static final java.awt.Color GOLDEN_ROD
public static final java.awt.Color DANDELION
public static final java.awt.Color APRICOT
public static final java.awt.Color PEACH
public static final java.awt.Color MELON
public static final java.awt.Color YELLOW_ORANGE
public static final java.awt.Color ORANGE
public static final java.awt.Color BURNT_ORANGE
public static final java.awt.Color BITTERSWEET
public static final java.awt.Color RED_ORANGE
public static final java.awt.Color MAHOGANY
public static final java.awt.Color MAROON
public static final java.awt.Color BRICK_RED
public static final java.awt.Color RED
public static final java.awt.Color ORANGE_RED
public static final java.awt.Color RUBINE_RED
public static final java.awt.Color WILDSTRAWBERRY
public static final java.awt.Color SALMON
public static final java.awt.Color CARNATION_PINK
public static final java.awt.Color MAGENTA
public static final java.awt.Color VIOLET_RED
public static final java.awt.Color RHODAMINE
public static final java.awt.Color MULBERRY
public static final java.awt.Color RED_VIOLET
public static final java.awt.Color FUCHSIA
public static final java.awt.Color LAVENDER
public static final java.awt.Color THISTLE
public static final java.awt.Color ORCHID
public static final java.awt.Color DARK_ORCHID
public static final java.awt.Color PURPLE
public static final java.awt.Color PLUM
public static final java.awt.Color VIOLET
public static final java.awt.Color ROYAL_PURPLE
public static final java.awt.Color BLUE_VIOLET
public static final java.awt.Color PERIWINKLE
public static final java.awt.Color CADET_BLUE
public static final java.awt.Color CORNFLOWER_BLUE
public static final java.awt.Color MIDNIGHT_BLUE
public static final java.awt.Color NAVY_BLUE
public static final java.awt.Color ROYAL_BLUE
public static final java.awt.Color BLUE
public static final java.awt.Color CERULEAN
public static final java.awt.Color CYAN
public static final java.awt.Color PROCESS_BLUE
public static final java.awt.Color SKY_BLUE
public static final java.awt.Color TURQUOISE
public static final java.awt.Color TEAL_BLUE
public static final java.awt.Color AQUAMARINE
public static final java.awt.Color BLUE_GREEN
public static final java.awt.Color EMERALD
public static final java.awt.Color JUNGLE_GREEN
public static final java.awt.Color SEA_GREEN
public static final java.awt.Color GREEN
public static final java.awt.Color FOREST_GREEN
public static final java.awt.Color PINE_GREEN
public static final java.awt.Color LIME_GREEN
public static final java.awt.Color YELLOW_GREEN
public static final java.awt.Color SPRING_GREEN
public static final java.awt.Color OLIVE_GREEN
public static final java.awt.Color RAWSIENNA
public static final java.awt.Color SEPIA
public static final java.awt.Color BROWN
public static final java.awt.Color TAN
public static final java.awt.Color GRAY
public static final java.awt.Color BLACK
public static final java.awt.Color GRAYSCALE15
public static final java.awt.Color GRAYSCALE30
public static final java.awt.Color GRAYSCALE45
public static final java.awt.Color GRAYSCALE60
public static final java.awt.Color GRAYSCALE75
public static final java.awt.Color GRAYSCALE90
public static final java.awt.Color GRAYSCALE105
public static final java.awt.Color GRAYSCALE120
public static final java.awt.Color GRAYSCALE135
public static final java.awt.Color GRAYSCALE150
public static final java.awt.Color GRAYSCALE165
public static final java.awt.Color GRAYSCALE180
public static final java.awt.Color GRAYSCALE195
public static final java.awt.Color GRAYSCALE210
public static final java.awt.Color GRAYSCALE225
public static final java.awt.Color GRAYSCALE240
public static final java.awt.Color WHITE
public static boolean isDefinedColor(java.awt.Color color)
color
- A color.public static boolean isDefinedColor(java.awt.Color color, int mode)
color
- A color.mode
- the color mode.public static boolean isDefinedColorName(java.lang.String cName)
cName
- a color namepublic static boolean isDefinedColorName(java.lang.String cName, int mode)
cName
- a color name.mode
- the color mode.public static int getColorCount()
public static java.awt.Color getColor(int i)
i
- Index of the color to be returnedpublic static java.lang.String getColorName(int i)
i
- Index of the color whose name is to be returned.public static java.awt.Color getDefaultColor()
BLACK
.public static java.awt.Color getDefaultFillColor(java.awt.Color lineColor)
lineColor
- The line color.public static java.awt.Color getColor(java.lang.String cName)
cName
- The name of the color to be returned.getDefaultColor()
public static java.awt.Color getColor(java.lang.String cName, int mode)
cName
- The name of the color to be returned.mode
- The mode defining the color spacepublic static java.lang.String getColorName(java.awt.Color color)
color
- Color whose name is to be returned.public static java.lang.String getColorName(java.awt.Color color, int space)
color
- Color whose name is to be returned.space
- defining the allowed colors.public static float getGrayScaleFloat(java.awt.Color color)
color
- The color whose grayscale value is to be returned.public static boolean isGrayScale(java.awt.Color color)
color
- A color.public static java.awt.Color getGrayScaleColor(float f)
f
- A float between 0.f and 1.fpublic static java.lang.String getLatexColorCommand(java.awt.Color color)
color
- The color to be set in the LaTex command.public static java.awt.Color getClosestColorTo(java.awt.Color refcolor, int mode)
refcolor
- the color to be matched.mode
- mode to useLicensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.