https://github.com/gobwas/shellstyle
ShellStyle is a simple php class that allows you to get wrapped Unix/Linux colored output with ANSI escape codes
https://github.com/gobwas/shellstyle
Last synced: about 1 month ago
JSON representation
ShellStyle is a simple php class that allows you to get wrapped Unix/Linux colored output with ANSI escape codes
- Host: GitHub
- URL: https://github.com/gobwas/shellstyle
- Owner: gobwas
- License: other
- Created: 2013-01-08T10:10:15.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-01-08T15:54:17.000Z (over 12 years ago)
- Last Synced: 2025-01-24T09:42:31.298Z (3 months ago)
- Language: PHP
- Size: 113 KB
- Stars: 0
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
README
======ShellStyle
-----------------ShellStyle is a simple php class that allows you to get wrapped Unix/Linux colored output with ANSI escape codes:
Usage
-----------------
Usage of ShellStyle is quite simple:use Gobwas\ShellStyle\ShellStyle;
// First way to define style
$green = new ShellStyle();
$green
->addStyle(ShellStyle::FOREGROUND_GREEN)
->addStyle(ShellStyle::STYLE_BOLD);// Another way to define style
$yellow = new ShellStyle(array(ShellStyle::FOREGROUND_YELLOW));echo $green->parse("Hello");
echo $yellow->parse("World!");