Colormind (Color Palette Generator)
⚠️ Privacy & Security Notice:
- - This skill sends color data to an external service (colormind.io)
- The API uses unencrypted HTTP (HTTPS has a self-signed certificate)
- When using
image_to_palette.sh, derived color data from your images is sent externally - Do not use with sensitive/private images unless you accept this data sharing
- Consider running in a sandbox when processing untrusted images (ImageMagick safety)
Colormind exposes a simple API:
- -
POST http://colormind.io/api/ → generate a palette (optionally with locked colors) - INLINECODE2 → list available models
List models
CODEBLOCK0
Generate a random palette
CODEBLOCK1
Generate a palette with locked colors
Provide 5 slots. Use:
- - an RGB triple:
"r,g,b" (locks that slot) - INLINECODE4 (free slot)
Examples:
CODEBLOCK2
Output:
- - always prints JSON
- if
--pretty is set, also prints a small Markdown block (hex + RGB)
CODEBLOCK3
Sample an image → get a palette
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.
CODEBLOCK4
Notes:
- - Colormind may slightly adjust locked colors.
- Models refresh daily (UTC+8).
Colormind(调色板生成器)
⚠️ 隐私与安全须知:
- - 此技能会将颜色数据发送至外部服务(colormind.io)
- API 使用未加密的 HTTP 协议(HTTPS 使用自签名证书)
- 使用 imagetopalette.sh 时,从图片提取的颜色数据将被发送至外部
- 请勿用于敏感/私人图片,除非您接受此数据共享行为
- 处理不可信图片时建议在沙箱中运行(ImageMagick 安全措施)
Colormind 提供简单 API:
- - POST http://colormind.io/api/ → 生成调色板(可选锁定颜色)
- GET http://colormind.io/list/ → 列出可用模型
列出模型
bash
node {baseDir}/scripts/list_models.mjs
生成随机调色板
bash
node {baseDir}/scripts/generate_palette.mjs --model default
node {baseDir}/scripts/generate_palette.mjs --model ui
生成带锁定颜色的调色板
提供 5 个色槽。使用:
- - RGB 三元组:r,g,b(锁定该色槽)
- N(自由色槽)
示例:
bash
锁定 2 种颜色,让 colormind 填充其余部分
node {baseDir}/scripts/generate_palette.mjs --model default \
--input 44,43,44 90,83,82 N N N
锁定品牌色,保留自由渐变
node {baseDir}/scripts/generate_palette.mjs --model ui \
--input 0,122,255 N N N N
输出:
- - 始终输出 JSON
- 若设置 --pretty,还会打印小型 Markdown 代码块(十六进制 + RGB)
bash
node {baseDir}/scripts/generate_palette.mjs --model default --pretty
采样图片 → 获取调色板
需要 ImageMagick(convert 命令)。从图片中采样小型调色板,选取出现频率最高的颜色作为基色,然后生成 Colormind 调色板。
bash
返回包含采样颜色 + 生成的 Colormind 调色板的 JSON
bash {baseDir}/scripts/image
topalette.sh /path/to/image.jpg --model ui
bash {baseDir}/scripts/image
topalette.sh /path/to/image.jpg --model default
注意:
- - Colormind 可能会微调锁定颜色。
- 模型每日刷新(UTC+8 时区)。