for every x in sequence of integers from 0 to 7. background is a dictionary created with elements: x appended to a string '4' for value under the key x of color_names dictionary,
background = dict ( ( color_names [ x ] , '4%s' % x ) for x in range ( 8 ) )