Skip to content

Generate images of color palettes from HEX values

License

MIT, OFL-1.1 licenses found

Licenses found

MIT
LICENSE
OFL-1.1
OFL.txt
Notifications You must be signed in to change notification settings

majamin/color-palette-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generate Color Palettes

A shell script that generates color palettes in PNG format. This script does not generate the palettes themselves - it only aids in visualizing predetermined colorschemes by input from a file (see colors.txt) or from stdin.

An example of how to get colors in the appropriate format is given in the script.

This is original repo that inspired this script.

Instructions

You'll need cat (present on most systems), ImageMagick, and bc. Optionally, curl and jq to retrieve the original color schemes.

  1. git clone https://github.com/majamin/color-palette-generator
  2. cd color-palette-generator
  3. chmod +x colors.sh
  4. ./colors.sh colors.txt

What it does

  1. Uses ImageMagick to convert each color to a rectangle and combines.
  2. Uses ImageMagick to create a nice "rounded rectangle" image mask.
  3. Adds black or white HEX text to each color on bottom row.
  4. Adds each permutation to HEX text to each color on middle row.
  5. Adds color swatch of each color to top row.
  6. Writes output to a separate directory.

Preview

One:

One example

Many:

Gallery

Issues

PRs are welcome.

Updates

(2024-10-13)

  • adding rows of swatches and text for easier comparison
  • handle file input, add messages.
  • added jetbrainsmono for convenience.
  • fixed imagemagick dependency for the actual binary (magick)
  • replaced convert with magick
  • removed invalid colors from colors.txt
  • consistent variable case in colors.sh

About

Generate images of color palettes from HEX values

Topics

Resources

License

MIT, OFL-1.1 licenses found

Licenses found

MIT
LICENSE
OFL-1.1
OFL.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages