#!/usr/bin/python
count = 0
for attr in (0,1,4,5,7,8):
for fore in (30,31,32,33,34,35,36,37):
for back in (40,41,42,43,44,45,46,47):
count += 1
if count % 16 == 0:
print '\033[%s;%s;%sm %02s;%02s;%02s\033[0m' % (attr,fore,back,attr,fore,back)
else:
print '\033[%s;%s;%sm %02s;%02s;%02s\033[0m' % (attr,fore,back,attr,fore,back),
count = 0
print
|