scoop
0.1.4
Scoop - Simple ColoR pAleTtes and mappERs
|
Class for color palette. More...
#include <ColorPalette.h>
Public Types | |
enum | ColorBrewerSequential { BuGn = 0, BuPu, GnBu, OrRd, PuBu, PuBuGn, PuRd, RdPu, YlGn, YlGnBu, YlOrBr, YlOrRd, Blues, Greens, Greys, Oranges, Purples, Reds } |
Possible ColorBrewer sequential color palette names. | |
enum | ColorBrewerDiverging { BrBG, PiYG, PRGn, PurOr, RdBu, RdGy, RdYlBu, RdYlGn, Spectral } |
Possible ColorBrewer diverging color palette names. | |
enum | ColorBrewerQualitative { Accent, Dark2, Paired, Pastel1, Pastel2, Set1, Set2, Set3 } |
Possible ColorBrewer qualitative color palette names. | |
enum | MatplotlibPerceptualUniform { Viridis, Magma, Inferno, Plasma } |
typedef std::vector< Color > | Colors |
Container of color objects. | |
Public Member Functions | |
const Colors & | colors (void) const |
Returns the container of colors of the palette. More... | |
Colors & | colors (void) |
Returns the container of colors of the palette. More... | |
unsigned int | size (void) const |
Returns the size of the palette. More... | |
Static Public Member Functions | |
static ColorPalette | colorBrewerSequential (ColorBrewerSequential cbPalette=ColorBrewerSequential::BuGn, unsigned int size=3, bool reverse=true) |
Static method to create a palette based on ColorBrewer's sequential palettes. More... | |
static ColorPalette | colorBrewerDiverging (ColorBrewerDiverging cbPalette=ColorBrewerDiverging::BrBG, unsigned int size=3, bool reverse=true) |
Static method to create a palette based on ColorBrewer's diverging palettes. More... | |
static ColorPalette | colorBrewerQualitative (ColorBrewerQualitative cbPalette=ColorBrewerQualitative::Accent, unsigned int size=3, bool reverse=false) |
Static method to create a palette based on ColorBrewer's qualitative palettes. More... | |
static ColorPalette | matplotlibPerceptualUniform (MatplotlibPerceptualUniform mplPalette=MatplotlibPerceptualUniform::Viridis, bool reverse=false) |
Protected Attributes | |
Colors | _colors |
Container of the colors in the palette. | |
Class for color palette.
A color palette is simply a container of Color objects
Definition at line 35 of file ColorPalette.h.
|
static |
Static method to create a palette based on ColorBrewer's diverging palettes.
[in] | cbPalette | the name of the ColorBrewer's diverging pelette |
[in] | size | the size of the palette. Size must be between 3 and 11 |
[in] | reverse | if the palette is created backwards |
|
static |
Static method to create a palette based on ColorBrewer's qualitative palettes.
[in] | cbPalette | the name of the ColorBrewer's qualitative pelette |
[in] | size | the size of the palette. Size must be at least 1 and lower than the number of colors available for the palette chosen. |
[in] | reverse | if the palette is created backwards |
|
static |
Static method to create a palette based on ColorBrewer's sequential palettes.
[in] | cbPalette | the name of the ColorBrewer's sequential pelette |
[in] | size | the size of the palette. Size must be between 3 and 9. |
[in] | reverse | if the palette is created backwards |
const Colors& scoop::ColorPalette::colors | ( | void | ) | const |
Returns the container of colors of the palette.
Referenced by scoop::CategoricalColorMap< Category, Hash >::CategoricalColorMap().
Colors& scoop::ColorPalette::colors | ( | void | ) |
Returns the container of colors of the palette.
unsigned int scoop::ColorPalette::size | ( | void | ) | const |
Returns the size of the palette.
Referenced by scoop::CategoricalColorMap< Category, Hash >::CategoricalColorMap().