File: test_1.py

package info (click to toggle)
colored 2.2.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 240 kB
  • sloc: python: 2,064; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 479 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python
# -*- coding: utf-8 -*-

""" Test foreground and background colors with int numbers. """

from colored import fore, back, style


def main():

    for num in range(0, 256):
        print(f"{fore(num)}{num:>3}{style(0)}", end='  ')

    for num in range(0, 256):
        print(f"{back(num)}{num:>3}{style(0)}", end='  ')

    for name in range(0, 256):
        print(f"{style(4, name)}{name:>3}{style(59)}", end='  ')


if __name__ == '__main__':
    main()