From f3940e55ed047fd503a904874cb859f77766a822 Mon Sep 17 00:00:00 2001 From: Enzo Innocenzi Date: Thu, 14 Nov 2024 00:21:18 +0100 Subject: [PATCH] feat: add `RESET_BACKGROUND` and `RESET_FOREGROUND` --- src/Themes/TerminalStyle.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Themes/TerminalStyle.php b/src/Themes/TerminalStyle.php index 7336801..48b70ca 100644 --- a/src/Themes/TerminalStyle.php +++ b/src/Themes/TerminalStyle.php @@ -10,11 +10,13 @@ enum TerminalStyle: string case RESET = "0m"; case RESET_INTENSITY = "22m"; case RESET_ITALIC = "23m"; - case VISIBLE = "28m"; case RESET_UNDERLINE = "24m"; case RESET_OVERLINE = "55m"; case RESET_STRIKETHROUGH = "29m"; - case NON_REVERSE_TEXT = "27m"; + case RESET_REVERSE_TEXT = "27m"; + case RESET_BACKGROUND = "49m"; + case RESET_FOREGROUND = "39m"; + case VISIBLE = "28m"; case FG_BLACK = "30m"; case FG_DARK_RED = "31m"; @@ -266,6 +268,6 @@ public static function STRIKETHROUGH(string $text = ''): string public static function REVERSE_TEXT(string $text = ''): string { - return self::ESC->value . self::REVERSE_TEXT->value . $text . self::ESC->value . self::NON_REVERSE_TEXT->value; + return self::ESC->value . self::REVERSE_TEXT->value . $text . self::ESC->value . self::RESET_REVERSE_TEXT->value; } }