Skip to content

Commit ef92ffe

Browse files
authored
Merge pull request #163 from innocenzi/feat/more-resets
feat: add `RESET_BACKGROUND` and `RESET_FOREGROUND`
2 parents 2f19fab + f3940e5 commit ef92ffe

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Themes/TerminalStyle.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ enum TerminalStyle: string
1010
case RESET = "0m";
1111
case RESET_INTENSITY = "22m";
1212
case RESET_ITALIC = "23m";
13-
case VISIBLE = "28m";
1413
case RESET_UNDERLINE = "24m";
1514
case RESET_OVERLINE = "55m";
1615
case RESET_STRIKETHROUGH = "29m";
17-
case NON_REVERSE_TEXT = "27m";
16+
case RESET_REVERSE_TEXT = "27m";
17+
case RESET_BACKGROUND = "49m";
18+
case RESET_FOREGROUND = "39m";
19+
case VISIBLE = "28m";
1820

1921
case FG_BLACK = "30m";
2022
case FG_DARK_RED = "31m";
@@ -266,6 +268,6 @@ public static function STRIKETHROUGH(string $text = ''): string
266268

267269
public static function REVERSE_TEXT(string $text = ''): string
268270
{
269-
return self::ESC->value . self::REVERSE_TEXT->value . $text . self::ESC->value . self::NON_REVERSE_TEXT->value;
271+
return self::ESC->value . self::REVERSE_TEXT->value . $text . self::ESC->value . self::RESET_REVERSE_TEXT->value;
270272
}
271273
}

0 commit comments

Comments
 (0)