Skip to content

The Color Machine is an AI that generates color palettes.

License

Notifications You must be signed in to change notification settings

onefrankguy/color-machine

Repository files navigation

Color Machine

Color Machine is a tool for creating color palettes. It uses a self-organizing map to generate new color palettes.

Usage

npm install
node random-palettes.js 4000 > palettes.json
node color-machine.js palettes.json
open color-machine.png

Palette Format

Palettes are expressed as a set of RGB colors. Each color has the format [red, green, blue, weight]. The red, green, and blue components are in the range 0 to 255. The weight component is in the range 0 to 1; it's the percentage of space in the palette the color takes up.

[
  [2, 83, 115, 0.2],
  [1, 52, 64, 0.2],
  [6, 136, 166, 0.2],
  [24, 197, 217, 0.2],
  [48, 242, 242, 0.2]
]

The image below was generated by running example-palette.json through the Color Machine.

An example palette with a lot of blues.

Credits

Color Machine was prompted by a Twitter conversation with Matt DesLauriers.

License

All code is licensed under a MIT license. See the LICENSE file for more details.

About

The Color Machine is an AI that generates color palettes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published