| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
""" Test foreground and background colors """ |
| 5 |
|
| 6 |
from colored.library import Library |
| 7 |
from colored import fore, back, style |
| 8 |
|
| 9 |
|
| 10 |
def main(): |
| 11 |
|
| 12 |
|
| 13 |
for name in Library.COLORS.keys(): |
| 14 |
print(f"{fore(name)}{name:>3}{style('reset')}", end=' ') |
| 15 |
|
| 16 |
|
| 17 |
for name in Library.COLORS.keys(): |
| 18 |
print(f"{style(4, name)}{back(name)}{name:>3}{style('reset')}", end=' ') |
| 19 |
|
| 20 |
|
| 21 |
for name in Library.COLORS.keys(): |
| 22 |
print(f"{style(4, name)}{name:>3}{style(59)}", end=' ') |
| 23 |
|
| 24 |
|
| 25 |
if __name__ == '__main__': |
| 26 |
main() |