Generate color palettes and get color suggestions via the Colormind.io API (list models, generate palettes with optional locked colors).
⚠️ Privacy & Security Notice:
image_to_palette.sh, derived color data from your images is sent externallyColormind exposes a simple API:
POST http://colormind.io/api/ → generate a palette (optionally with locked colors)GET http://colormind.io/list/ → list available modelsnode {baseDir}/scripts/list_models.mjs
node {baseDir}/scripts/generate_palette.mjs --model default
node {baseDir}/scripts/generate_palette.mjs --model ui
Provide 5 slots. Use:
"r,g,b" (locks that slot)N (free slot)Examples:
# lock 2 colors, let colormind fill the rest
node {baseDir}/scripts/generate_palette.mjs --model default \
--input "44,43,44" "90,83,82" N N N
# lock a brand color, keep a free gradient
node {baseDir}/scripts/generate_palette.mjs --model ui \
--input "0,122,255" N N N N
Output:
--pretty is set, also prints a small Markdown block (hex + RGB)node {baseDir}/scripts/generate_palette.mjs --model default --pretty
Requires ImageMagick (convert). This samples a small palette from an image, picks the most frequent color as the "base", then generates a Colormind palette from it.
# returns JSON with sampled colors + a generated Colormind palette
bash {baseDir}/scripts/image_to_palette.sh /path/to/image.jpg --model ui
bash {baseDir}/scripts/image_to_palette.sh /path/to/image.jpg --model default
Notes: