Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 4 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 (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-09-01T12:15:06.000Z (over 1 year ago)
- Last Synced: 2024-09-29T19:41:47.788Z (4 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: 12
- Watchers: 3
- Forks: 3
- 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
[![GitHub Workflow Status (branch)](https://img.shields.io/github/actions/workflow/status/jfcherng/php-color-output/php.yml?branch=master&style=flat-square)](https://github.com/jfcherng/php-color-output/actions)
[![Packagist](https://img.shields.io/packagist/dt/jfcherng/php-color-output?style=flat-square)](https://packagist.org/packages/jfcherng/php-color-output)
[![Packagist Version](https://img.shields.io/packagist/v/jfcherng/php-color-output?style=flat-square)](https://packagist.org/packages/jfcherng/php-color-output)
[![Project license](https://img.shields.io/github/license/jfcherng/php-color-output?style=flat-square)](https://github.com/jfcherng/php-color-output/blob/master/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/jfcherng/php-color-output?style=flat-square&logo=github)](https://github.com/jfcherng/php-color-output/stargazers)
[![Donate to this project using Paypal](https://img.shields.io/badge/paypal-donate-blue.svg?style=flat-square&logo=paypal)](https://www.paypal.me/jfcherng/5usd)![demo.gif](https://github.com/jfcherng/php-color-output/blob/gh-pages/images/demo.gif?raw=true)
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