https://github.com/jfcherng/php-color-output
Make your PHP command-line application colorful.
https://github.com/jfcherng/php-color-output
ansi-colors color command-line php-71 psr-1 psr-12 psr-4 str-color
Last synced: 3 months ago
JSON representation
Make your PHP command-line application colorful.
- Host: GitHub
- URL: https://github.com/jfcherng/php-color-output
- Owner: jfcherng
- License: mit
- Created: 2018-03-24T22:11:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-01T12:15:06.000Z (almost 2 years ago)
- Last Synced: 2025-04-09T20:04:06.859Z (3 months ago)
- Topics: ansi-colors, color, command-line, php-71, psr-1, psr-12, psr-4, str-color
- Language: PHP
- Homepage: https://packagist.org/packages/jfcherng/php-color-output
- Size: 129 KB
- Stars: 14
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# php-color-output
[](https://github.com/jfcherng/php-color-output/actions)
[](https://packagist.org/packages/jfcherng/php-color-output)
[](https://packagist.org/packages/jfcherng/php-color-output)
[](https://github.com/jfcherng/php-color-output/blob/master/LICENSE)
[](https://github.com/jfcherng/php-color-output/stargazers)
[](https://www.paypal.me/jfcherng/5usd)
The above screenshot is the output of `demo.php`. See the [Example](#example) section.
## Installation
```text
composer require jfcherng/php-color-output
```## Available Styles
| Background | Foreground | Compound | Special | Alias |
| --- | --- | --- | --- | --- |
| b_black | f_black | f_dark_gray | blink | b (bold) |
| b_blue | f_blue | f_light_blue | bold | blk (blink) |
| b_cyan | f_brown | f_light_cyan | dim | h (hidden) |
| b_green | f_cyan | f_light_green | hidden | rev (reverse) |
| b_light_gray | f_green | f_light_purple | reset | rst (reset) |
| b_magenta | f_light_gray | f_light_red | reverse | u (underline) |
| b_red | f_normal | f_white | underline | - |
| b_yellow | f_purple | f_yellow | - | - |
| - | f_red | - | - | - |## Functions and Methods
```php