agentleFS
khanmo97khanmo97/claude-skills/skills/sanzo-wada-palettes/SKILL.md

sanzo-wada-palettes

Skill2 starsChanged 3 days agoApache-2.0View on GitHub

Pick, preview, and apply color palettes from Sanzo Wada's A Dictionary of Color Combinations (348 combos, 159 colors) to websites, Tailwind/shadcn themes, designs, or outfits, with a live theme-switcher button for testing.

  • Reads credentials
  • Installs packages
  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this when the user wants a color scheme "from the Wada book", a Sanzo Wada palette, a specific combination number, or a tasteful …

    line 9
  2. Very specific:

    Run Python with -I, and keep scripts outside the cloned folder.

    line 40
  3. Distinctive:

    If the user gives a combination number, use it directly.

    line 44
  4. Very specific:

    Write all themes to one file, e.g.

    line 53
  5. Very specific:

    When the user picks a winner ("lock in 176"), write that theme's variables into globals.css as the default.

    line 75
  6. Distinctive:

    Always cite the combination number(s) so the user can find them in the book.

    line 83

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Sanzo Wada palettes

Use this when the user wants a color scheme "from the Wada book", a Sanzo Wada palette, a specific combination number, or a tasteful palette for a site, brand, design, or outfit.

1. Get the data

Source: mattdesl/dictionary-of-colour-combinations (MIT license). Clone it into its own empty folder:

mkdir -p /tmp/wada && git clone --depth 1 -q https://github.com/mattdesl/dictionary-of-colour-combinations /tmp/wada/repo

Fallback: npm install dictionary-of-colour-combinations in an empty folder.

colors.json is an array of 159 colors:

{"name": "Hermosa Pink", "combinations": [176, 227, 273], "swatch": 0,
 "cmyk": [0,30,6,0], "lab": [...], "rgb": [249,193,206], "hex": "#f9c1ce"}

Palettes are not stored directly. Combination N is every color whose combinations list contains N:

import json, collections
colors = json.load(open('/tmp/wada/repo/colors.json'))
combos = collections.defaultdict(list)
for c in colors:
    for n in c['combinations']:
        combos[n].append(c)
# combos[n] -> list of 2, 3, or 4 colors

Run Python with -I, and keep scripts outside the cloned folder.

2. Choose palettes

  • If the user gives a combination number, use it directly.
  • Otherwise, filter by what they asked for: color count (2, 3, or 4), mood (warm/cool by hue, muted/bold by LAB chroma), or a color they want to include (closest by LAB distance).
  • Pick 5–10 candidates for the switcher (step 4). If not building a site, show 3–5 as inline swatches (hex, name, combo number).
  • For UI work, check text contrast with WCAG ratios: 4.5:1 for body text. Use the lightest or darkest color as the background. Fix a failing pair by deriving a lighter/darker tint of a palette color for text, and note it.

3. Map each palette to a theme

For web work (Tailwind/shadcn by default), turn every candidate palette into a full set of shadcn CSS variables: --background, --foreground, --card, --card-foreground, --primary, --primary-foreground, --secondary, --secondary-foreground, --accent, --accent-foreground, --muted, --muted-foreground, --border, --ring. Use the color format the project already uses (HSL or OKLCH). If a palette has no near-white or near-black, derive tints/shades from its own colors instead of using pure gray.

Write all themes to one file, e.g. lib/wada-themes.ts:

export const wadaThemes = [
  { id: 176, name: "Hermosa Pink / ...", swatches: ["#f9c1ce", ...], vars: { "--background": "...", ... } },
  ...
];

4. Add the theme switcher (always, for web work)

Build a client component components/wada-theme-switcher.tsx and render it once in the root layout.

Behavior:

  • A small floating button in the bottom-right corner (high z-index, its own fixed neutral styling so it stays readable on every theme).
  • Clicking opens a panel listing each theme: combo number, name, and its swatches as small circles. Clicking a theme applies it instantly by setting its vars on document.documentElement.style.
  • Prev/next arrows plus keyboard shortcuts ([ and ]) to cycle through themes quickly.
  • A "Default" option that removes the inline variables to restore the site's original theme.
  • Remember the selected theme in localStorage (wrapped in try/catch) so it survives page navigation and reloads.
  • A "Copy CSS" button that copies the current theme as a ready-to-paste :root { ... } block for globals.css, with the combo number in a comment.
  • Visibility: show it when process.env.NODE_ENV !== "production" OR the URL has ?themes=1. This lets the user test on a live Vercel preview and share the link with a client, while normal visitors never see it.

When the user picks a winner ("lock in 176"), write that theme's variables into globals.css as the default. Ask whether to remove the switcher and wada-themes.ts or keep them behind ?themes=1.

Other outputs

  • Plain CSS sites: the same switcher in vanilla JS, setting custom properties on :root.
  • Design / print: list hex, RGB, and CMYK per color with the combination number.
  • Outfits / non-digital: describe each color in plain words and which item it suits (base, main, accent).

Always cite the combination number(s) so the user can find them in the book.

Notes

  • Hex values are digitized approximations. The printed book's CMYK values are the reference.
  • Color names come from the dataset. Don't invent Japanese names.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.