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.
You'll need cat
(present on most systems), ImageMagick
, and bc
.
Optionally, curl
and jq
to retrieve the original color schemes.
git clone https://github.com/majamin/color-palette-generator
cd color-palette-generator
chmod +x colors.sh
./colors.sh colors.txt
- Uses ImageMagick to convert each color to a rectangle and combines.
- Uses ImageMagick to create a nice "rounded rectangle" image mask.
- Adds black or white HEX text to each color on bottom row.
- Adds each permutation to HEX text to each color on middle row.
- Adds color swatch of each color to top row.
- Writes output to a separate directory.
One:
Many:
PRs are welcome.
(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