Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add RESET_BACKGROUND and RESET_FOREGROUND #163

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/Themes/TerminalStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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;
}
}
Loading