def thresholdcoloring(coloring, names):
for key in list(coloring.keys()):<EOL><INDENT>if len([k for k in coloring[key] if k in names]) == <NUM_LIT:0>:<EOL><INDENT>coloring.pop(key)<EOL><DEDENT>else:<EOL><INDENT>coloring[key] = utils.uniqify([k for k in coloring[key] if k in <EOL>names])<EOL><DEDENT><DEDENT>return coloring<EOL>
Threshold a coloring dictionary for a given list of column names.

Threshold `coloring` based on `names`, a list of strings in::

    coloring.values()

**Parameters**

    **coloring** :  dictionary

        Hierarchical structure on the columns given in the header of the 
        file; an attribute of tabarrays.

        See :func:`tabular.tab.tabarray.__new__` for more information about 
        coloring.

    **names** :  list of strings

        List of strings giving column names.

**Returns**

    **newcoloring** :  dictionary

        The thresholded coloring dictionary.