Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mapequation/c3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C3 - Consistent Categorical Colors

A library to generate distinct categorical colors, written in TypeScript.

Documentation

Install

npm install @mapequation/c3

Features

  • Unlimited colors: Generate as many colors you want
  • Any color scheme: We generate color stops on the interval [0, 1]. Perfect to use with d3.
  • Deterministic: You always get the same colors for the same requested number of colors.
  • Consistent: If you increase the number of colors, it doesn't change the list of colors you already have.
  • Fast: The complexity is O(n log(n)) for n colors.

The algorithm is inspired by the Cantor set, which is a fractal that subdivides an interval recursively into smaller subsets.

Authors

Daniel Edler, Anton Eriksson

About

Categorical Cantor Colors - Deterministic hierarchical colors for maps

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages