CommunityImagegithub.com

palette

Build, check and export color palettes — extract one from a photo or moodboard, generate tints and shades (50–950) or harmonies in OKLCH, check WCAG contrast, and export to CSS variables, Tailwind, design tokens, Adobe ASE (Illustrator/InDesign/Photoshop), GIMP/Krita GPL or a swatch sheet. Use whenever the user wants a color palette, a color scale, "colors that go with" something, a contrast or accessibility check, or swatches for a design tool.

What is palette?

palette is a Claude Code agent skill that build, check and export color palettes — extract one from a photo or moodboard, generate tints and shades (50–950) or harmonies in OKLCH, check WCAG contrast, and export to CSS variables, Tailwind, design tokens, Adobe ASE (Illustrator/InDesign/Photoshop), GIMP/Krita GPL or a swatch sheet. Use whenever the user wants a color palette, a color scale, "colors that go with" something, a contrast or accessibility check, or swatches for a design tool.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Remicht0/graphic-design-skills/tree/HEAD/skills/palette

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

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does palette do?

scripts/palette.py does the color math (OKLab/OKLCH, WCAG contrast, k-means extraction) and writes files for design tools. Your job is the design judgement on top: which colors deserve a role, whether the palette actually works for text, and explaining the choices in plain words.

Commands

# 1. From an image: dominant colors with their share of the image + a swatch sheet
python3 scripts/palette.py extract photo.jpg -n 6 -o palette.json --sheet palette.png

# 2. Accessibility: which pairs can carry text
python3 scripts/palette.py contrast palette.json
python3 scripts/palette.py contrast "#111111,#F2EFE9,#FF4F12"

# 3. A full scale from one brand color (50 … 950), perceptually even
python3 scripts/palette.py scale "#2D4CB4" --name cobalt --keep -o cobalt.json

# 4. Harmonies: complementary | analogous | triadic | split | tetradic
python3 scripts/palette.py harmony "#FF4F12" --type split

# 5. Export: 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

A palette is a JSON file written by the script, or simply a comma-separated hex list. You can hand-edit the JSON (rename colors, drop one) and feed it back to contrast or export.

How to work

  1. Start from the source the user has: a photo, a moodboard, a logo, an existing brand color, or just a mood in words. For words, propose 4–6 hex values yourself, then run contrast on them: never present a palette you haven't checked.
  2. Give every color a job. A usable palette is not six equal colors. Name roles: background (paper), ink (text), accent (one or two uses per page), plus supporting neutrals. Roughly 60 % background, 30 % ink and neutrals, 10 % accent. extract guesses background / ink / accent automatically; correct it when it's wrong (it often picks a large photo area as "background").
  3. Check contrast before delivering. Body text needs 4.5:1 (WCAG AA); large text (≥ 24 px, or ≥ 18.5 px bold) needs 3:1; logos and pure decoration are exempt. If ink on background fails, darken the ink or lighten the paper rather than dropping the pairing. Say plainly which pairs are safe for text.
  4. Scales (scale) are for UI and brand systems that need tints. --keep keeps the exact brand color at its nearest step and reports which step that is ("your blue is cobalt-700"). Chroma is tapered toward the light and dark ends so tints don't look neon and shades don't look muddy.
  5. Export in the format the user's tool reads:
    ToolFormat
    Illustrator, InDesign, Photoshop, Affinity, Procreate (import)ase
    Figmatokens (via the Tokens Studio plugin) or paste hex
    Webcss, scss, tailwind (v4 @theme)
    GIMP, Krita, Inkscapegpl
    A visual to sharepng (swatch sheet) or svg

Notes on judgement

  • Photos rarely give a good palette as-is: the k-means result reflects area, not importance. A small red object can matter more than a big grey wall. Look at the image yourself and swap in the color that carries the image's identity.
  • Off-whites and off-blacks (#F2EFE9, #151515) feel more designed than pure #FFF and #000, and keep the same contrast ratios almost intact.
  • Two saturated colors of the same lightness vibrate when they touch. Check OKLCH lightness (L in the table output): if two accents have nearly the same L, separate them or change one.
  • For print, these are RGB values. Tell the user to convert to CMYK or Pantone in their layout software with their printer's profile; screen-to-print shifts are normal, especially for bright greens, blues and oranges.

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.

Related Skills