Class ColorGradient
Defined in File ColorGradient.hpp
Class Documentation
-
class ColorGradient
Public Types
Public Functions
-
inline ColorGradient(size_t buckets = 256)
Constructs a color gradient with the given number of buckets.
- Parameters:
buckets – Number of colors in current gradient. Default is 256.
-
virtual ~ColorGradient() = default
Destructor.
-
void getColor(RGBFColor &color, size_t bucket, GradientType gradient = ColorGradient::GREY) const
Returns three float values to represent the color of the given bucket.
- Parameters:
color – The three color components
bucket – The bucket index
gradient – The type of gradient (default grey)
-
void getColor(RGB8Color &color, size_t bucket, GradientType gradient = ColorGradient::GREY) const
Returns three uint8_t values to represent the color of the given bucket.
- Parameters:
color – The three color components
bucket – The bucket index
gradient – The type of gradient (default grey)
Public Static Functions
-
static GradientType gradientFromString(const std::string &string)
Gets a gradient type from given string.
-
inline ColorGradient(size_t buckets = 256)