Repository: matplotlib/matplotlib
File: lib/matplotlib/colors.py (Python)

Code before:
        return np.array(self._lut[self._i_over])

    def set_over(self, color='k', alpha=None):
        """Set the color for high out-of-range values."""
        self._set_extremes(over=(color, alpha))

    def set_extremes(self, *, bad=None, under=None, over=None):
        """
        Set the colors for masked (*bad*) values and, when ``norm.clip =
        False``, low (*under*) and high (*over*) out-of-range values.
        """
        self._set_extremes(bad=bad, under=under, over=over)

    def with_extremes(self, *, bad=None, under=None, over=None):
        """
        Return a copy of the colormap, for which the colors for masked (*bad*)
        values and, when ``norm.clip = False``, low (*under*) and high (*over*)
        out-of-range values, have been set accordingly.
        """
        new_cm = self.copy()
        new_cm._set_extremes(bad=bad, under=under, over=over)
        return new_cm

    def _set_extremes(self, bad=None, under=None, over=None):
        """
        Set the colors for masked (*bad*) and out-of-range (*under* and *over) values.

        Parameters that are None are left unchanged.
        """
        if bad is not None:
            self._rgba_bad = to_rgba(bad)
        if under is not None:
            self._rgba_under = to_rgba(under)
        if over is not None:
            self._rgba_over = to_rgba(over)
        if self._isinit:
            self._update_lut_extremes()

    def _update_lut_extremes(self):
        """Ensure than an existing lookup table has the correct extreme values."""
        if self._rgba_under:
            self._lut[self._i_under] = self._rgba_under
        else:
            self._lut[self._i_under] = self._lut[0]
        if self._rgba_over:
            self._lut[self._i_over] = self._rgba_over
        else:
            self._lut[self._i_over] = self._lut[self.N - 1]
        self._lut[self._i_bad] = self._rgba_bad

    def with_alpha(self, alpha):

Review comment (suggestion):
```suggestion
        Set the colors for masked (*bad*) and out-of-range (*under* and *over*) values.
```

Code after:
        return np.array(self._lut[self._i_over])

    def set_over(self, color='k', alpha=None):
        """Set the color for high out-of-range values."""
        self._set_extremes(over=(color, alpha))

    def set_extremes(self, *, bad=None, under=None, over=None):
        """
        Set the colors for masked (*bad*) values and, when ``norm.clip =
        False``, low (*under*) and high (*over*) out-of-range values.
        """
        self._set_extremes(bad=bad, under=under, over=over)

    def with_extremes(self, *, bad=None, under=None, over=None):
        """
        Return a copy of the colormap, for which the colors for masked (*bad*)
        values and, when ``norm.clip = False``, low (*under*) and high (*over*)
        out-of-range values, have been set accordingly.
        """
        new_cm = self.copy()
        new_cm._set_extremes(bad=bad, under=under, over=over)
        return new_cm

    def _set_extremes(self, bad=None, under=None, over=None):
        """
        Set the colors for masked (*bad*) and out-of-range (*under* and *over*) values.

        Parameters that are None are left unchanged.
        """
        if bad is not None:
            self._rgba_bad = to_rgba(bad)
        if under is not None:
            self._rgba_under = to_rgba(under)
        if over is not None:
            self._rgba_over = to_rgba(over)
        if self._isinit:
            self._update_lut_extremes()

    def _update_lut_extremes(self):
        """Ensure than an existing lookup table has the correct extreme values."""
        if self._rgba_under:
            self._lut[self._i_under] = self._rgba_under
        else:
            self._lut[self._i_under] = self._lut[0]
        if self._rgba_over:
            self._lut[self._i_over] = self._rgba_over
        else:
            self._lut[self._i_over] = self._lut[self.N - 1]
        self._lut[self._i_bad] = self._rgba_bad

    def with_alpha(self, alpha):