/4colors

Calculate the chromatic number and visualize the associated k-coloring of any graph.

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Chromatic Number Visualizer

Usage

Visit the website to try it out!

  • click on the background to create nodes
  • click on source and target node to create a new edge
  • right click on a node to remove it
  • drag the background or scroll for adjusting the view

Examples

The Moser Spindle, a graph with the chromatic number 4.

, another planar graph.

, a non-planar graph with a chromatic number of 5.

Running it locally

Make sure Node.js and npm are installed, clone this repository and open its folder in a terminal.

  • npm i: install all dependencies
  • npm start: development mode at http://localhost:3000
  • npm run build: production build to the build folder