Skip to content

Commit

Permalink
feat: add missing terminal styles
Browse files Browse the repository at this point in the history
  • Loading branch information
innocenzi committed Nov 8, 2024
1 parent 00ef935 commit 38cec0b
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions src/Themes/TerminalStyle.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,19 @@ enum TerminalStyle: string
case BG_WHITE = "107m";

case BOLD = "1m";
case NO_BOLD = "22m";
case DIM = "2m";
case NO_DIM = "22m";
case ITALIC = "3m";
case NO_ITALIC = "23m";
case UNDERLINE = "4m";
case NO_UNDERLINE = "24m";
case OVERLINE = "53m";
case NO_OVERLINE = "55m";
case HIDDEN = "8m";
case NO_HIDDEN = "28m";
case STRIKETHROUGH = "9m";
case NO_STRIKETHROUGH = "29m";
case REVERSE_TEXT = "7m";
case NON_REVERSE_TEXT = "27m";

Expand Down Expand Up @@ -219,6 +230,31 @@ public static function BOLD(string $text = ''): string
return self::ESC->value . self::BOLD->value . $text . self::ESC->value . self::RESET->value;
}

public static function NO_BOLD(string $text = ''): string
{
return self::ESC->value . self::NO_BOLD->value . $text . self::ESC->value . self::RESET->value;
}

public static function DIM(string $text = ''): string
{
return self::ESC->value . self::DIM->value . $text . self::ESC->value . self::RESET->value;
}

public static function NO_DIM(string $text = ''): string
{
return self::ESC->value . self::NO_DIM->value . $text . self::ESC->value . self::RESET->value;
}

public static function ITALIC(string $text = ''): string
{
return self::ESC->value . self::ITALIC->value . $text . self::ESC->value . self::RESET->value;
}

public static function NO_ITALIC(string $text = ''): string
{
return self::ESC->value . self::NO_ITALIC->value . $text . self::ESC->value . self::RESET->value;
}

public static function UNDERLINE(string $text = ''): string
{
return self::ESC->value . self::UNDERLINE->value . $text . self::ESC->value . self::RESET->value;
Expand All @@ -229,6 +265,36 @@ public static function NO_UNDERLINE(string $text = ''): string
return self::ESC->value . self::NO_UNDERLINE->value . $text . self::ESC->value . self::RESET->value;
}

public static function OVERLINE(string $text = ''): string
{
return self::ESC->value . self::OVERLINE->value . $text . self::ESC->value . self::RESET->value;
}

public static function NO_OVERLINE(string $text = ''): string
{
return self::ESC->value . self::NO_OVERLINE->value . $text . self::ESC->value . self::RESET->value;
}

public static function HIDDEN(string $text = ''): string
{
return self::ESC->value . self::HIDDEN->value . $text . self::ESC->value . self::RESET->value;
}

public static function NO_HIDDEN(string $text = ''): string
{
return self::ESC->value . self::NO_HIDDEN->value . $text . self::ESC->value . self::RESET->value;
}

public static function STRIKETHROUGH(string $text = ''): string
{
return self::ESC->value . self::STRIKETHROUGH->value . $text . self::ESC->value . self::RESET->value;
}

public static function NO_STRIKETHROUGH(string $text = ''): string
{
return self::ESC->value . self::NO_STRIKETHROUGH->value . $text . self::ESC->value . self::RESET->value;
}

public static function REVERSE_TEXT(string $text = ''): string
{
return self::ESC->value . self::REVERSE_TEXT->value . $text . self::ESC->value . self::RESET->value;
Expand Down

0 comments on commit 38cec0b

Please sign in to comment.