def pixel_print(pixel):
 (r, g, b) = pixel[:3]
 if (c['24BIT'] is True):
  sys.stdout.write(('\x1b[48;2;%d;%d;%dm \x1b[0m' % (r, g, b)))
 else:
  ansicolor = rgb2short(r, g, b)
  sys.stdout.write(('\x1b[48;5;%sm \x1b[0m' % ansicolor))

def pixel_print ( pixel ) : ( r , g , b ) = pixel [ : 3 ] if ( c [ '24BIT' ] is True ) : sys . stdout . write ( ( '\x1b[48;2;%d;%d;%dm \x1b[0m' % ( r , g , b ) ) ) else : ansicolor = rgb2short ( r , g , b ) sys . stdout . write ( ( '\x1b[48;5;%sm \x1b[0m' % ansicolor ) )
print a pixel with given ansi color .