FTXUI 7.0.3
C++ functional terminal UI.
Loading...
Searching...
No Matches
color_info.hpp
Go to the documentation of this file.
1// Copyright 2020 Arthur Sonzogni. All rights reserved.
2// Use of this source code is governed by the MIT license that can be found in
3// the LICENSE file.
4#ifndef FTXUI_SCREEN_COLOR_INFO_HPP
5#define FTXUI_SCREEN_COLOR_INFO_HPP
6
7#include <cstdint>
8#include <vector>
9
11#include <ftxui/util/export.hpp>
12
13namespace ftxui {
14
15/// @brief ColorInfoは、ターミナルのカラーパレットに関する情報を含む構造体です。
16///
17/// @ingroup screen
18struct FTXUI_EXPORT(SCREEN) ColorInfo {
19 const char* name;
20 uint8_t index_256;
21 uint8_t index_16;
22 uint8_t red;
23 uint8_t green;
24 uint8_t blue;
25 uint8_t hue;
26 uint8_t saturation;
27 uint8_t value;
28};
29
30FTXUI_EXPORT(SCREEN) ColorInfo GetColorInfo(Color::Palette256 index);
31FTXUI_EXPORT(SCREEN) ColorInfo GetColorInfo(Color::Palette16 index);
32
33/// @brief 2Dでソートされたpalette256の色情報を取得します。
34/// @return ColorInfoの2Dベクター。
35/// @ingroup screen
36FTXUI_EXPORT(SCREEN) std::vector<std::vector<ColorInfo>> ColorInfoSorted2D();
37
38} // namespace ftxui
39
40#endif // FTXUI_SCREEN_COLOR_INFO_HPP
#define FTXUI_EXPORT(component)
Definition export.hpp:25
FTXUI ftxui::名前空間
Definition animation.hpp:11
int value
Definition elements.hpp:192