Custom String Styling for Foreground Text Colors#
Color
#
Enumerable class of all available standard text colors.
Options:
Color | Color Code | Example |
---|---|---|
![]() | Color.GREEN | This is GREEN! |
![]() | Color.YELLOW | This is YELLOW! |
![]() | Color.RED | This is RED! |
![]() | Color.MAGENTA | This is MAGENTA! |
![]() | Color.BLUE | This is BLUE! |
![]() | Color.CYAN | This is CYAN! |
![]() | Color.WHITE | This is WHITE! |
![]() | Color.BLACK | This is BLACK! |
- | Color.DEFAULT | - |
- | Color.OFF | - |
Example:
Example
Python | |
---|---|
How it appears in the terminal:
% I want RED color inside this paragraph
% Both GREEN and YELLOW are nice colors
Tip
Remember to turn off a color with Color.OFF
or BrightColor.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.
BrightColor
#
Enumerable class of all available standard bright text colors.
Options:
Color | Color Code | Example |
---|---|---|
![]() | BrightColor.GREEN | This is BRIGHT GREEN! |
![]() | BrightColor.YELLOW | This is BRIGHT YELLOW! |
![]() | BrightColor.RED | This is BRIGHT RED! |
![]() | BrightColor.MAGENTA | This is BRIGHT MAGENTA! |
![]() | BrightColor.BLUE | This is BRIGHT BLUE! |
![]() | BrightColor.CYAN | This is BRIGHT CYAN! |
![]() | BrightColor.WHITE | This is BRIGHT WHITE! |
![]() | BrightColor.BLACK | This is BRIGHT BLACK! |
- | BrightColor.DEFAULT | - |
- | BrightColor.OFF | - |
Example: