18 lines
416 B
Python
Executable file
18 lines
416 B
Python
Executable file
#! /usr/bin/env python3
|
|
# encoding: utf-8
|
|
|
|
import sys
|
|
|
|
def out(text):
|
|
sys.stdout.write(text)
|
|
|
|
if __name__ == '__main__':
|
|
for i in range(256):
|
|
out('\033[48;5;%dm\033[38;5;15m %03d ' %(i, i))
|
|
out('\033[48;5;0m\033[38;5;%dm %03d\t' %(i, i))
|
|
|
|
if (i + 1) % 8 == 0 if (i + 1) <= 16 else ((i + 1) - 16) % 6 == 0:
|
|
out('\n')
|
|
|
|
if (i + 1) % 16 == 0 if (i + 1) <= 16 else ((i + 1) - 16) % 36 == 0:
|
|
out('\n')
|