| 1 | #!/usr/bin/env python |
| 2 | # -*- coding: utf-8 -*- |
| 3 | |
| 4 | """ Test foreground and background colors """ |
| 5 | |
| 6 | from colored import Fore, Back, Style |
| 7 | from colored.library import Library |
| 8 | |
| 9 | |
| 10 | def main(): |
| 11 | |
| 12 | for color in Library.COLORS.keys(): |
| 13 | print(f"{getattr(Fore, color)} This is the color {color} {Style.RESET}") |
| 14 | |
| 15 | for color in Library.COLORS.keys(): |
| 16 | print(f"{getattr(Back, color)} This is the color {color:>20} {Style.RESET}") |
| 17 | |
| 18 | |
| 19 | if __name__ == '__main__': |
| 20 | main() |