2019-11-06 16:11:38 -05:00
|
|
|
<?php declare(strict_types=1);
|
|
|
|
|
2019-11-08 16:27:08 -05:00
|
|
|
namespace Aviat\Kilo\Enum;
|
2019-11-06 16:11:38 -05:00
|
|
|
|
2019-11-19 15:57:51 -05:00
|
|
|
use Aviat\Kilo\Traits;
|
|
|
|
|
2019-11-06 16:11:38 -05:00
|
|
|
/**
|
|
|
|
* ANSI Color escape sequences
|
2021-03-04 12:03:51 -05:00
|
|
|
* @enum
|
2019-11-06 16:11:38 -05:00
|
|
|
*/
|
2021-12-03 11:45:40 -05:00
|
|
|
enum Color: int {
|
2019-11-19 15:57:51 -05:00
|
|
|
use Traits\ConstList;
|
2019-11-19 13:48:12 -05:00
|
|
|
|
2022-08-26 15:44:00 -04:00
|
|
|
// Foreground/Background
|
|
|
|
case Fg = 38;
|
|
|
|
case Bg = 48;
|
|
|
|
|
2019-11-06 16:11:38 -05:00
|
|
|
// Foreground colors
|
2021-12-03 11:45:40 -05:00
|
|
|
case FG_BLACK = 30;
|
|
|
|
case FG_RED = 31;
|
|
|
|
case FG_GREEN = 32;
|
|
|
|
case FG_YELLOW = 33;
|
|
|
|
case FG_BLUE = 34;
|
|
|
|
case FG_MAGENTA = 35;
|
|
|
|
case FG_CYAN = 36;
|
|
|
|
case FG_WHITE = 37;
|
|
|
|
case FG_BRIGHT_BLACK = 90;
|
|
|
|
case FG_BRIGHT_RED = 91;
|
|
|
|
case FG_BRIGHT_GREEN = 92;
|
|
|
|
case FG_BRIGHT_YELLOW = 93;
|
|
|
|
case FG_BRIGHT_BLUE = 94;
|
|
|
|
case FG_BRIGHT_MAGENTA = 95;
|
|
|
|
case FG_BRIGHT_CYAN = 96;
|
|
|
|
case FG_BRIGHT_WHITE = 97;
|
2019-11-06 16:11:38 -05:00
|
|
|
|
|
|
|
// Background colors
|
2021-12-03 11:45:40 -05:00
|
|
|
case BG_BLACK = 40;
|
|
|
|
case BG_RED = 41;
|
|
|
|
case BG_GREEN = 42;
|
|
|
|
case BG_YELLOW = 43;
|
|
|
|
case BG_BLUE = 44;
|
|
|
|
case BG_MAGENTA = 45;
|
|
|
|
case BG_CYAN = 46;
|
|
|
|
case BG_WHITE = 47;
|
|
|
|
case BG_BRIGHT_BLACK = 100;
|
|
|
|
case BG_BRIGHT_RED = 101;
|
|
|
|
case BG_BRIGHT_GREEN = 102;
|
|
|
|
case BG_BRIGHT_YELLOW = 103;
|
|
|
|
case BG_BRIGHT_BLUE = 104;
|
|
|
|
case BG_BRIGHT_MAGENTA = 105;
|
|
|
|
case BG_BRIGHT_CYAN = 106;
|
|
|
|
case BG_BRIGHT_WHITE = 107;
|
2019-11-06 16:11:38 -05:00
|
|
|
|
2021-12-03 11:45:40 -05:00
|
|
|
case INVERT = 7;
|
2019-11-06 16:11:38 -05:00
|
|
|
}
|