A handy set of Stringable mixins for CLI text.
jbrooksuk/laravel-colorize is a Laravel package for a handy set of stringable mixins for cli text..
It currently has 49 GitHub stars and 6 downloads on Packagist (latest version v0.1.0).
Install it with composer require jbrooksuk/laravel-colorize.
Discover more Laravel packages by jbrooksuk
or browse all Laravel packages to compare alternatives.
Last updated
A mixin for Laravel's Stringable to easily apply colors and styles to CLI text.
You can install the package via Composer:
composer require jbrooksuk/laravel-colorize
blinkMake the text blink.
Str::of('Hey Laravel')->blink();
boldMake the text bold.
Str::of('Hey Laravel')->bold();
colorizeColorize the text. Foreground, Background.
Str::of('Hey Laravel')->colorize('red', 'blue');
concealMake the text invisible.
Str::of('Hey Laravel')->conceal();
reverseSwap the foreground with the background and the background with the foreground.
Str::of('Hey Laravel')->colorize('red', 'blue')->reverse();
underscoreMake the text underscored.
Str::of('Hey Laravel')->underscore();
Because Laravel Colorize uses Stringable, all of these methods can be chained together.
Str::of('Hey Laravel')->colorize('red', 'yellow')->bold()->blink();