Package org.jcolorbrewer
Enum ColorBrewer
- java.lang.Object
-
- java.lang.Enum<ColorBrewer>
-
- org.jcolorbrewer.ColorBrewer
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ColorBrewer>
public enum ColorBrewer extends java.lang.Enum<ColorBrewer>
The data values were extracted from the RColorBrewer R package. See http://www.datavis.ca/sas/macros/color/brewer.sas- Author:
- Peter Rose
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Color[]
getColorPalette(int colorCount)
static ColorBrewer[]
getDivergingColorPalettes(boolean colorBlindSave)
int
getMaximumColorCount()
java.lang.String
getPaletteDescription()
static ColorBrewer[]
getQualitativeColorPalettes(boolean colorBlindSave)
static ColorBrewer[]
getSequentialColorPalettes(boolean colorBlindSave)
boolean
isColorBlindSave()
static ColorBrewer
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ColorBrewer[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BrBG
public static final ColorBrewer BrBG
-
PiYG
public static final ColorBrewer PiYG
-
PRGn
public static final ColorBrewer PRGn
-
PuOr
public static final ColorBrewer PuOr
-
RdBu
public static final ColorBrewer RdBu
-
RdGy
public static final ColorBrewer RdGy
-
RdYlBu
public static final ColorBrewer RdYlBu
-
RdYlGn
public static final ColorBrewer RdYlGn
-
Spectral
public static final ColorBrewer Spectral
-
Accent
public static final ColorBrewer Accent
-
Dark2
public static final ColorBrewer Dark2
-
Paired
public static final ColorBrewer Paired
-
Pastel1
public static final ColorBrewer Pastel1
-
Pastel2
public static final ColorBrewer Pastel2
-
Set1
public static final ColorBrewer Set1
-
Set2
public static final ColorBrewer Set2
-
Set3
public static final ColorBrewer Set3
-
Blues
public static final ColorBrewer Blues
-
BuGn
public static final ColorBrewer BuGn
-
BuPu
public static final ColorBrewer BuPu
-
GnBu
public static final ColorBrewer GnBu
-
Greens
public static final ColorBrewer Greens
-
Greys
public static final ColorBrewer Greys
-
Oranges
public static final ColorBrewer Oranges
-
OrRd
public static final ColorBrewer OrRd
-
PuBu
public static final ColorBrewer PuBu
-
PuBuGn
public static final ColorBrewer PuBuGn
-
PuRd
public static final ColorBrewer PuRd
-
Purples
public static final ColorBrewer Purples
-
RdPu
public static final ColorBrewer RdPu
-
Reds
public static final ColorBrewer Reds
-
YlGn
public static final ColorBrewer YlGn
-
YlGnBu
public static final ColorBrewer YlGnBu
-
YlOrBr
public static final ColorBrewer YlOrBr
-
YlOrRd
public static final ColorBrewer YlOrRd
-
hsvRdBl
public static final ColorBrewer hsvRdBl
-
hsvCyMg
public static final ColorBrewer hsvCyMg
-
-
Method Detail
-
values
public static ColorBrewer[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ColorBrewer c : ColorBrewer.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ColorBrewer valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getPaletteDescription
public java.lang.String getPaletteDescription()
-
getMaximumColorCount
public int getMaximumColorCount()
-
isColorBlindSave
public boolean isColorBlindSave()
-
getColorPalette
public java.awt.Color[] getColorPalette(int colorCount)
-
getSequentialColorPalettes
public static ColorBrewer[] getSequentialColorPalettes(boolean colorBlindSave)
-
getDivergingColorPalettes
public static ColorBrewer[] getDivergingColorPalettes(boolean colorBlindSave)
-
getQualitativeColorPalettes
public static ColorBrewer[] getQualitativeColorPalettes(boolean colorBlindSave)
-
-