Skip to content
ethan edited this page Aug 14, 2025 · 11 revisions

ColorSchemes: A package for aesthetically pleasing and colorblindness-friendly color schemes

Copyright 2025 Ethan Dintzner

Welcome to the Wiki page for ColorSchemes! ColorSchemes is a collection of several hundred multicolor palettes from Color Inspirations by Darius A. Monsef IV. [1] It includes several helper functions that allow users to test colorblind friendliness for the inbuilt schemes or even custom schemes along with several other tools outlined in the README.md file. Please reference the README.md for a comprehensive list and case examples of all the inbuilt functions.

In this Wiki, we have included a full list of the color schemes built into the package sorted by primary hue (e.g., red, blue_violet, brown,...). It can serve as a reference for you if you are trying to choose a scheme for your own project.

Contents

Source code for exploring hues

If you would like to run a code locally to explore the pallets by hue (as opposed to the inbuilt function that displays 16 random schemes ColorSchemes.display_schemes()), you can use this source code to reproduce all the plots in the wiki:

import colorschemes as cs
import numpy as np
import matplotlib.pyplot as plt
ColorSchemes = cs.ColorSchemes()

# initialization
color_query = # TYPE YOUR HUE OF INTEREST HERE (e.g., green_blue)
color_names = []
base_len = len(color_query)

# obtaining the list of colors with the query hue
for attribute in dir(ColorSchemes):
    if attribute.startswith(color_query) and attribute[base_len:].isdigit():
        color_names.append(attribute)
color_names.sort(key=lambda x: int(x[base_len:]))
print('there are '+str(len(color_names))+' schemes with hue '+str(color_query))

# determine the most aesthetic layout for the number of colorschemes
squares = np.array([1,4,9,16,25,36,49,64,81,121,144])
plot_dimension = int(np.sqrt((squares[np.sum(len(color_names)>squares)])))
fig, axes = plt.subplots(plot_dimension,plot_dimension,figsize=(8,8),dpi=300)

# produce subplots for each scheme
for i, ax in enumerate(axes.flatten()):
    if i<len(color_names):
        # plot each individual scheme
        color_scheme_i = getattr(ColorSchemes, color_names[i])
        fill_intervals = np.linspace(0,1,len(color_scheme_i.colors)+1)
        for j in range(0,len(color_scheme_i.colors)):
            ax.fill_between([0,1],
                            [fill_intervals[j], fill_intervals[j]],
                            [fill_intervals[j+1],fill_intervals[j+1]],
                            color=color_scheme_i.colors[j])
        ax.set_title(color_scheme_i.name)
        ax.axis('off')
        ax.set_ylim(0,1)
        ax.set_xlim(0,1)
    else:
        # empty subplot for unfilled spaces
        ax.axis('off')
fig.tight_layout()

References:

[1] Monsef, D. A. (2011). Color Inspirations: More Than 3,000 Innovative Palettes from the Colourlovers. Com Community. Simon and Schuster.

Acknowledgements:

A huge thanks to Dr. Kiri Choi for all of his help setting up my code for packaging on PyPI, and for his valuable suggestions about making continuous colormaps from discrete points.

Clone this wiki locally