color-palette-extractor

color-palette-extractor is a skill for Claude Code from nicepkg/ai-workflow. It costs 62 tokens per session (2,327 once invoked), scanned A, original, MIT.

A tool that extracts the main colors from images, websites, or designs and turns them into usable color values and palette formats.

In plain words
What is it for?
It helps create brand palettes, complementary color schemes, light and dark variations, and CSS or Tailwind color definitions.
Why use it?
It removes the guesswork from identifying a design’s colors and organizing them into a consistent palette.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nicepkg/ai-workflow/color-palette-extractor
Any agent
npx skills add nicepkg/ai-workflow --skill color-palette-extractor
Clone the repo
git clone --depth 1 https://github.com/nicepkg/ai-workflow

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for color-palette-extractor

README.md
[![agentmods](https://agentmods.dev/badge/skills/nicepkg/ai-workflow/color-palette-extractor.svg)](https://agentmods.dev/skills/nicepkg/ai-workflow/color-palette-extractor)
Your own site
<a href="https://agentmods.dev/skills/nicepkg/ai-workflow/color-palette-extractor"><img src="https://agentmods.dev/badge/skills/nicepkg/ai-workflow/color-palette-extractor.svg" alt="Measured on agentmods" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,327 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00062 $0.02327
Opus 5 $0.00031 $0.01163
Sonnet 5 $0.00012 $0.00465
Haiku 4.5 $0.00006 $0.00233

Measured 2d ago against content hash d7890677ce46, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

color-palette-extractor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

workflows/talk-to-slidev-workflow/.claude/skills/color-palette-extractor/SKILL.md · 340 lines

How it starts

The opening of the file, as written. The whole thing — 340 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Color Palette Extractor

Extract and generate color palettes from images, websites, and designs.

Instructions

When a user needs to extract colors from a source:

  1. Identify Source Type:

    • Image file (PNG, JPG, SVG)
    • Website URL
    • Screenshot
    • Design mockup
    • Existing color code to build palette from
  2. Extract Colors:

    From Image:

    • Analyze pixel data
    • Identify dominant colors
    • Group similar shades
    • Calculate color frequency
    • Sort by prominence

    From Website:

    • Fetch and parse CSS
    • Extract color values from stylesheets
    • Identify brand colors
    • Find accent colors
    • Detect text/background colors

    Color Clustering:

    • Use K-means clustering
    • Group similar colors
    • Typically extract 5-10 dominant colors
    • Ignore near-white/near-black unless significant
  3. Generate Color Palette:

    Primary Palette (5-10 colors):

    • Most dominant color
    • 2-3 supporting colors
    • 1-2 accent colors
    • Background color
    • Text color

    Extended Palette:

    • Light and dark variations
    • Tints (add white)
    • Shades (add black)
    • Tones (add gray)
    • Generate 50, 100, 200...900 scales
  4. Color Harmony Analysis:

    Generate complementary schemes:

    • Monochromatic: Variations of single hue
    • Analogous: Adjacent colors on wheel
    • Complementary: Opposite colors
    • Triadic: Three evenly spaced colors
    • Split-complementary: Base + two adjacent to complement
    • Tetradic: Four colors (two complementary pairs)
  5. Format Output:

    🎨 COLOR PALETTE EXTRACTOR
    
    Source: [Image/Website URL]
    
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    🎯 PRIMARY PALETTE
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    
    1. Primary Color
       HEX: #3B82F6
       RGB: rgb(59, 130, 246)
       HSL: hsl(217, 91%, 60%)
       Usage: Main brand color, primary buttons, links
       Prominence: 32%
    
    2. Secondary Color
       HEX: #8B5CF6
       RGB: rgb(139, 92, 246)
       HSL: hsl(258, 90%, 66%)
       Usage: Accent elements, hover states
       Prominence: 18%
    
    3. Background
       HEX: #F8FAFC
       RGB: rgb(248, 250, 252)
       HSL: hsl(210, 40%, 98%)
       Usage: Page background, cards
       Prominence: 25%
    
    4. Text Primary
       HEX: #1E293B
       RGB: rgb(30, 41, 59)
       HSL: hsl(217, 33%, 17%)
       Usage: Body text, headings
       Prominence: 15%
    
    5. Accent
       HEX: #10B981
       RGB: rgb(16, 185, 129)
       HSL: hsl(158, 84%, 39%)
       Usage: Success states, CTAs
       Prominence: 10%
    
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    🌈 COLOR SCALE (Tailwind-style)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    
    Primary:
      50:  #EFF6FF  [lightest]
      100: #DBEAFE
      200: #BFDBFE
      300: #93C5FD
      400: #60A5FA
      500: #3B82F6  [base]
      600: #2563EB
      700: #1D4ED8
      800: #1E40AF
      900: #1E3A8A  [darkest]
      950: #172554
    
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    🎭 COLOR HARMONY SCHEMES
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    
    Complementary:
      Base: #3B82F6 (blue)
      Complement: #F6823B (orange)
    
    Analogous:
      #3B82F6 (blue)
      #3BF6D9 (cyan)
      #823BF6 (purple)
    
    Triadic:
      #3B82F6 (blue)
      #F6823B (orange)
      #82F63B (green)
    
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    💻 EXPORT FORMATS
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    
    CSS Variables:
    ```css
    :root {
      --color-primary: #3B82F6;
      --color-secondary: #8B5CF6;
      --color-background: #F8FAFC;
      --color-text: #1E293B;
      --color-accent: #10B981;
    }
    

    Tailwind Config:

    module.exports = {
      theme: {
        extend: {
          colors: {
            primary: {
              50: '#EFF6FF',
              500: '#3B82F6',
              900: '#1E3A8A',
            },
          }
        }
      }
    }
    

    SCSS Variables:

    $primary: #3B82F6;
    $secondary: #8B5CF6;
    $background: #F8FAFC;
    $text: #1E293B;
    $accent: #10B981;
    

    JSON:

    {
      "primary": "#3B82F6",
      "secondary": "#8B5CF6",
      "background": "#F8FAFC",
      "text": "#1E293B",
      "accent": "#10B981"
    }
    

    Android XML:

    <color name="primary">#3B82F6</color>
    <color name="secondary">#8B5CF6</color>
    

    iOS Swift:

    extension UIColor {
      static let primary = UIColor(hex: "3B82F6")
      static let secondary = UIColor(hex: "8B5CF6")
    }
    

    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ♿ ACCESSIBILITY CHECKS ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    Contrast Ratios (WCAG 2.1):

    Text on Background: #1E293B on #F8FAFC: 14.2:1 ✅ AAA (excellent)

    Primary on Background: #3B82F6 on #F8FAFC: 4.8:1 ✅ AA (good)

    White text on Primary: #FFFFFF on #3B82F6: 4.6:1 ✅ AA (good)

    Accent on Background: #10B981 on #F8FAFC: 3.2:1 ⚠️ AA Large text only

    Recommendations: • Use darker shade of accent for small text • Primary button text should be white (#FFFFFF) • Consider #047857 for better contrast

    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 💡 COLOR PSYCHOLOGY ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    Blue (#3B82F6): • Trust, professionalism, calm • Common for: Tech, finance, healthcare

    Purple (#8B5CF6): • Creativity, luxury, wisdom • Common for: Creative services, premium brands

    Green (#10B981): • Growth, success, health • Common for: Environmental, finance, wellness

    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🎨 DESIGN SYSTEM INTEGRATION ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

    Suggested Usage: • Primary: Main CTAs, links, active states • Secondary: Secondary buttons, highlights • Background: Page/card backgrounds • Text: Body copy, headings • Accent: Success messages, highlights

    Color Roles: • Success: #10B981 (green accent) • Warning: #F59E0B (generate from palette) • Error: #EF4444 (generate complement) • Info: #3B82F6 (primary blue)

Read the full file on GitHub · 340 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 340 lines · 62 tokens per session scan A d7890677ce46

Subscribe to this mod's changes

color-palette-extractor is a skill published in the GitHub repository nicepkg/ai-workflow (282 stars, last pushed 7mo ago), licensed MIT. It adds 62 tokens to every session and 2,327 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories