FTXUI 6.1.9
C++ functional terminal UI.
Loading...
Searching...
No Matches
color_truecolor_HSV.cpp
Go to the documentation of this file.
1// Copyright 2020 Arthur Sonzogni. All rights reserved.
2// このソースコードの使用は、LICENSE ファイルに記載されている MIT ライセンスに従います。
3#include <ftxui/dom/elements.hpp> // for operator|, Elements, Fit, bgcolor, color, hbox, text, vbox, Element
4#include <ftxui/screen/screen.hpp> // for Full, Screen
5#include <memory> // for allocator
6#include <utility> // for move
7
8#include "ftxui/dom/node.hpp" // for Render
9#include "ftxui/screen/color.hpp" // for Color, ftxui
10
11int main() {
12 using namespace ftxui;
13
14 int saturation = 255;
15 Elements array;
16 for (int value = 0; value < 255; value += 20) {
17 Elements line;
18 for (int hue = 0; hue < 255; hue += 2) {
19 line.push_back(text("▀") //
20 | color(Color::HSV(hue, saturation, value)) //
21 | bgcolor(Color::HSV(hue, saturation, value + 10)));
22 }
23 array.push_back(hbox(std::move(line)));
24 }
25
26 auto document = vbox(std::move(array));
27
28 auto screen = Screen::Create(Dimension::Full(), Dimension::Fit(document));
29 Render(screen, document);
30
31 screen.Print();
32
33 return 0;
34}
int main()
FTXUI ftxui:: 名前空間
Definition animation.hpp:9
std::vector< Element > Elements
Definition elements.hpp:22