Simple CLI styling helper. Generates ASCII sequences to change console bg/fg-colors and some text effects
echo Styler::get(Styles::HYPERLINK) . 'this looks like a link' . Styler::reset() . "\n";
echo Styler::get([
BackgroundColors::WHITE,
ForegroundColors::BLUE,
TestStyles::UNDERLINE
]) . 'this looks like a link too!' . Styler::reset() . "\n";
Styler::get(array $style)
Returns sequence for given style(-s). Preferred one.
Styler::single($style)
Returns sequence for single given style
Styler::combined(array $styles)
Returns sequence for multiple given styles
Styler::reset()
Returns reset sequence (return to console default colors)
ForegroundColors
- foreground colors listBackgroundColors
- background colors listTextStyles
- list of text styles. Some of them may be not supported by your console!StyleSets
- some useful (sometimes) shortcuts