微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🎨

专业配色生成与无障碍合规检测

color-palette · vv1.1.1
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
专业技能 安全 S 级 作者 QROST 公开目录收录
784 下载 178 安装 3.4k 收藏 1.8k 浏览

简介

纯本地色彩计算工具,支持生成多类型配色方案与 WCAG 无障碍对比度检测,助力设计师打造既美观又合规的界面系统。

原始描述

Extract a color palette from an image and return HEX/RGB values with optional swatch image.

通过你的 Agent 添加

安装目录:color-palette/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/color-palette/
Codex CLI~/.codex/skills/color-palette/
DeepSeek Harness~/.agents/skills/color-palette/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

技能正文


description: Generate color palettes and check WCAG accessibility compliance for UI design.

Color Palette

Generate harmonious color palettes and verify accessibility compliance.

Instructions

  1. Generate palette from a base color (hex, RGB, HSL, or name):

    • Complementary: Opposite on color wheel (+180°)
    • Analogous: Adjacent colors (±30°)
    • Triadic: Three evenly spaced (120° apart)
    • Split-complementary: Base + two adjacent to complement
    • Monochromatic: Shades/tints of one hue
  2. Brand palette: From brand description or existing colors, suggest:

    • Primary, Secondary, Accent, Background, Text, Error, Success
  3. WCAG Accessibility Check: For any fg/bg pair, calculate contrast ratio:

    Linearize: c ≤ 0.04045 → c/12.92, else ((c+0.055)/1.055)^2.4
    Luminance: L = 0.2126*R + 0.7152*G + 0.0722*B
    Ratio: (L_light + 0.05) / (L_dark + 0.05)
    
    • AA normal text: ≥ 4.5:1
    • AA large text: ≥ 3:1
    • AAA normal text: ≥ 7:1
  4. Output format:

    🎨 Palette: Analogous from #3B82F6
    | Role      | Hex     | RGB           | Name       |
    |-----------|---------|---------------|------------|
    | Primary   | #3B82F6 | 59, 130, 246  | Blue       |
    | Secondary | #6366F1 | 99, 102, 241  | Indigo     |
    | Accent    | #22D3EE | 34, 211, 238  | Cyan       |
    
    ✅ #1E293B on #F8FAFC → 15.4:1 (AAA Pass)
    ❌ #94A3B8 on #F8FAFC → 2.8:1 (AA Fail — try #64748B)
    
  5. Export: Generate CSS custom properties or Tailwind config:

    :root { --color-primary: #3B82F6; --color-secondary: #6366F1; }
    

Edge Cases

  • Dark mode: Generate both light and dark variants
  • Color blindness: Warn if palette relies on red/green distinction alone
  • Near-failing contrast: Suggest nearest passing alternative

Requirements

  • No dependencies — pure calculation
  • No API keys needed

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

designfrontendaccessibilityui-uxproductivity

同类 Skill