

.. _sphx_glr_users_explain_colors:

.. _tutorials-colors:

.. redirect-from:: /tutorials/colors/index

Colors
------

Matplotlib has support for visualizing information with a wide array
of colors and colormaps. These tutorials cover the basics of how
these colormaps look, how you can create your own, and how you can
customize colormaps for your use case.

For even more information see the :ref:`examples page <color_examples>`.



.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Color formats =============">

.. only:: html

  .. image:: /users/explain/colors/images/thumb/sphx_glr_colors_thumb.png
    :alt:

  :ref:`sphx_glr_users_explain_colors_colors.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Specifying colors</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how to build and customize standalone colorbars, i.e. without an attached plot.">

.. only:: html

  .. image:: /users/explain/colors/images/thumb/sphx_glr_colorbar_only_thumb.png
    :alt:

  :ref:`sphx_glr_users_explain_colors_colorbar_only.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Customized Colorbars Tutorial</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Matplotlib has a number of built-in colormaps accessible via matplotlib.colormaps.  There are also external libraries like palettable_ that have many extra colormaps.">

.. only:: html

  .. image:: /users/explain/colors/images/thumb/sphx_glr_colormap-manipulation_thumb.png
    :alt:

  :ref:`sphx_glr_users_explain_colors_colormap-manipulation.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Creating Colormaps in Matplotlib</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Objects that use colormaps by default linearly map the colors in the colormap from data values vmin to vmax.  For example::">

.. only:: html

  .. image:: /users/explain/colors/images/thumb/sphx_glr_colormapnorms_thumb.png
    :alt:

  :ref:`sphx_glr_users_explain_colors_colormapnorms.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Colormap normalization</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Matplotlib has a number of built-in colormaps accessible via matplotlib.colormaps.  There are also external libraries that have many extra colormaps, which can be viewed in the `Third-party colormaps`_ section of the Matplotlib documentation. Here we briefly discuss how to choose between the many options.  For help on creating your own colormaps, see colormap-manipulation.">

.. only:: html

  .. image:: /users/explain/colors/images/thumb/sphx_glr_colormaps_thumb.png
    :alt:

  :ref:`sphx_glr_users_explain_colors_colormaps.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Choosing Colormaps in Matplotlib</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /users/explain/colors/colors
   /users/explain/colors/colorbar_only
   /users/explain/colors/colormap-manipulation
   /users/explain/colors/colormapnorms
   /users/explain/colors/colormaps

