Basic functional color lib now
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <cstdint>
|
||||
#include <format>
|
||||
|
||||
/*
|
||||
struct ansiColor
|
||||
@@ -19,54 +20,45 @@ struct ansiColor
|
||||
|
||||
namespace mcolor::ansiColors
|
||||
{
|
||||
enum class FG_Colors : uint8_t
|
||||
enum class Colors : uint8_t
|
||||
{
|
||||
BLACK = 30,
|
||||
RED,
|
||||
GREEN,
|
||||
YELLOW,
|
||||
BLUE,
|
||||
MAGENTA,
|
||||
CYAN,
|
||||
WHITE,
|
||||
DEFAULT = 39,
|
||||
};
|
||||
|
||||
enum class BG_Colors : uint8_t
|
||||
{
|
||||
BLACK = 40,
|
||||
RED,
|
||||
GREEN,
|
||||
YELLOW,
|
||||
BLUE,
|
||||
MAGENTA,
|
||||
CYAN,
|
||||
WHITE,
|
||||
DEFAULT = 49,
|
||||
};
|
||||
|
||||
enum class FG_Bright_Colors : uint8_t
|
||||
{
|
||||
BLACK = 90,
|
||||
RED,
|
||||
GREEN,
|
||||
YELLOW,
|
||||
BLUE,
|
||||
MAGENTA,
|
||||
CYAN,
|
||||
WHITE,
|
||||
};
|
||||
|
||||
enum class BG_Bright_Colors : uint8_t
|
||||
{
|
||||
BLACK = 100,
|
||||
RED,
|
||||
GREEN,
|
||||
YELLOW,
|
||||
BLUE,
|
||||
MAGENTA,
|
||||
CYAN,
|
||||
WHITE,
|
||||
RESET = 0,
|
||||
BOLD,
|
||||
DIM = 2,
|
||||
FG_BLACK = 30,
|
||||
FG_RED,
|
||||
FG_GREEN,
|
||||
FG_YELLOW,
|
||||
FG_BLUE,
|
||||
FG_MAGENTA,
|
||||
FG_CYAN,
|
||||
FG_WHITE,
|
||||
FG_DEFAULT = 39,
|
||||
BG_BLACK = 40,
|
||||
BG_RED,
|
||||
BG_GREEN,
|
||||
BG_YELLOW,
|
||||
BG_BLUE,
|
||||
BG_MAGENTA,
|
||||
BG_CYAN,
|
||||
BG_WHITE,
|
||||
BG_DEFAULT = 49,
|
||||
FG_BRIGHT_BLACK = 90,
|
||||
FG_BRIGHT_RED,
|
||||
FG_BRIGHT_GREEN,
|
||||
FG_BRIGHT_YELLOW,
|
||||
FG_BRIGHT_BLUE,
|
||||
FG_BRIGHT_MAGENTA,
|
||||
FG_BRIGHT_CYAN,
|
||||
FG_BRIGHT_WHITE = 97,
|
||||
BG_BRIGHT_BLACK = 100,
|
||||
BG_BRIGHT_RED,
|
||||
BG_BRIGHT_GREEN,
|
||||
BG_BRIGHT_YELLOW,
|
||||
BG_BRIGHT_BLUE,
|
||||
BG_BRIGHT_MAGENTA,
|
||||
BG_BRIGHT_CYAN,
|
||||
BG_BRIGHT_WHITE = 107,
|
||||
};
|
||||
}
|
||||
/*
|
||||
@@ -115,15 +107,17 @@ namespace mcolor::ansiColorCodes
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
namespace mcolor::ansiControlCodes
|
||||
{
|
||||
enum class Text_Manip : uint8_t
|
||||
enum class Codes : uint8_t
|
||||
{
|
||||
RESET,
|
||||
BOLD,
|
||||
DIM,
|
||||
};
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
struct ansiControl
|
||||
@@ -204,5 +198,7 @@ namespace mcolor::Colors
|
||||
|
||||
namespace mcolor
|
||||
{
|
||||
std::string toEscapeCode(rgbColor c, bool bg=false);
|
||||
|
||||
std::string toEscapeCode(ansiColors::Colors c);
|
||||
}
|
||||
|
Reference in New Issue
Block a user