Full Line Text Functions for Background Colors#
Color Maps#
Normal Colors#
Color | Full Text Function | Example |
---|---|---|
![]() | bg_green("text") | This is GREEN background! |
![]() | bg_yellow("text") | This is YELLOW background! |
![]() | bg_red("text") | This is RED background! |
![]() | bg_magenta("text") | This is MAGENTA background! |
![]() | bg_blue("text") | This is BLUE background! |
![]() | bg_cyan("text") | This is CYAN background! |
![]() | bg_white("text") | This is WHITE background! |
![]() | bg_black("text") | This is BLACK background! |
Example
Python | |
---|---|
1 2 3 4 5 |
|
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 |
---|---|---|
![]() | bg_bright_green("text") | This is BRIGHT GREEN background! |
![]() | bg_bright_yellow("text") | This is BRIGHT YELLOW background! |
![]() | bg_bright_red("text") | This is BRIGHT RED background! |
![]() | bg_bright_magenta("text") | This is BRIGHT MAGENTA background! |
![]() | bg_bright_blue("text") | This is BRIGHT BLUE background! |
![]() | bg_bright_cyan("text") | This is BRIGHT CYAN background! |
![]() | bg_bright_white("text") | This is BRIGHT WHITE background! |
![]() | 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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
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 |
|
How it appears in the terminal:
% This is BRIGHT YELLOW background!