4#ifndef FTXUI_SCREEN_COLOR_HPP
5#define FTXUI_SCREEN_COLOR_HPP
23class FTXUI_EXPORT(SCREEN) Color {
31 Color(Palette1 index);
32 Color(Palette16 index);
33 Color(Palette256 index);
35 Color(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha = 255);
36 static Color RGB(uint8_t red, uint8_t green, uint8_t blue);
37 static Color HSV(uint8_t hue, uint8_t saturation, uint8_t value);
38 static Color RGBA(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha);
39 static Color HSVA(uint8_t hue,
43 static Color Interpolate(
float t,
const Color& a,
const Color& b);
44 static Color Blend(
const Color& lhs,
const Color& rhs);
101 DarkOliveGreen1 = 191,
102 DarkOliveGreen1Bis = 192,
103 DarkOliveGreen2 = 155,
104 DarkOliveGreen3 = 107,
105 DarkOliveGreen3Bis = 113,
106 DarkOliveGreen3Ter = 149,
109 DarkOrange3Bis = 166,
114 DarkSeaGreen1Bis = 193,
116 DarkSeaGreen2Bis = 157,
118 DarkSeaGreen3Bis = 150,
120 DarkSeaGreen4Bis = 71,
121 DarkSlateGray1 = 123,
123 DarkSlateGray3 = 116,
138 DeepSkyBlue3Bis = 32,
140 DeepSkyBlue4Bis = 24,
141 DeepSkyBlue4Ter = 25,
199 LightGoldenrod1 = 227,
200 LightGoldenrod2 = 186,
201 LightGoldenrod2Bis = 221,
202 LightGoldenrod2Ter = 222,
203 LightGoldenrod3 = 179,
211 LightSalmon3Bis = 173,
215 LightSkyBlue3Bis = 110,
216 LightSlateBlue = 105,
217 LightSlateGrey = 103,
218 LightSteelBlue = 147,
219 LightSteelBlue1 = 189,
220 LightSteelBlue3 = 146,
230 MediumOrchid1Bis = 207,
235 MediumPurple2Bis = 140,
237 MediumPurple3Bis = 98,
239 MediumSpringGreen = 49,
240 MediumTurquoise = 80,
241 MediumVioletRed = 126,
259 PaleTurquoise1 = 159,
261 PaleVioletRed1 = 211,
292 SpringGreen2Bis = 47,
294 SpringGreen3Bis = 41,
318 bool operator==(
const Color& rhs)
const;
319 bool operator!=(
const Color& rhs)
const;
321 std::string Print(
bool is_background_color)
const;
322 void PrintTo(std::string& out,
bool is_background_color)
const;
323 bool IsOpaque()
const {
return alpha_ == 255; }
326 enum class ColorType : uint8_t {
332 ColorType type_ = ColorType::Palette1;
343FTXUI_EXPORT(SCREEN) Color
operator""_rgb(
unsigned long long int combined);
#define FTXUI_EXPORT(component)
L'espace de noms FTXUI ftxui::
L'espace de noms ftxui::literals:: de FTXUI.