ansi_escape/examples/palette.py

7 lines
261 B
Python

import ansi_escape
color = 0
print(ansi_escape.escape + "]0;256 Color Terminal Palette" + ansi_escape.bell)
while color <= 255:
print(ansi_escape.color("bg", color) + " " + " " * ( len(str(color)) - 2 ) + str(color) + " ", end="")
color += 1
input()