#include "../parser/toml_parser.hpp"
#include <ftxui/screen/color.hpp>
#include <iostream>
#include <regex>
#include <string>
#include <unordered_map>
Go to the source code of this file.
|
enum class | TrueColors::Color {
TrueColors::Black
, TrueColors::White
, TrueColors::Red
, TrueColors::LightRed
,
TrueColors::Green
, TrueColors::LightGreen
, TrueColors::Blue
, TrueColors::LightBlue
,
TrueColors::Yellow
, TrueColors::LightYellow
, TrueColors::Cyan
, TrueColors::LightCyan
,
TrueColors::Magenta
, TrueColors::LightMagenta
, TrueColors::Gray
, TrueColors::LightGray
,
TrueColors::DarkGray
, TrueColors::Orange
, TrueColors::LightOrange
, TrueColors::Purple
,
TrueColors::LightPurple
, TrueColors::Pink
, TrueColors::LightPink
, TrueColors::Teal
,
TrueColors::LightTeal
, TrueColors::SkyBlue
, TrueColors::Coral
, TrueColors::Lime
,
TrueColors::Lavender
, TrueColors::Crimson
, TrueColors::Gold
, TrueColors::Indigo
,
TrueColors::Mint
, TrueColors::Navy
, TrueColors::Peach
, TrueColors::Sand
,
TrueColors::SeaGreen
, TrueColors::LightSeaGreen
, TrueColors::SlateBlue
, TrueColors::LightSlateBlue
,
TrueColors::SunsetOrange
, TrueColors::Turquoise
, TrueColors::LightTurquoise
} |
| Enumeration for predefined true colors. More...
|
|
|
auto | TrueColors::GetColor (Color color) -> ftxui::Color |
| Maps a predefined color enum to its corresponding ftxui::Color::RGB value.
|
|
auto | parseHexColor (const std::string &hex) -> ftxui::Color |
| Parses a hexadecimal color string into an ftxui::Color::RGB value.
|
|
auto | parseColor (const std::string &color_name, const std::string &color_field, bool verbose_logging) -> ftxui::Color |
| Parses a color name or hex value into an ftxui::Color.
|
|
auto | parseColors () -> InLimboColors |
| Parses colors from a TOML configuration into an InLimboColors struct.
|
|
◆ parseColor()
auto parseColor |
( |
const std::string & | color_name, |
|
|
const std::string & | color_field, |
|
|
bool | verbose_logging ) -> ftxui::Color
|
Parses a color name or hex value into an ftxui::Color.
- Parameters
-
color_name | The name or hexadecimal representation of the color. |
- Returns
- ftxui::Color The corresponding RGB color.
- Exceptions
-
std::exit | on invalid or unsupported colors. |
< Exit the program on invalid keybind
◆ parseColors()
◆ parseHexColor()
auto parseHexColor |
( |
const std::string & | hex | ) |
-> ftxui::Color
|
Parses a hexadecimal color string into an ftxui::Color::RGB value.
- Parameters
-
hex | The hexadecimal color string in the format #RRGGBB . |
- Returns
- ftxui::Color The corresponding RGB color.
- Exceptions
-
std::exit | on invalid format. |