Community图像github.com

调色板

构建、检查和导出配色方案——从照片或情绪板中提取颜色,生成 OKLCH 色阶(50–950)或和谐色,检查 WCAG 对比度,并导出为 CSS 变量、Tailwind、设计令牌、Adobe ASE(Illustrator/InDesign/Photoshop)、GIMP/Krita GPL 或色板图。当用户需要调色板、色阶、“与某颜色搭配的颜色”、对比度或可访问性检查,或设计工具色板时使用。

调色板 是什么?

Palette 是一个 AI 辅助的色彩工具智能体,专注于为设计师和开发者提供专业的色彩管理能力。它能够从照片或情绪板中提取主色调,通过 k-means 聚类算法分析图像并输出颜色占比。同时支持生成从 50 到 950 的感知均匀色阶(基于 OKLab/OKLCH 色彩空间),以及互补、类似、三等分、分裂互补、四等分等多种和谐配色方案。该工具还内置了 WCAG 对比度检查功能,可确保文本与背景组合符合可访问性标准(正文 4.5:1,大文本 3:1)。支持导出为 CSS 变量、SCSS、Tailwind v4 @theme、Figma Tokens Studio 令牌、Adobe ASE 色板(适用于 Illustrator/InDesign/Photoshop)、GIMP/Krita GPL 色板、SVG 或 PNG 色板图。其核心价值在于将色彩科学(OKLab 色差计算、对比度公式)与 AI 的设计判断能力结合——智能体负责在呈现前验证对比度、为颜色分配角色(背景/墨水/强调色)、识别照片中的主色调而非仅按面积占比,并给出关于色彩选择的清晰解释。支持在 Photoshop、Figma、Tailwind、GIMP、Krita、Inkscape、Affinity、Procreate 等主流设计和开发工具中使用。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Remicht0/graphic-design-skills/tree/HEAD/skills/palette

Installed? Explore more 图像 skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

调色板 是做什么的?

scripts/palette.py 执行色彩数学运算(OKLab/OKLCH、WCAG 对比度、k-means 提取)并为设计工具写入文件。你的任务是在此基础上进行设计判断:哪些颜色应承担某个角色、该调色板是否实际适合文本,以及用平实的语言解释这些选择。

命令

# 1. 从图像提取:主色及其占图像比例 + 色板图
python3 scripts/palette.py extract photo.jpg -n 6 -o palette.json --sheet palette.png

# 2. 可访问性:哪些颜色组合可承载文本
python3 scripts/palette.py contrast palette.json
python3 scripts/palette.py contrast "#111111,#F2EFE9,#FF4F12"

# 3. 从一种品牌色生成完整色阶(50 … 950),感知均匀
python3 scripts/palette.py scale "#2D4CB4" --name cobalt --keep -o cobalt.json

# 4. 和谐色:互补 | 类似 | 三等分 | 分裂互补 | 四等分
python3 scripts/palette.py harmony "#FF4F12" --type split

# 5. 导出:css | scss | tailwind | tokens | json | ase | gpl | svg | png
python3 scripts/palette.py export palette.json --to ase -o palette.ase
python3 scripts/palette.py export palette.json --to tailwind

调色板是由脚本写入的 JSON 文件,也可以是一个逗号分隔的十六进制颜色列表。你可以手动编辑 JSON(重命名颜色、删除某个颜色),然后将其重新输入到 contrast 或 export 中。

工作方式

  1. 从用户已有的素材出发:照片、情绪板、标志、现有品牌色,或仅以文字描述的氛围。对于文字描述,你自己先提出 4-6 个十六进制值,然后对其运行 contrast:切勿展示未经检查的调色板。
  2. 为每种颜色赋予一个任务。 一个可用的调色板不是六种均等颜色。命名角色:背景(纸面)、墨水(文本)、强调色(每页使用一到两次),以及辅助中性色。大致比例为 60% 背景,30% 墨水和中性色,10% 强调色。extract 会自动猜测背景/墨水/强调色;当它猜错时予以纠正(它经常将照片中的大区域视为“背景”)。
  3. 在呈现前检查对比度。 正文需要 4.5:1(WCAG AA);大文本(≥ 24 px,或 ≥ 18.5 px 加粗)需要 3:1;标志和纯装饰豁免。如果背景上的墨水不满足要求,请加深墨水或提亮背景,而不是放弃该颜色搭配。明确说明哪些组合对文本是安全的。
  4. 色阶(scale)适用于需要渐变色调的 UI 和品牌系统。--keep 将确切的品牌色保留在其最近的色阶中,并报告该色阶是哪一级(“你的蓝色是 cobalt-700”)。色度在浅色和深色两端逐渐减弱,这样渐变色调就不会显得霓虹感,阴影也不会显得浑浊。
  5. 以用户工具可读取的格式导出:
    工具格式
    Illustrator、InDesign、Photoshop、Affinity、Procreate(导入)ase
    Figmatokens(通过 Tokens Studio 插件)或粘贴十六进制值
    Webcss、scss、tailwind(v4 @theme)
    GIMP、Krita、Inkscapegpl
    用于分享的视觉文件png(色板图)或 svg

关于判断的说明

  • 照片很少直接提供良好的调色板:k-means 结果反映的是面积,而非重要性。一个小红色物体可能比一面大灰墙更重要。你应亲自查看图像,然后替换为能体现图像特性的颜色。
  • 非纯白和非纯黑(#F2EFE9、#151515)比纯 #FFF 和 #000 感觉更经过设计,同时几乎保持相同的对比度比值。
  • 两个明度相同的饱和色相遇时会产生视觉颤动。检查 OKLCH 明度(表格输出中的 L 值):如果两个强调色具有几乎相同的 L 值,请将它们分开或更改其中一个。
  • 对于印刷,这些是 RGB 值。请告知用户在其排版软件中使用打印机配置文件转换为 CMYK 或 Pantone;屏幕到印刷的色差是正常的,尤其是亮绿色、蓝色和橙色。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

art-direction-analyzer

Break down the art direction of a live website — typography, color palette, grid and spacing, motion and interactions, imagery — by inspecting the rendered page (computed styles, screenshots, hover states), and save a structured reference file with screenshots for a design inspiration library. Use whenever the user wants to study, deconstruct, scrape or reverse-engineer a site's design, visual identity, UI or motion, save a site as a reference or moodboard entry, or asks "how did they do this" about a website — even without the word "analysis".

dither

Turn photos and images into dithered, halftoned or bitmap graphics (Floyd–Steinberg, Atkinson, Bayer, halftone dots, duotone, risograph-style color) as PNG or SVG, sized for screen or print. Use when the user wants a dithered, 1-bit, pixel, halftone, newspaper, risograph, screen-print or "old Mac" look, a bitmap/trame effect, or an image prepared for laser engraving or a plotter.

editorial-layout

Design editorial, magazine-style PDF layouts in HTML/CSS — briefs, reports, portfolios, zines, presentations, posters, Instagram carousels — on a 12-column print grid with extreme type scale, one accent color, bleeding images and varied compositions, then render to a print-ready PDF (with bleed) plus PNG previews and automatic layout checks. Use whenever the user wants a document, PDF, deck, booklet or boards that look designed rather than templated, or asks for a magazine, editorial or Swiss-style layout.

print-preflight

Check a PDF before it goes to the printer — bleed, trim size, image resolution at placed size, embedded fonts, RGB vs CMYK vs spot colors, total ink coverage, hairlines, transparency, layers and annotations — and explain each problem with the fix for InDesign, Illustrator, Affinity, Canva or Figma. Use whenever the user is about to print something (flyer, poster, business card, book, zine, packaging) or asks "is my file OK for print", "why did the printer reject my file", or wants a PDF checked.

相关技能