Extract a color palette from an image and return HEX/RGB values with optional swatch image.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install color-palette或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install color-palette⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/color-palette/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: color-palette version: 1.1.1 description: Extract a color palette from an image and return HEX/RGB values with optional swatch image. author: qrost permissions: - shell:exec ---
Extract dominant colors from a photo and get HEX/RGB values for use in design tools or mood boards.
Pillow (image handling; required)colorgram (optional; better dominant-color extraction; pip install colorgram.py)matplotlib (optional; only if generating swatch image with --output)Setup: OpenClaw does not install Python packages automatically. After installing this skill, run once: pip install -r requirements.txt (from the skill folder or pass the path). If a script fails with ModuleNotFoundError, install the missing package.
Parameters:
image: Path to the image file (JPEG, PNG, etc.).-n, --num-colors: Number of colors to extract (default 5, max 20).--output: Optional path to save a swatch PNG.python3 scripts/extract_palette.py /path/to/photo.jpg
python3 scripts/extract_palette.py /path/to/photo.jpg -n 8 --output palette_swatch.png
Output: one line per color with HEX and RGB (e.g. #2A4B7C RGB(42, 75, 124)). If --output is set, a simple swatch image is saved.
These skills are used from the OpenClaw Telegram conversation. To show the user a picture, the agent must (1) run the script with an image output path (PNG or JPG), then (2) send that file to the conversation using the OpenClaw message/media tool. For this skill: use --output so you have an image to send; then send that PNG to the user.
OpenClaw allowed paths: The message tool only sends files from allowed dirs (~/.openclaw/media/, ~/.openclaw/agents/, or system temp e.g. /tmp). Use e.g. --output ~/.openclaw/media/palette.png or --output /tmp/palette.png; do not use the skill install directory or sending will fail.
Agent behavior: When the user asks to extract colors from an image (or sends an image for a palette), run the script directly with exec: save the image to a temp path if needed, run extract_palette.py with under an allowed dir, return the HEX/RGB text and send the swatch PNG. Do not ask for confirmation; execute and return the palette and image.
User: "Extract 5 colors from this image" (with image attached). Action: Save the image to a temp path, run extract_palette.py , return the HEX/RGB list and send the swatch PNG.
User: "Give me a color palette from [image] and save the swatch as swatch.png." Action: Run with --output swatch.png, return the palette text and send the image.
安装 Color Palette Generator 后,可以对 AI 说这些话来触发它
Help me get started with Color Palette Generator
Explains what Color Palette Generator does, walks through the setup, and runs a quick demo based on your current project
Use Color Palette Generator to extract a color palette from an image and return HEX/RGB values wit...
Invokes Color Palette Generator with the right parameters and returns the result directly in the conversation
What can I do with Color Palette Generator in my design & creative workflow?
Lists the top use cases for Color Palette Generator, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/color-palette/ 目录(个人级,所有项目可用),或 .claude/skills/color-palette/(项目级)。重启 AI 客户端后,用 /color-palette 主动调用,或让 AI 根据上下文自动发现并使用。
Color Palette Generator 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Color Palette Generator 可免费安装使用。请查阅仓库了解许可证信息。
Extract a color palette from an image and return HEX/RGB values with optional swatch image.
Color Palette Generator 属于「Design & Creative」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my design & creative tasks using Color Palette Generator
Identifies repetitive steps in your workflow and sets up Color Palette Generator to handle them automatically