45 bool transparent_minimum)
46 : transparent_minimum_(transparent_minimum)
54 bool transparent_minimum)
69 std::vector<color_util::ColorRGBA24> colors(
NUM_COLORS);
85 for (
unsigned int i = start; i <
NUM_COLORS; i++)
87 double ratio =
static_cast<double>(i - start) / denominator;
bool hasTransparency() const override
See if the palette has any transparent colors.
color_util::ColorHSVA changeColorspace(const color_util::ColorRGBA &rgba)
color_util::ColorHSVA hueBlendPlus(const color_util::ColorHSVA &color_a, const color_util::ColorHSVA &color_b, double ratio)
color_util::ColorHSVA color_a_
static const unsigned int NUM_COLORS
Several reusable pieces for displaying polygons.
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.
bool transparent_minimum_
color_util::ColorRGBA24 toInt(const color_util::ColorRGBA &float_color)
float toFloat(unsigned char n)
std::vector< color_util::ColorRGBA24 > getColors() const override
The actual definition of the colors.
color_util::ColorHSVA color_b_