4#ifndef FTXUI_SCREEN_COLOR_HPP
5#define FTXUI_SCREEN_COLOR_HPP
24class FTXUI_EXPORT(SCREEN) Color {
32 Color(Palette1 index);
33 Color(Palette16 index);
34 Color(Palette256 index);
36 Color(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha = 255);
37 static Color RGB(uint8_t red, uint8_t green, uint8_t blue);
38 static Color HSV(uint8_t hue, uint8_t saturation, uint8_t value);
39 static Color RGBA(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha);
40 static Color HSVA(uint8_t hue,
44 static Color Interpolate(
float t,
const Color& a,
const Color& b);
45 static Color Blend(
const Color& lhs,
const Color& rhs);
102 DarkOliveGreen1 = 191,
103 DarkOliveGreen1Bis = 192,
104 DarkOliveGreen2 = 155,
105 DarkOliveGreen3 = 107,
106 DarkOliveGreen3Bis = 113,
107 DarkOliveGreen3Ter = 149,
110 DarkOrange3Bis = 166,
115 DarkSeaGreen1Bis = 193,
117 DarkSeaGreen2Bis = 157,
119 DarkSeaGreen3Bis = 150,
121 DarkSeaGreen4Bis = 71,
122 DarkSlateGray1 = 123,
124 DarkSlateGray3 = 116,
139 DeepSkyBlue3Bis = 32,
141 DeepSkyBlue4Bis = 24,
142 DeepSkyBlue4Ter = 25,
200 LightGoldenrod1 = 227,
201 LightGoldenrod2 = 186,
202 LightGoldenrod2Bis = 221,
203 LightGoldenrod2Ter = 222,
204 LightGoldenrod3 = 179,
212 LightSalmon3Bis = 173,
216 LightSkyBlue3Bis = 110,
217 LightSlateBlue = 105,
218 LightSlateGrey = 103,
219 LightSteelBlue = 147,
220 LightSteelBlue1 = 189,
221 LightSteelBlue3 = 146,
231 MediumOrchid1Bis = 207,
236 MediumPurple2Bis = 140,
238 MediumPurple3Bis = 98,
240 MediumSpringGreen = 49,
241 MediumTurquoise = 80,
242 MediumVioletRed = 126,
260 PaleTurquoise1 = 159,
262 PaleVioletRed1 = 211,
293 SpringGreen2Bis = 47,
295 SpringGreen3Bis = 41,
319 bool operator==(
const Color& rhs)
const;
320 bool operator!=(
const Color& rhs)
const;
322 std::string Print(
bool is_background_color)
const;
323 void PrintTo(std::string& out,
bool is_background_color)
const;
324 bool IsOpaque()
const {
return alpha_ == 255; }
327 enum class ColorType : uint8_t {
333 ColorType type_ = ColorType::Palette1;
344FTXUI_EXPORT(SCREEN) Color
operator""_rgb(
unsigned long long int combined);
#define FTXUI_EXPORT(component)
The FTXUI ftxui:: namespace.
The FTXUI ftxui::literals:: namespace.