4 #ifndef FTXUI_SCREEN_COLOR_HPP
5 #define FTXUI_SCREEN_COLOR_HPP
32 Color(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha = 255);
33 static Color RGB(uint8_t red, uint8_t green, uint8_t blue);
34 static Color HSV(uint8_t hue, uint8_t saturation, uint8_t value);
35 static Color RGBA(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha);
318 std::string
Print(
bool is_background_color)
const;
322 enum class ColorType : uint8_t {
328 ColorType type_ = ColorType::Palette1;
335 inline namespace literals {
339 Color operator""_rgb(
unsigned long long int combined);
A class representing terminal colors.
enum Palette1 uint8_t enum Palette16 uint8_t enum Palette256 uint8_t Color()
Build a transparent color.
static Color HSV(uint8_t hue, uint8_t saturation, uint8_t value)
Build a Color from its HSV representation. https://en.wikipedia.org/wiki/HSL_and_HSV.
static Color RGBA(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha)
Build a Color from its RGBA representation. https://en.wikipedia.org/wiki/RGB_color_model.
static Color Blend(const Color &lhs, const Color &rhs)
Blend two colors together using the alpha channel.
bool operator!=(const Color &rhs) const
bool operator==(const Color &rhs) const
static Color RGB(uint8_t red, uint8_t green, uint8_t blue)
Build a Color from its RGB representation. https://en.wikipedia.org/wiki/RGB_color_model.
std::string Print(bool is_background_color) const
static Color Interpolate(float t, const Color &a, const Color &b)
static Color HSVA(uint8_t hue, uint8_t saturation, uint8_t value, uint8_t alpha)
Build a Color from its HSV representation. https://en.wikipedia.org/wiki/HSL_and_HSV.