agentleFS
pahlevikunpahlevikun/levistack/skills/product/color-kit/SKILL.md

color-kit

Skill0 starsChanged 20 days agoMITView on GitHub

Pick and prove the colors of a product. Choose a color strategy (feeling, harmony, contrast, dose), mix or anchor a palette, build OKLCH ramps and semantic roles, compose light, dark, high contrast, car night and TV modes, tune the result live with knobs, prove every text and control pair with measured contrast, build chart scales, audit the colors that already exist, and bind the theme to a stack (CSS and Tailwind, SwiftUI, Jetpack Compose, Flutter, React Native, Vue). Use when the user asks for a palette, brand colors, a theme, dark mode, color tokens, a contrast fix or a color audit. Not for buttons, layout or motion (ui-ux-kit), the full token file and DESIGN.md (design-system-kit), or logo art.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    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:

    Ask only for what is missing, one question at a time, with your recommended answer:

    line 42
  2. Distinctive:

    Read the project's tokens, theme files and brand assets.

    line 53
  3. Very specific:

    Write the brief: copy templates/color-brief.json and fill it.

    line 61
  4. Very specific:

    If a brand color is fixed, pass its hue and chroma (--hue, --chroma).

    line 65
  5. Very specific:

    Tune it live: Add --live to also write live.html.

    line 69
  6. Distinctive:

    Run the pair file once. Every row names its own mode, so one run measures light and dark.

    line 77
  7. Distinctive:

    Fix contrast by lightness: Do not change hue to fix a ratio.

    line 107
  8. Distinctive:

    Every pair in the pair file passes in every mode, or each failure has a stated reason.

    line 150
  9. Distinctive:

    No raw hex sits outside the palette and theme files.

    line 153

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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

Color kit

Choose the colors, build them as roles, prove them, and bind them to the stack. This skill owns palette and mode decisions. It does not design buttons, layouts or motion, and it does not assemble the whole design system.

Work through every step in order. Keep a step short when the request is small, and write Step N: skipped, because ... instead of skipping silently.

The numbers come from a script, not from guesses. The script is theme.py in design-system-kit (specialities/design-system/scripts/theme/). Open a shell in that folder (cd there) and pass absolute paths for the brief and for --out, so your files land in the project and not inside the kit. If design-system-kit is not installed, follow the manual path in references/ramps-and-roles.md with a color library, and report only values you measured.

Step 0: Frame

Ask only for what is missing, one question at a time, with your recommended answer:

  • What is the product, and who uses it? (Picks the domain and the hue zones.)
  • Which feeling, in two or three words?
  • Which platforms and which modes? (Phone, tablet, desktop, web, TV, car. Light, dark, high contrast.)
  • Is a brand color already fixed? Is it pinned or may it snap onto a ramp?
  • Which stack gets the result? (Bind only that one.)
  • Which region and language? (Color meanings change. See data/locale-color-notes.csv.)

Step 1: Read what exists

Read the project's tokens, theme files and brand assets. Treat a confirmed brand color as fixed. If the product already has colors, audit them first: python3 scripts/theme/theme.py audit <folder> --out color-audit.md, then follow references/audit-existing.md. A greenfield product has nothing to read. Say so and go on.

Step 2: Choose the strategy

Write four lines before any value: feeling, relationship, contrast, dose. Pick a method (anchor on a brand color, mix from a mood, extract and remix, sample an image). Decide whether the brand color is pinned or snapped. Choose one neutral. Guide: references/strategy.md. Words to flags: data/mood-to-knobs.csv.

Step 3: Build the palette

  1. Write the brief: copy templates/color-brief.json and fill it.
  2. For a new palette, show three different directions: python3 scripts/theme/theme.py explore --from-brief color-brief.json --count 3. Let the user pick and refine with the knobs.
  3. Keep the brief in the project as design/brief.json (copy the template there). If design-system-kit is in play it adds its own keys to this same file and rebuilds from it, so a pinned brand hue and chroma must be written in the brief, never only on the command line. Carry the chosen option into the build. Each option prints its seed (for example 1-0). Put that seed in the brief ("seed": "1-0") and keep every other key the same, or save the options with explore --out recipes.json and build with --recipe recipes.json --pick N. Without this, the build makes a different palette from the one the user picked.
  4. Build: python3 scripts/theme/theme.py build --from-brief color-brief.json --out design/. For an existing site as inspiration, add --from-extract extracted.json.
  5. If a brand color is fixed, pass its hue and chroma (--hue, --chroma). Check where it lands on the ramp.

The build writes recipe.json, tokens.json, theme.css, platforms.css, tailwind-theme.css, DESIGN.md, report.md and preview.html, and exits non-zero if a contrast or platform check fails. Never edit a failing color by hand and skip the re-run.

Tune it live. Add --live to also write live.html. It has knobs for color amount, neutral temperature and mode. Every position passed the contrast gate or says why not. Keep the choice by copying its two brief keys. Guide: references/live-tuning.md.

Step 4: Roles and modes

Check the roles against data/roles.csv. Every role except scrim and the chart colors has a token in light and in dark (chart colors are CSS variables in theme.css, and the scrim is written by hand). The build emits two sets, light and dark. Dimmed, high contrast, car night and TV are manual: derive them from the dark set on purpose, make the app start in dark on TV and car, and measure them yourself. --platform tv or car only changes the default ground, the sizes and the contrast floor. Choose one switching mechanism. Guide: references/ramps-and-roles.md and references/modes.md.

Step 5: Prove it

Run the pair file once. Every row names its own mode, so one run measures light and dark. The second line is only for a pair file whose rows give no mode:

python3 scripts/theme/theme.py contrast --pairs <this skill>/data/essential-pairs.csv --tokens design/tokens.json --mode light
python3 scripts/theme/theme.py contrast --pairs <this skill>/data/essential-pairs.csv --tokens design/tokens.json --mode dark

The pairs file lists the mode of each row, and --mode is the default for rows that give none. Add a row for every pair the product really draws. Measure composed alpha and gradient stops. Check success against danger and the chart colors for color blindness. Fix a failing pair by changing lightness only, and remeasure. Write templates/contrast-report.md. Guide: references/contrast-proof.md.

Charts need their own scales: theme.py scale categorical|sequential|diverging. Guide: references/data-viz-color.md. For a hover, tint or gradient color use theme.py mix (references/mixing-and-gradients.md). For a plain word for a color use theme.py name (references/naming-colors.md).

Step 6: Bind to the stack

python3 scripts/theme/theme.py bind --tokens design/tokens.json --stack <flutter|compose|swiftui|react-native|vue> --out <folder>. Plain CSS and Tailwind come from the build. Guide and rules per stack: references/stack-bindings.md.

Step 7: Hand off

Give the user: the files and where they live, how to load them, the switching mechanism, the recipe and seed with the rebuild command, what was not measured, and what ui-ux-kit needs next (the role names, the focus ring role and the status roles). If the user wants the whole system, hand the build output to design-system-kit. Then run references/finish-checklist.md.

Rules

  1. Roles, not swatches. Components use roles. Themes override roles.
  2. Measure, never guess. Report only measured ratios. List the rest as Not verified.
  3. Chroma and lightness before hue. Feeling comes from them first.
  4. One neutral, one accent, status only where shown.
  5. One color, one meaning. One filled action per view.
  6. Dark is composed, not inverted. Measure it separately.
  7. Never carry meaning by color alone.
  8. Keep the brand color. Pin or snap it on purpose. Never darken it quietly.
  9. No raw hex outside the palette and theme files.
  10. Fix contrast by lightness. Do not change hue to fix a ratio.

What is in this folder

PathUse
references/strategy.mdPick the feeling, the relationship, the method and the neutral
references/ramps-and-roles.mdOKLCH ramps, roles, names, rules of use, the manual path
references/modes.mdLight, dark, high contrast, dimmed, car, TV, brand themes, switching
references/contrast-proof.mdThresholds, measuring the rendered pair, fixes, color blindness, charts, report
references/stack-bindings.mdCSS, Tailwind, SwiftUI, Compose, Flutter, React Native, Vue, desktop, car, TV
references/audit-existing.mdInventory and merge the colors a product already has
references/live-tuning.mdThe live page: knobs, keeping a choice, trying colors on a running page
references/data-viz-color.mdCategorical, sequential and diverging chart scales and their checks
references/mixing-and-gradients.mdTints, hover and disabled colors, gradients, and which space to mix in
references/naming-colors.mdRole names for code and plain words for people
references/color-meaning.mdConventions, regional meanings and what to avoid
references/print-and-brand-handoff.mdPrint, spot inks and the brand sheet
references/color-science-for-products.mdHow to use the facts base that explains the rules
references/check-tools.mdWhich second tool to use to cross-check each job
references/finish-checklist.mdPatterns to find and fix before you finish
data/roles.csvEvery role with its light and dark rule and its contrast need
data/essential-pairs.csvThe pairs to measure in light and dark
data/mood-to-knobs.csvWhat people say, and the flags that answer it
data/locale-color-notes.csvColor meaning cautions by region
data/color-facts.csv50 short facts (perception, spaces, mixing, print, meaning, charts, access) each with a use and a check
templates/color-brief.jsonThe brief the script reads
templates/contrast-report.mdThe proof, written down
templates/role-inventory.mdThe audit of an existing palette

Related skills

  • design-system-kit: owns the builder scripts and assembles tokens, type, space and DESIGN.md. It calls this skill at its color step.
  • ui-ux-kit: builds the components, motion and UX that consume these roles.
  • product-polish-workflow: audits and changes a shipping product. It calls this skill for any palette or mode work.
  • prototype-wireframe: grayscale first. Bring color here after the structure is agreed.
  • challenge-me: stress-test the direction before you build it.
  • verify: prove the rendered result on the real surface.

Done when

  • The four-line strategy is written and the user agreed to it.
  • tokens.json exists with every role in light and dark, built from a recorded seed.
  • Every pair in the pair file passes in every mode, or each failure has a stated reason.
  • The contrast report lists what was measured and what was not.
  • The binding for the named stack exists, or none was asked for.
  • No raw hex sits outside the palette and theme files.

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.