trait Colors

Methods

string
reset(string $text)

Reset all colors and styles.

string
bold(string $text)

Make the text bold.

string
dim(string $text)

Make the text dim.

string
italic(string $text)

Make the text italic.

string
underline(string $text)

Underline the text.

string
inverse(string $text)

Invert the text and background colors.

string
hidden(string $text)

Hide the text.

string
strikethrough(string $text)

Strike through the text.

string
black(string $text)

Set the text color to black.

string
red(string $text)

Set the text color to red.

string
green(string $text)

Set the text color to green.

string
yellow(string $text)

Set the text color to yellow.

string
blue(string $text)

Set the text color to blue.

string
magenta(string $text)

Set the text color to magenta.

string
cyan(string $text)

Set the text color to cyan.

string
white(string $text)

Set the text color to white.

string
bgBlack(string $text)

Set the text background to black.

string
bgRed(string $text)

Set the text background to red.

string
bgGreen(string $text)

Set the text background to green.

string
bgYellow(string $text)

Set the text background to yellow.

string
bgBlue(string $text)

Set the text background to blue.

string
bgMagenta(string $text)

Set the text background to magenta.

string
bgCyan(string $text)

Set the text background to cyan.

string
bgWhite(string $text)

Set the text background to white.

string
gray(string $text)

Set the text color to gray.

Details

at line 12
string reset(string $text)

Reset all colors and styles.

Parameters

string $text

Return Value

string

at line 20
string bold(string $text)

Make the text bold.

Parameters

string $text

Return Value

string

at line 28
string dim(string $text)

Make the text dim.

Parameters

string $text

Return Value

string

at line 36
string italic(string $text)

Make the text italic.

Parameters

string $text

Return Value

string

at line 44
string underline(string $text)

Underline the text.

Parameters

string $text

Return Value

string

at line 52
string inverse(string $text)

Invert the text and background colors.

Parameters

string $text

Return Value

string

at line 60
string hidden(string $text)

Hide the text.

Parameters

string $text

Return Value

string

at line 68
string strikethrough(string $text)

Strike through the text.

Parameters

string $text

Return Value

string

at line 76
string black(string $text)

Set the text color to black.

Parameters

string $text

Return Value

string

at line 84
string red(string $text)

Set the text color to red.

Parameters

string $text

Return Value

string

at line 92
string green(string $text)

Set the text color to green.

Parameters

string $text

Return Value

string

at line 100
string yellow(string $text)

Set the text color to yellow.

Parameters

string $text

Return Value

string

at line 108
string blue(string $text)

Set the text color to blue.

Parameters

string $text

Return Value

string

at line 116
string magenta(string $text)

Set the text color to magenta.

Parameters

string $text

Return Value

string

at line 124
string cyan(string $text)

Set the text color to cyan.

Parameters

string $text

Return Value

string

at line 132
string white(string $text)

Set the text color to white.

Parameters

string $text

Return Value

string

at line 140
string bgBlack(string $text)

Set the text background to black.

Parameters

string $text

Return Value

string

at line 148
string bgRed(string $text)

Set the text background to red.

Parameters

string $text

Return Value

string

at line 156
string bgGreen(string $text)

Set the text background to green.

Parameters

string $text

Return Value

string

at line 164
string bgYellow(string $text)

Set the text background to yellow.

Parameters

string $text

Return Value

string

at line 172
string bgBlue(string $text)

Set the text background to blue.

Parameters

string $text

Return Value

string

at line 180
string bgMagenta(string $text)

Set the text background to magenta.

Parameters

string $text

Return Value

string

at line 188
string bgCyan(string $text)

Set the text background to cyan.

Parameters

string $text

Return Value

string

at line 196
string bgWhite(string $text)

Set the text background to white.

Parameters

string $text

Return Value

string

at line 204
string gray(string $text)

Set the text color to gray.

Parameters

string $text

Return Value

string