Terminal Colors

HILSTER Testing Framework support terminal colors.

Terminal colors are automatically enabled if the terminal supports it.

They can be disabled by setting the environment variable HTF_NO_COLOR to any value.

To print colored text use the methods supplied by htf.termcolors.

Example:

import htf.termcolors as tc

print(tc.yellow("WARNING: this text an error in yellow"))
print(tc.red("ERROR: this text an error in red"))
print(tc.white_on_cyan_bold("HILSTER"))

To see all possible colors call the htf.termcolors.demo() function:

import htf.termcolors as tc

tc.demo()
htf.termcolors.info(text)

Return colored text if supported by terminal using ANSI codes for an information.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.system(text)

Return colored text if supported by terminal using ANSI codes for system message.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.success(text)

Return colored text if supported by terminal using ANSI codes for a success.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.warning(text)

Return colored text if supported by terminal using ANSI codes for a failure.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.failure(text)

Return colored text if supported by terminal using ANSI codes for a failure.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.error(text)

Return colored text if supported by terminal using ANSI codes for an error.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.debug(text)

Return colored text if supported by terminal using ANSI codes for a critical error.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.critical(text)

Return colored text if supported by terminal using ANSI codes for a critical error.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.skipped(text)

Return colored text if supported by terminal using ANSI codes for something skipped.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.demo()

print a color demo.

htf.termcolors.blue(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: None. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: None. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: None. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_cyan(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_cyan’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_cyan_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_cyan’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_cyan_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_cyan’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_cyan_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_cyan’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_green(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_green’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_green_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_green’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_green_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_green’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_green_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_green’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_grey(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_grey’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_grey_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_grey’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_grey_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_grey’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_grey_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_grey’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_magenta(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_magenta’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_magenta_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_magenta’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_magenta_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_magenta’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_magenta_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_magenta’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_red(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_red’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_red_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_red’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_red_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_red’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_red_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_red’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_white(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_white’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_white_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_white’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_white_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_white’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_white_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_white’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_yellow(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_yellow’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_yellow_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_yellow’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_yellow_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_yellow’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_on_yellow_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: ‘on_yellow’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.blue_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘blue’. Background color: None. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: None. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: None. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: None. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: None. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: None. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_blue(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_blue’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_blue_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_blue’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_blue_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_blue’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_blue_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_blue’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_green(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_green’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_green_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_green’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_green_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_green’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_green_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_green’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_grey(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_grey’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_grey_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_grey’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_grey_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_grey’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_grey_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_grey’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_magenta(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_magenta’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_magenta_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_magenta’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_magenta_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_magenta’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_magenta_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_magenta’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_red(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_red’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_red_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_red’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_red_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_red’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_red_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_red’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_white(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_white’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_white_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_white’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_white_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_white’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_white_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_white’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_yellow(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_yellow’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_yellow_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_yellow’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_yellow_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_yellow’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_on_yellow_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: ‘on_yellow’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.cyan_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘cyan’. Background color: None. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.demo()

print a color demo.

htf.termcolors.green(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: None. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: None. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: None. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_blue(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_blue’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_blue_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_blue’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_blue_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_blue’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_blue_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_blue’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_cyan(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_cyan’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_cyan_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_cyan’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_cyan_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_cyan’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_cyan_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_cyan’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_grey(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_grey’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_grey_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_grey’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_grey_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_grey’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_grey_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_grey’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_magenta(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_magenta’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_magenta_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_magenta’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_magenta_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_magenta’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_magenta_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_magenta’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_red(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_red’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_red_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_red’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_red_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_red’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_red_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_red’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_white(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_white’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_white_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_white’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_white_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_white’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_white_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_white’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_yellow(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_yellow’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_yellow_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_yellow’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_yellow_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_yellow’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_on_yellow_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: ‘on_yellow’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.green_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘green’. Background color: None. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: None. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: None. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: None. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_blue(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_blue’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_blue_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_blue’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_blue_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_blue’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_blue_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_blue’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_cyan(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_cyan’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_cyan_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_cyan’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_cyan_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_cyan’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_cyan_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_cyan’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_green(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_green’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_green_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_green’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_green_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_green’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_green_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_green’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_magenta(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_magenta’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_magenta_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_magenta’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_magenta_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_magenta’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_magenta_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_magenta’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_red(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_red’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_red_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_red’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_red_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_red’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_red_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_red’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_white(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_white’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_white_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_white’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_white_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_white’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_white_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_white’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_yellow(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_yellow’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_yellow_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_yellow’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_yellow_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_yellow’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_on_yellow_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: ‘on_yellow’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.grey_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘grey’. Background color: None. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: None. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: None. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: None. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_blue(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_blue’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_blue_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_blue’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_blue_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_blue’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_blue_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_blue’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_cyan(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_cyan’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_cyan_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_cyan’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_cyan_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_cyan’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_cyan_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_cyan’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_green(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_green’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_green_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_green’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_green_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_green’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_green_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_green’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_grey(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_grey’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_grey_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_grey’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_grey_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_grey’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_grey_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_grey’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_red(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_red’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_red_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_red’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_red_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_red’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_red_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_red’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_white(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_white’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_white_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_white’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_white_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_white’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_white_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_white’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_yellow(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_yellow’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_yellow_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_yellow’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_yellow_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_yellow’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_on_yellow_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: ‘on_yellow’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.magenta_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘magenta’. Background color: None. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.make_style(color=None, on_color=None, attrs=None)

Return a callable that has a parameter text that will be colord according to the parameters if coloring is supported.

Parameters
  • color=None (str) – the color for the text

  • on_color=None (str) – the backgrond color

  • attrs=None (list of str) – a list of attributes

htf.termcolors.on_blue(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_blue’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_blue_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_blue’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_blue_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_blue’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_blue_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_blue’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_cyan(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_cyan’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_cyan_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_cyan’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_cyan_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_cyan’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_cyan_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_cyan’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_green(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_green’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_green_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_green’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_green_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_green’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_green_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_green’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_grey(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_grey’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_grey_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_grey’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_grey_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_grey’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_grey_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_grey’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_magenta(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_magenta’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_magenta_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_magenta’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_magenta_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_magenta’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_magenta_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_magenta’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_red(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_red’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_red_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_red’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_red_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_red’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_red_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_red’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_white(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_white’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_white_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_white’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_white_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_white’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_white_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_white’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_yellow(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_yellow’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_yellow_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_yellow’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_yellow_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_yellow’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.on_yellow_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: ‘on_yellow’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: None. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: None. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: None. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_blue(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_blue’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_blue_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_blue’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_blue_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_blue’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_blue_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_blue’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_cyan(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_cyan’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_cyan_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_cyan’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_cyan_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_cyan’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_cyan_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_cyan’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_green(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_green’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_green_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_green’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_green_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_green’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_green_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_green’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_grey(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_grey’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_grey_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_grey’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_grey_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_grey’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_grey_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_grey’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_magenta(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_magenta’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_magenta_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_magenta’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_magenta_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_magenta’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_magenta_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_magenta’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_white(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_white’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_white_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_white’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_white_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_white’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_white_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_white’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_yellow(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_yellow’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_yellow_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_yellow’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_yellow_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_yellow’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_on_yellow_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: ‘on_yellow’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.red_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘red’. Background color: None. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.supports_color()

Return True if the running system’s terminal supports color and colors are wanted, and False otherwise.

htf.termcolors.underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: None. Background color: None. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: None. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: None. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: None. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_blue(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_blue’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_blue_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_blue’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_blue_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_blue’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_blue_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_blue’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_cyan(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_cyan’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_cyan_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_cyan’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_cyan_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_cyan’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_cyan_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_cyan’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_green(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_green’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_green_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_green’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_green_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_green’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_green_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_green’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_grey(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_grey’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_grey_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_grey’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_grey_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_grey’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_grey_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_grey’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_magenta(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_magenta’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_magenta_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_magenta’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_magenta_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_magenta’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_magenta_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_magenta’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_red(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_red’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_red_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_red’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_red_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_red’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_red_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_red’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_yellow(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_yellow’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_yellow_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_yellow’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_yellow_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_yellow’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_on_yellow_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: ‘on_yellow’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.white_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘white’. Background color: None. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: None. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: None. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: None. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_blue(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_blue’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_blue_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_blue’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_blue_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_blue’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_blue_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_blue’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_cyan(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_cyan’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_cyan_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_cyan’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_cyan_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_cyan’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_cyan_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_cyan’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_green(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_green’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_green_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_green’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_green_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_green’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_green_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_green’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_grey(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_grey’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_grey_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_grey’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_grey_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_grey’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_grey_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_grey’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_magenta(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_magenta’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_magenta_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_magenta’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_magenta_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_magenta’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_magenta_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_magenta’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_red(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_red’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_red_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_red’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_red_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_red’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_red_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_red’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_white(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_white’. Attributes: .

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_white_bold(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_white’. Attributes: bold.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_white_bold_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_white’. Attributes: bold, underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_on_white_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: ‘on_white’. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str

htf.termcolors.yellow_underline(text)

Return colored text if supported by terminal using ANSI codes.

Foreground color: ‘yellow’. Background color: None. Attributes: underline.

Parameters

text (str) – the text to be colored.

Returns

text colored if supported by the terminal.

Return type

str