Custom String Styling for Background Colors#
BgColor
#
Enumerable class of all available standard background colors.
Options:
Color | Color Code | Example |
---|---|---|
BgColor.GREEN | This is GREEN background! | |
BgColor.YELLOW | This is YELLOW background! | |
BgColor.RED | This is RED background! | |
BgColor.MAGENTA | This is MAGENTA background! | |
BgColor.BLUE | This is BLUE background! | |
BgColor.CYAN | This is CYAN background! | |
BgColor.WHITE | This is WHITE background! | |
BgColor.BLACK | This is BLACK background! | |
- | BgColor.DEFAULT | - |
- | BgColor.OFF | - |
Example:
Example
Python | |
---|---|
How it appears in the terminal:
% I want RED background color inside this paragraph
% Both GREEN and YELLOW are nice background colors
Tip
Remember to turn off a color with BgColor.OFF
or BgBrightColor.OFF
every time you want to revert back to the default terminal text style. Otherwise, the effect may spill over and into other terminal messages.
BgBrightColor
#
Enumerable class of all available standard bright background colors.
Options:
Color | Color Code | Example |
---|---|---|
BgBrightColor.GREEN | This is BRIGHT GREEN background! | |
BgBrightColor.YELLOW | This is BRIGHT YELLOW background! | |
BgBrightColor.RED | This is BRIGHT RED background! | |
BgBrightColor.MAGENTA | This is BRIGHT MAGENTA background! | |
BgBrightColor.BLUE | This is BRIGHT BLUE background! | |
BgBrightColor.CYAN | This is BRIGHT CYAN background! | |
BgBrightColor.WHITE | This is BRIGHT WHITE background! | |
BgBrightColor.BLACK | This is BRIGHT BLACK background! | |
- | BgBrightColor.DEFAULT | - |
- | BgBrightColor.OFF | - |
Example: