def mk_range(name, startnum,  endnum, chain=None, color='gray70'):
    """Generate the PyMol code to display a colorized region."""
    return """
color %(color)s, %(name)s and resi %(snum)s-%(enum)s %(chain)s 
""" % {
        'name':     name,
        'snum':     startnum,
        'enum':     endnum,
        'chain':    ('and chain %s' % chain) if chain else '',
        'color':    color,
        }