Skip to content

Full Text Functions for Background Colors#

Examples#

Normal Colors#

Color Full Text Function Example
Green bg_green("text") This is GREEN background!
Yellow bg_yellow("text") This is YELLOW background!
Red bg_red("text") This is RED background!
Magenta bg_magenta("text") This is MAGENTA background!
Blue bg_blue("text") This is BLUE background!
Cyan bg_cyan("text") This is CYAN background!
White bg_white("text") This is WHITE background!
Black bg_black("text") This is BLACK background!
Example
Python
1
2
3
4
5
from colorist import bg_green, bg_yellow, bg_red

bg_green("This is GREEN background!")
bg_yellow("This is YELLOW background!")
bg_red("This is RED background!")

How it appears in the terminal:

% This is GREEN background!
% This is YELLOW background!
% This is RED background!

Bright Colors#

Color Full Text Function Example
Bright green bg_bright_green("text") This is BRIGHT GREEN background!
Bright yellow bg_bright_yellow("text") This is BRIGHT YELLOW background!
Bright red bg_bright_red("text") This is BRIGHT RED background!
Bright magenta bg_bright_magenta("text") This is BRIGHT MAGENTA background!
Bright blue bg_bright_blue("text") This is BRIGHT BLUE background!
Bright cyan bg_bright_cyan("text") This is BRIGHT CYAN background!
Bright white bg_bright_white("text") This is BRIGHT WHITE background!
Bright black bg_bright_black("text") This is BRIGHT BLACK background!

Limited Support for Bright Colors

Note that bright colors are supported by many terminals, yet not all as bright colors aren't part of the standard set of ANSI colors.

Example
Python
1
2
3
4
5
from colorist import bg_bright_green, bg_bright_yellow, bg_bright_red

bg_bright_green("This is BRIGHT GREEN background!")
bg_bright_yellow("This is BRIGHT YELLOW background!")
bg_bright_red("This is BRIGHT RED background!")

How it appears in the terminal:

% This is BRIGHT GREEN background!
% This is BRIGHT YELLOW background!
% This is BRIGHT RED background!

Functions#

bg_black(text) #

Prints full line of text on black background.

Parameters:

Name Type Description Default
text str

Text to be printed on colored background.

required
Example
1
2
3
from colorist import bg_black

bg_black("This is BLACK background!")

How it appears in the terminal:

% This is BLACK background!

bg_blue(text) #

Prints full line of text on blue background.

Parameters:

Name Type Description Default
text str

Text to be printed on colored background.

required
Example
1
2
3
from colorist import bg_blue

bg_blue("This is BLUE background!")

How it appears in the terminal:

% This is BLUE background!

bg_cyan(text) #

Prints full line of text on cyan background.

Parameters:

Name Type Description Default
text str

Text to be printed on colored background.

required
Example
1
2
3
from colorist import bg_cyan

bg_cyan("This is CYAN background!")

How it appears in the terminal:

% This is CYAN background!

bg_green(text) #

Prints full line of text on green background.

Parameters:

Name Type Description Default
text str

Text to be printed on colored background.

required
Example
1
2
3
from colorist import bg_green

bg_green("This is GREEN background!")

How it appears in the terminal:

% This is GREEN background!

bg_magenta(text) #

Prints full line of text on magenta background.

Parameters:

Name Type Description Default
text str

Text to be printed on colored background.

required
Example
1
2
3
from colorist import bg_magenta

bg_magenta("This is MAGENTA background!")

How it appears in the terminal:

% This is MAGENTA background!

bg_red(text) #

Prints full line of text on red background.

Parameters:

Name Type Description Default
text str

Text to be printed on colored background.

required
Example
1
2
3
from colorist import bg_red

bg_red("This is RED background!")

How it appears in the terminal:

% This is RED background!

bg_white(text) #

Prints full line of text on white background.

Parameters:

Name Type Description Default
text str

Text to be printed on colored background.

required
Example
1
2
3
from colorist import bg_white

bg_white("This is WHITE background!")

How it appears in the terminal:

% This is WHITE background!

bg_yellow(text) #

Prints full line of text on yellow background.

Parameters:

Name Type Description Default
text str

Text to be printed on colored background.

required
Example
1
2
3
from colorist import bg_yellow

bg_yellow("This is YELLOW background!")

How it appears in the terminal:

% This is YELLOW background!

bg_bright_black(text) #

Prints full line of text on bright black background.

Parameters:

Name Type Description Default
text str

Text to be printed on colored background.

required
Example
1
2
3
from colorist import bg_bright_black

bg_bright_black("This is BRIGHT BLACK background!")

How it appears in the terminal:

% This is BRIGHT BLACK background!

bg_bright_blue(text) #

Prints full line of text on bright blue background.

Parameters:

Name Type Description Default
text str

Text to be printed on colored background.

required
Example
1
2
3
from colorist import bg_bright_blue

bg_bright_blue("This is BRIGHT BLUE background!")

How it appears in the terminal:

% This is BRIGHT BLUE background!

bg_bright_cyan(text) #

Prints full line of text on bright cyan background.

Parameters:

Name Type Description Default
text str

Text to be printed on colored background.

required
Example
1
2
3
from colorist import bg_bright_cyan

bg_bright_cyan("This is BRIGHT CYAN background!")

How it appears in the terminal:

% This is BRIGHT CYAN background!

bg_bright_green(text) #

Prints full line of text on bright green background.

Parameters:

Name Type Description Default
text str

Text to be printed on colored background.

required
Example
1
2
3
from colorist import bg_bright_green

bg_bright_green("This is BRIGHT GREEN background!")

How it appears in the terminal:

% This is BRIGHT GREEN background!

bg_bright_magenta(text) #

Prints full line of text on bright magenta background.

Parameters:

Name Type Description Default
text str

Text to be printed on colored background.

required
Example
1
2
3
from colorist import bg_bright_magenta

bg_bright_magenta("This is BRIGHT MAGENTA background!")

How it appears in the terminal:

% This is BRIGHT MAGENTA background!

bg_bright_red(text) #

Prints full line of text on bright red background.

Parameters:

Name Type Description Default
text str

Text to be printed on colored background.

required
Example
1
2
3
from colorist import bg_bright_red

bg_bright_red("This is BRIGHT RED background!")

How it appears in the terminal:

% This is BRIGHT RED background!

bg_bright_white(text) #

Prints full line of text on bright white background.

Parameters:

Name Type Description Default
text str

Text to be printed on colored background.

required
Example
1
2
3
from colorist import bg_bright_white

bg_bright_white("This is BRIGHT WHITE background!")

How it appears in the terminal:

% This is BRIGHT WHITE background!

bg_bright_yellow(text) #

Prints full line of text on bright yellow background.

Parameters:

Name Type Description Default
text str

Text to be printed on colored background.

required
Example
1
2
3
from colorist import bg_bright_yellow

bg_bright_yellow("This is BRIGHT YELLOW background!")

How it appears in the terminal:

% This is BRIGHT YELLOW background!