Jul 09, 2026 — Digital Edition
George Ideas
Independent Journalism & Insight
Feature

Matplotlib Color Names: A Comprehensive List

Matplotlib, a widely-used data visualization library in Python, offers a rich palette of colors to style your plots. Understanding the list of color names available in Matplotlib can help you create more appealing and informative visualizations. Let's delve into the world of Matplotlib colors.

List of named colors
List of named colors

Matplotlib's color names are inspired by various sources, ranging from web-safe colors to those named after artists' palettes. They provide a consistent and recognizable way to specify colors across different plots and platforms.

List of named colors
List of named colors

Understanding Matplotlib's Color Names

Matplotlib uses a combination of predefined color names and RGB, RGBA, hex, and HSL values to represent colors. The predefined color names are case-insensitive and offer a convenient way to specify colors without knowing their exact RGB or hex values.

colornames.org !!
colornames.org !!

To use a color name in Matplotlib, simply pass it as a string to the color parameter of the plotting function. For example, to plot a line in blue, you would use:

```python import matplotlib.pyplot as plt plt.plot([1, 2, 3], [4, 2, 6], color='blue') ```

Commonly Used Color Names

the color code for all different types of computers and their names are shown in this chart
the color code for all different types of computers and their names are shown in this chart

Some of the most commonly used color names in Matplotlib include:

  • blue: A deep blue color.
  • green: A vibrant green color.
  • red: A bright red color.
  • cyan: A light blue-green color.
  • magenta: A purplish-red color.
  • yellow: A bright yellow color.
  • black: A dark black color.
  • white: A bright white color.

Color Names Inspired by Artists' Palettes

Matplotlib 3.7.2 documentation
Matplotlib 3.7.2 documentation

Matplotlib also includes color names inspired by artists' palettes, such as:

  • viridis: A cool, greenish color scale inspired by the Viridis color map.
  • plasma: A warm, reddish color scale inspired by the Plasma color map.
  • inferno: A fiery, orange-red color scale inspired by the Inferno color map.
  • magma: A dark, reddish color scale inspired by the Magma color map.

Exploring the Complete List of Color Names

「色の名前 一覧」の検索結果
「色の名前 一覧」の検索結果

Matplotlib offers a comprehensive list of color names, totaling over 130 entries. To explore the complete list, you can use the following code snippet:

```python import matplotlib.pyplot as plt print(plt.colormaps()) ```

This will display a list of all available color maps, including their names and the number of colors in each map.

the color code for all kinds of colors
the color code for all kinds of colors
the color chart for colors names
the color chart for colors names
Click to Name a Color!
Click to Name a Color!
Color- matplotlib
Color- matplotlib
the color chart for different colors and numbers
the color chart for different colors and numbers
the color chart for all different colors in this page is an excellent way to describe what they
the color chart for all different colors in this page is an excellent way to describe what they
the color chart for different shades of paint, with names and colors in each section
the color chart for different shades of paint, with names and colors in each section
a color chart with the names of different types of colors in each section, including red, yellow, blue, green, and purple
a color chart with the names of different types of colors in each section, including red, yellow, blue, green, and purple
color names in english with different colors for each one, including the name and number
color names in english with different colors for each one, including the name and number
code warna dds yang butuh nieh gua kasih
code warna dds yang butuh nieh gua kasih
the color scheme for different types of colors in each language, including blue, pink, red
the color scheme for different types of colors in each language, including blue, pink, red
an image of the names of different colors and font on a white background, including red, green, blue, yellow, orange, and black
an image of the names of different colors and font on a white background, including red, green, blue, yellow, orange, and black
Client Challenge
Client Challenge
the color chart for different shades of red, orange, pink and violet in various colors
the color chart for different shades of red, orange, pink and violet in various colors
an image of color chart with the names and colors for each type of paintbrush
an image of color chart with the names and colors for each type of paintbrush
an image of a colorful chart with different colors
an image of a colorful chart with different colors
💜 20 Shades of Purple Colors | Purple Color Chart, Color Palette & Color Names
💜 20 Shades of Purple Colors | Purple Color Chart, Color Palette & Color Names
an image of the color code for different colors and names on a computer screen, with text overlaiding them
an image of the color code for different colors and names on a computer screen, with text overlaiding them
a color chart with different colors and names on the bottom row, including red, yellow, green, blue, orange, pink, purple
a color chart with different colors and names on the bottom row, including red, yellow, green, blue, orange, pink, purple
the color chart for different types of paint colors and their corresponding names are shown in red, blue, green, yellow, purple, orange, pink
the color chart for different types of paint colors and their corresponding names are shown in red, blue, green, yellow, purple, orange, pink

Using Color Names with Color Maps

In addition to using color names with individual plot elements, you can also use them with color maps to create filled contours, images, and 3D surfaces. For example, to create a filled contour plot using the 'viridis' color map, you would use:

```python import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 2 * np.pi, 100) y = np.linspace(0, 2 * np.pi, 100) X, Y = np.meshgrid(x, y) Z = np.sin(X) * np.cos(Y) plt.contourf(X, Y, Z, 15, cmap='viridis') ```

This will create a filled contour plot with 15 levels, using the 'viridis' color map to represent the values of the Z data.

Customizing Colors with Colormaps

While Matplotlib provides a wide range of color names and colormaps, you may sometimes need to create your own custom colormap. Matplotlib allows you to do this using the `LinearSegmentedColormap` class or by combining existing colormaps.

For example, to create a custom colormap that combines the 'viridis' and 'plasma' colormaps, you can use the following code:

```python import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap viridis = plt.cm.viridis(np.linspace(0, 1, 256)) plasma = plt.cm.plasma(np.linspace(0, 1, 256)) custom_cmap = ListedColormap(np.vstack((viridis, plasma))) # Now you can use the custom_cmap with your plot ```

This will create a new colormap that combines the 'viridis' and 'plasma' colormaps, allowing you to use it in your plots.

In conclusion, Matplotlib's list of color names offers a rich and versatile palette for creating engaging and informative visualizations. By understanding the available color names and their sources, you can unlock new possibilities for styling your plots and communicating your data more effectively. Happy plotting!