Pythons scripts running on terminal can make use of Terminal colours to enhance output.
Using Combination of Foreground and Backgrunod can ensure required colours.
\033[1;41m \033[97m{} \033[00m"
The way I manage is by defining function and call with required text. Or you could define it in your own class and include
Text Format | Foreground (text) color | Background color |
0: normal text | 30: Black | 40: Black |
1: bold | 31: Red | 41: Red |
4: Underlined text | 32: Green | 42: Green |
33: Yellow | 43: Yellow | |
34: Blue | 44: Blue | |
35: Purple | 45: Purple | |
36: Cyan | 46: Cyan | |
37: White | 47: White |