inLimbo
TUI Music Player that keeps you in Limbo.
 
Loading...
Searching...
No Matches
colors.hpp File Reference
#include <cstdint>
#include <ftxui/screen/color.hpp>
#include <iomanip>
#include <iostream>
#include <regex>
#include <string>
#include <unordered_map>

Go to the source code of this file.

Classes

struct  InLimboColors
 Represents a collection of colors used in the application. More...
 

Namespaces

namespace  TrueColors
 

Enumerations

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...
 

Functions

ftxui::Color TrueColors::GetColor (Color color)
 Maps a predefined color enum to its corresponding ftxui::Color::RGB value.
 
ftxui::Color parseHexColor (const std::string &hex)
 Parses a hexadecimal color string into an ftxui::Color::RGB value.
 
ftxui::Color parseColor (const std::string &color_name)
 Parses a color name or hex value into an ftxui::Color.
 
InLimboColors parseColors ()
 Parses colors from a TOML configuration into an InLimboColors struct.
 

Function Documentation

◆ parseColor()

ftxui::Color parseColor ( const std::string & color_name)

Parses a color name or hex value into an ftxui::Color.

Parameters
color_nameThe name or hexadecimal representation of the color.
Returns
ftxui::Color The corresponding RGB color.
Exceptions
std::exiton invalid or unsupported colors.

◆ parseColors()

InLimboColors parseColors ( )

Parses colors from a TOML configuration into an InLimboColors struct.

Returns
InLimboColors The populated color configuration.

◆ parseHexColor()

ftxui::Color parseHexColor ( const std::string & hex)

Parses a hexadecimal color string into an ftxui::Color::RGB value.

Parameters
hexThe hexadecimal color string in the format #RRGGBB.
Returns
ftxui::Color The corresponding RGB color.
Exceptions
std::exiton invalid format.