def _process_colors(self):
self.monochrome = self.cmap.monochrome<EOL>if self.colors is not None:<EOL><INDENT>i0, i1 = <NUM_LIT:0>, len(self.layers)<EOL>if self.extend in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>i0 = -<NUM_LIT:1><EOL><DEDENT>if self.extend in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>i1 = i1 + <NUM_LIT:1><EOL><DEDENT>self.cvalues = list(range(i0, i1))<EOL>self.set_norm(colors.NoNorm())<EOL><DEDENT>else:<EOL><INDENT>self.cvalues = self.layers<EOL><DEDENT>if not self.norm.scaled():<EOL><INDENT>self.set_clim(self.vmin, self.vmax)<EOL><DEDENT>if self.extend in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>self.norm.clip = False<EOL><DEDENT>self.set_array(self.layers)<EOL>
Color argument processing for contouring.

Note that we base the color mapping on the contour levels,
not on the actual range of the Z values.  This means we
don't have to worry about bad values in Z, and we always have
the full dynamic range available for the selected levels.

The color is based on the midpoint of the layer, except for
an extended end layers.