Easy class to generate palettes that simply blend two colors together. More...
#include <spectrum_palette.h>
Public Member Functions | |
std::vector< color_util::ColorRGBA24 > | getColors () const override |
The actual definition of the colors. More... | |
bool | hasTransparency () const override |
See if the palette has any transparent colors. More... | |
SpectrumPalette (const color_util::ColorRGBA24 &color_a, const color_util::ColorRGBA24 &color_b, bool transparent_minimum=true) | |
Constructor for a blend of colors from color_a to color_b. More... | |
SpectrumPalette (const color_util::ColorHSVA24 &color_a, const color_util::ColorHSVA24 &color_b, bool transparent_minimum=true) | |
Constructor for a blend of colors from color_a to color_b. More... | |
Public Member Functions inherited from robot_nav_rviz_plugins::NavGridPalette | |
virtual std::string | getName () const =0 |
Unique descriptive name for this particular palette. More... | |
virtual | ~NavGridPalette () |
Protected Attributes | |
color_util::ColorHSVA | color_a_ |
color_util::ColorHSVA | color_b_ |
bool | transparent_minimum_ |
Additional Inherited Members | |
Static Public Attributes inherited from robot_nav_rviz_plugins::NavGridPalette | |
static const unsigned int | NUM_CHANNELS = 4 |
static const unsigned int | NUM_COLORS = 256 |
Easy class to generate palettes that simply blend two colors together.
Implementing classes need only override the default constructor to call this class's constructor and the getName function.
Definition at line 49 of file spectrum_palette.h.
robot_nav_rviz_plugins::SpectrumPalette::SpectrumPalette | ( | const color_util::ColorRGBA24 & | color_a, |
const color_util::ColorRGBA24 & | color_b, | ||
bool | transparent_minimum = true |
||
) |
Constructor for a blend of colors from color_a to color_b.
color_a | Color used for low values |
color_b | Color used for high values |
transparent_minimum | Whether the lowest value should be completely transparent |
Definition at line 43 of file spectrum_palette.cpp.
robot_nav_rviz_plugins::SpectrumPalette::SpectrumPalette | ( | const color_util::ColorHSVA24 & | color_a, |
const color_util::ColorHSVA24 & | color_b, | ||
bool | transparent_minimum = true |
||
) |
Constructor for a blend of colors from color_a to color_b.
color_a | Color used for low values |
color_b | Color used for high values |
transparent_minimum | Whether the lowest value should be completely transparent |
Definition at line 52 of file spectrum_palette.cpp.
|
overridevirtual |
The actual definition of the colors.
Implements robot_nav_rviz_plugins::NavGridPalette.
Definition at line 67 of file spectrum_palette.cpp.
|
overridevirtual |
See if the palette has any transparent colors.
Can be overridden by implementing classes to save iterations
Reimplemented from robot_nav_rviz_plugins::NavGridPalette.
Definition at line 62 of file spectrum_palette.cpp.
|
protected |
Definition at line 76 of file spectrum_palette.h.
|
protected |
Definition at line 76 of file spectrum_palette.h.
|
protected |
Definition at line 77 of file spectrum_palette.h.