test_colors~20120418-182926.py 444 B

1234567891011121314151617181920
  1. #!/usr/bin/env python
  2. from __future__ import print_function
  3. from colors import color, COLORS, STYLES
  4. for bg in (None,) + COLORS:
  5. for fg in (None,) + COLORS:
  6. for style in (None,) + STYLES:
  7. text = ('%s' % (fg or 'normal')).ljust(7)
  8. print(color(text, fg=fg, bg=bg, style=style), end=' ')
  9. print()
  10. for i in range(256):
  11. if i % 64 == 0:
  12. print()
  13. print(color(' ', bg=i), end='')
  14. print()