Add class MDConsoleColors for styling constants
This commit is contained in:
parent
fc8fb9b3dd
commit
104d86a762
48
src/MDConsoleColors.php
Normal file
48
src/MDConsoleColors.php
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<?PHP
|
||||||
|
/**
|
||||||
|
* Constants for styling console outputs.
|
||||||
|
*
|
||||||
|
* @author Joshua Ramon Enslin <joshua@museum-digital.de>
|
||||||
|
*/
|
||||||
|
declare(strict_types = 1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constants for styling console outputs.
|
||||||
|
*/
|
||||||
|
final class MDConsoleColors {
|
||||||
|
|
||||||
|
public const ESC = "\033";
|
||||||
|
public const BLINK_ON = self::ESC . '[5m';
|
||||||
|
public const BOLD_ON = self::ESC . '[1m';
|
||||||
|
public const DIM_ON = self::ESC . '[2m';
|
||||||
|
public const REVERSE_ON = self::ESC . '[7m';
|
||||||
|
public const ITALIC_ON = self::ESC . '[3m';
|
||||||
|
public const ITALIC_OFF = self::ESC . '[23m';
|
||||||
|
public const HIGHLIGHT_ON = self::ESC . '[7m';
|
||||||
|
public const HIGHLIGHT_OFF = self::ESC . '[27m';
|
||||||
|
public const UNDERLINE_ON = self::ESC . '[4m';
|
||||||
|
public const UNDERLINE_OFF = self::ESC . '[24m';
|
||||||
|
public const RESET_STYLE = self::ESC . '(B' . self::ESC . '[m';
|
||||||
|
|
||||||
|
public const FG_BLACK = self::ESC . '[30m';
|
||||||
|
public const FG_RED = self::ESC . '[31m';
|
||||||
|
public const FG_GREEN = self::ESC . '[32m';
|
||||||
|
public const FG_YELLOW = self::ESC . '[33m';
|
||||||
|
public const FG_BLUE = self::ESC . '[34m';
|
||||||
|
public const FG_MAGENTA = self::ESC . '[35m';
|
||||||
|
public const FG_AQUA = self::ESC . '[36m';
|
||||||
|
public const FG_GREY = self::ESC . '[37m';
|
||||||
|
|
||||||
|
public const BG_BLACK = self::ESC . '[40m';
|
||||||
|
public const BG_RED = self::ESC . '[41m';
|
||||||
|
public const BG_GREEN = self::ESC . '[42m';
|
||||||
|
public const BG_YELLOW = self::ESC . '[43m';
|
||||||
|
public const BG_BLUE = self::ESC . '[44m';
|
||||||
|
public const BG_MAGENTA = self::ESC . '[45m';
|
||||||
|
public const BG_AQUA = self::ESC . '[46m';
|
||||||
|
public const BG_GREY = self::ESC . '[47m';
|
||||||
|
|
||||||
|
public const COLOR_OFF = self::ESC . '[0m';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user