#include <memory>
#include <utility>
#include <vector>
text("Paleta de 16 colores:"),
separator(),
color(Color::Default, text("Default")),
color(Color::Black, text("Black")),
color(Color::GrayDark, text("GrayDark")),
color(Color::GrayLight, text("GrayLight")),
color(Color::White, text("White")),
color(Color::Blue, text("Blue")),
color(Color::BlueLight, text("BlueLight")),
color(Color::Cyan, text("Cyan")),
color(Color::CyanLight, text("CyanLight")),
color(Color::Green, text("Green")),
color(Color::GreenLight, text("GreenLight")),
color(Color::Magenta, text("Magenta")),
color(Color::MagentaLight, text("MagentaLight")),
color(Color::Red, text("Red")),
color(Color::RedLight, text("RedLight")),
color(Color::Yellow, text("Yellow")),
color(Color::YellowLight, text("YellowLight"))
),
bgcolor(Color::Default, text("Default")),
bgcolor(Color::Black, text("Black")),
bgcolor(Color::GrayDark, text("GrayDark")),
bgcolor(Color::GrayLight, text("GrayLight")),
bgcolor(Color::White, text("White")),
bgcolor(Color::Blue, text("Blue")),
bgcolor(Color::BlueLight, text("BlueLight")),
bgcolor(Color::Cyan, text("Cyan")),
bgcolor(Color::CyanLight, text("CyanLight")),
bgcolor(Color::Green, text("Green")),
bgcolor(Color::GreenLight, text("GreenLight")),
bgcolor(Color::Magenta, text("Magenta")),
bgcolor(Color::MagentaLight, text("MagentaLight")),
bgcolor(Color::Red, text("Red")),
bgcolor(Color::RedLight, text("RedLight")),
bgcolor(Color::Yellow, text("Yellow")),
bgcolor(Color::YellowLight, text("YellowLight"))
)
)
);
{
for (auto& column : info_columns) {
for (auto& it : column) {
column_elements.push_back(
}
}
separator(),
});
}
{
const int max_value = 255;
const int value_increment = 8;
const int hue_increment = 6;
int saturation = max_value;
for (int value = 0; value < max_value; value += 2 * value_increment) {
for (int hue = 0; hue < max_value; hue += hue_increment) {
line.push_back(
text("▀")
| color(Color::HSV(hue, saturation, value))
| bgcolor(Color::HSV(hue, saturation, value + value_increment)));
}
}
separator(),
});
}
auto terminal_info =
Terminal::ColorSupport() >= Terminal::Color::Palette16
? text(" Soporte de paleta de 16 colores : Sí")
: text(" Soporte de paleta de 16 colores : No"),
Terminal::ColorSupport() >= Terminal::Color::Palette256
? text("Soporte de paleta de 256 colores : Sí")
: text("Soporte de paleta de 256 colores : No"),
Terminal::ColorSupport() >= Terminal::Color::TrueColor
? text(" Soporte de color verdadero : Sí")
: text(" Soporte de color verdadero : No"),
}) |
border;
text(" "),
text(" "),
}),
terminal_info});
auto screen = Screen::Create(Dimension::Full(), Dimension::Fit(document));
return 0;
}
std::vector< std::vector< ftxui::ColorInfo > > ColorInfoSorted2D()
Element vbox(Elements children)
Un contenedor que muestra elementos verticalmente uno por uno.
Color es una clase que representa un color en la interfaz de usuario de la terminal.
auto palette_256_color_display
return hbox({ text(std::to_string(int(progress *100))+"% ")|size(WIDTH, EQUAL, 5), gauge(progress), })
El espacio de nombres ftxui:: de FTXUI.
std::vector< Element > Elements