// Copyright (c) Charles J. Cliffe // SPDX-License-Identifier: GPL-2.0+ #pragma once #include class GradientColor { public: float r, g, b; float w; //should work with both float and double inputs GradientColor(double r_in, double g_in, double b_in) : r((float)r_in), g((float)g_in), b((float)b_in), w(1) { } }; class Gradient { public: Gradient(); void addColor(GradientColor c); void clear(); void addColors(const std::vector& color_list); std::vector &getRed(); std::vector &getGreen(); std::vector &getBlue(); void generate(unsigned int len); ~Gradient(); private: std::vector colors; std::vector r_val; std::vector g_val; std::vector b_val; };