Skip to content

uekstrom/colorwheel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Color Map for the Color Wheel

Figure: The three colormaps in the colorwheel package. This repository contains a cyclic color map, "Wheel", for the color wheel. It is suitable for color-mapping angles. The simple "HSV" color wheel is shown for reference, and also shows several issues that the new color map is designed to correct. It also contain two "unrolled" colormaps, "Floyd" and "Splash" derived from Wheel.

Figure: The basic "HSV" colormap, Goethes 1810 color wheel, the "Wheel" color map and a six uniform samples from "Wheel".

The colormap was developed with the following goals:

  • Perceptual uniformity.
  • Smooth variation in luminosity and chrominance.
  • Reasonable tradeoffs between high chrominance and luminosity.

The procedure involved creating a perceptually uniform colormap in the Oklab colorspace, applying cyclic smoothing of chroma and luma and then repeating the re-parameterization for perceptual uniformity. By visual inspection is was decided that 32 color points followed by interpolation in sRGB is enough to give good final results. The color map data can be found in colormap.py in this repo.

A happy by-product of the procedure was that the final color map strongly resembled Goethes 1810 color wheel (see figure). It's even possible that the differences in purples is due to aging of Goethes illustration. A discrete version of the colormap using seven colors give gives particularly nice and, for most people and in most languages, unambigously named colors: red, orange, yellow, green, teal, blue and purple.
Figure: Seven uniformly spaces samples from "Wheel".

The six color version shown in the first figure has too much purple in the blue. It's not possible to correct this defect without violating preceptual uniformity.

Additionally the package includes two linear colormaps which are obtained from "unrolling" the colorwheels with two different cuts. The "Floyd" colormap unrolls the colors in the spectral order, purple, blue, green, yellow, orange red, and has a slightly darker yellow than the original color wheel for perceptual uniformity. The "Splash" colormap is divergent with yellow in the middle. This means that purple is put together with red instead of the typical blue. The yellow is slightly lighter in the Splash map than in the original Wheel. Splash and Floyd are proposed as alternatives to the popular Jet colormap in situations where the more uniform luminosity and perceptual uniformity is advantageous. Since Splash and Floyd avoid very dark colors it is more suitable for coloring 3D objects without hiding shading. You can compare these colormaps to some standard maps in the figure below.

Figure: Jet, Turbo, Spectral, Floyd and Splash colormaps used for scatterplotting on black and white backgrounds.

The Weel color map was developed by Ulf Ekström uekstrom@gmail.com 2025.

About

A colormap for the color wheel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages