Download the PHP package travail/term-ansicolor without Composer
On this page you can find all versions of the php package travail/term-ansicolor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package term-ansicolor
\Term\ANSIColor
NAME
\Term\ANSIColor - Color screen output using ANSI escape sequences.
SYNOPSIS
INSTALLATION
To install this package into your project via composer, add the following snippet to your composer.json
. Then run composer install
.
If you want to install from github, add the following:
METHODS
colored
string colored(string $text, string $foreground_color, string $background_color, string $attribute)
Returns a colored text, or Exception
if passed non-existent $foreground_color
, $background_color
or $attribute
.
setAlias
array setAlias(string $alias, string $foreground_color, string $background_color, string $attribute)
Sets an alias for the standard color and attribute.
getAlias
array getAlias([string $alais = ''])
Returns an available alias as an array if $alias
passed, all of alias if $alias
not passed, or Exception
if non-existent $alias
passed.
getForegourndColors
array getForegroundColors(void)
Returns the defined foreground colors as array.
getBackgroundColors
array getBackgroundColors(void)
Returns the defined background colors as array.
getAttributes
array getAttributes(void)
Returns the defined attributes as array.
AUTHOR
travail
LICENSE
This library is free software. You can redistribute it and/or modify it under the same terms as PHP itself.