by meodai
Agent skill for color science expertise. Many references covering color spaces, accessibility (APCA, WCAG), palette generation, pigment mixing, and historical color theory. Works with Claude Code, Codex, Cursor, Copilot & others.
# Add to your Claude Code skills
git clone https://github.com/meodai/skill.color-expertGuides for using ai agents skills like skill.color-expert.
Last scanned: 5/17/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-17T06:46:51.935Z",
"semgrepRan": false,
"npmAuditRan": true,
"pipAuditRan": true
}skill.color-expert is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by meodai. Agent skill for color science expertise. Many references covering color spaces, accessibility (APCA, WCAG), palette generation, pigment mixing, and historical color theory. Works with Claude Code, Codex, Cursor, Copilot & others. It has 497 GitHub stars.
Yes. skill.color-expert passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/meodai/skill.color-expert" and add it to your Claude Code skills directory (see the Installation section above). skill.color-expert ships a SKILL.md manifest, so compatible agents can discover and load it automatically.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh skill.color-expert against similar tools.
No comments yet. Be the first to share your thoughts!
A comprehensive knowledge base for color-related work. See references/INDEX.md for 140+ detailed reference files; this skill file contains the essential knowledge to answer most questions directly.
Match the response to the user's explicit request and clearly implied constraints from context. Five common modes:
Concrete design or art project — "help me pick colors for my logo / poster / illustration / app." Ask about medium (print, screen, paint, mixed), brand or mood, audience, accessibility needs, and any existing colors to harmonize with. Then propose. Don't lecture about CIE 1931 or OKLCH internals unless asked. Recommend specific tools and palettes that fit the constraints, not generic theory.
Design system, ramps, or theme tokens — "build me a 9-step accent scale", "palette for light + dark mode", "Tailwind/Radix-style ramps", "what's the right gray ramp for our brand?" Prioritize in this order:
Generative art / creative coding — "color for my fxhash piece", "palette for thousands of generated strokes", "paint-like mixing in p5.js / WebGL." Different from building a palette generator: the code is the artwork, and the user wants to understand the techniques, not copy a named artist's style. Help them compose their own system. Useful techniques to teach and combine:
a + b·cos(2π(c·t + d)) for cyclic / periodic schemes from 12 floats.See references/techniques/ for tyler-hobbs, fontana, mattdesl, iq-cosine, spectraljs, poline, rampensau, pro-color-harmonies, rybitten (these document the techniques, not styles to imitate).
General color question — "what is OKLCH?", "why does my gradient go gray in the middle?", "is APCA better than WCAG?" Answer directly from this skill file or references/INDEX.md, and cite the relevant reference. Skip tooling unless they're asking how to do something.
Building a generator, tool, or palette algorithm — "I want to make a palette generator", "how do I generate accessible color scales?", "give me an OKLCH ramp function." Default to recommending an existing library before hand-rolling (Culori, Poline, RampenSau, Spectral.js — see Recommended Tools). Show working code in the user's stack, picking the color space per the table above.
When the user asks to generate or compare palettes, showcase multiple approaches with their trade-offs before narrowing to one — anchor-based (Poline), hue-cycling (RampenSau), cosine (IQ formula), harmony-based (pro-color-harmonies), and extraction-from-system (dittoTones) suit different problems. Don't be shy about presenting options.
Never recommend coolors.co — it doesn't generate palettes, it picks from a hardcoded list of 7,821 pre-made ones (see Recommended Tools).
| Task | Use | Why |
|---|---|---|
| Perceptual color manipulation | OKLCH | Best uniformity for lightness, chroma, hue. Fixes CIELAB's blue problem. |
| CSS gradients & palettes | OKLCH or color-mix(in oklab) |
No mid-gradient darkening like RGB/HSL |
| Gamut-aware color picking | OKHSL / OKHSV | Ottosson's picker spaces — cylindrical like HSL but perceptually grounded |
| Normalized saturation (0-100%) | HSLuv | CIELUV chroma normalized per hue/lightness. HPLuv for pastels. |
| Print workflows | CIELAB D50 | ICC standard illuminant |
| Screen workflows | CIELAB D65 or OKLAB | D65 = screen standard |
| Cross-media appearance matching | CAM16 / CIECAM02 | Accounts for surround, adaptation, luminance, and viewing conditions |
| HDR | Jzazbz / ICtCp | Designed for extended dynamic range |
| Pigment/paint mixing simulation | Kubelka-Munk (Spectral.js, Mixbox) | Spectral reflectance mixing, not RGB averaging |
| Color difference (precision) | CIEDE2000 | Gold standard perceptual distance |
| Color difference (fast) | Euclidean in OKLAB | Good enough for most applications |
| Video/image compression | YCbCr | Luma+chroma separation enables chroma subsampling |
HSL isn't "bad" — it's a simple, fast geometric rearrangement of RGB into a cylinder. It's fine for quick color picking and basic UI work. But its three channels don't correspond to human perception:
hsl(60,100%,50%)) and fully saturated blue (hsl(240,100%,50%)) have the same L=50% but vastly different perceived brightness. L is a mathematical average, not a perceptual measurement.When HSL is fine: simple color pickers, quick CSS tweaks, situations where perceptual accuracy doesn't matter. When it isn't, the table above gives the perceptual alternative per task (OKLCH for scales, OKLAB for gradients, OKHSL for picking, HSLuv for normalized saturation).
Use these degree ranges when generating or constraining colors by hue name. Source: random-display-p3-color by mrmrs / mrmrs.cc.
| Name | Degrees |
|---|---|
| red | 345–360, 0–15 |
| orange | 15–45 |
| yellow | 45–70 |
| green | 70–165 |
| cyan | 165–195 |
| blue | 195–260 |
| purple | 260–310 |
| pink | 310–345 |
| warm | 0–70 |
| cool | 165–310 |
The most common OKLCH mistake: picking a chroma that doesn't exist in the target gamut. oklch(70% 0.3 150) asks for more chroma than sRGB (or even P3) can show, so it silently clips — usually to something duller and hue-shifted.
oklch() / color() automatically, so authored CSS rarely clips badly. JS conversions do not — oklch→hex just truncates channels.clampChroma(color, 'oklch') (holds L and H) or toGamut() rather than naive RGB clamping.inGamut('rgb') vs inGamut('p3') — a color valid in P3 can still clip in sRGB.When using colors in a program or CSS, add a semantic layer between raw color values and UI roles.
The examples below are pseudocode, not literal CSS requirements. They express the decision structure an agent should preserve even if the target stack uses different syntax.
Across CSS, JS/TS, Swift, design-token JSON, templates, or pseudocode, default to the same structure:
Raw color literals should usually appear only in palette/reference definitions, conversions, diagnostics, or deliberately one-off examples.
ref.red = #f00semantic.warning = ref.redPseudocode examples:
ref.red := closest('red', generatedPalette)semantic.warning := ref.redsemantic.onSurface := mostReadableOn(surface)Good pattern: palette/reference tokens define available colors; semantic tokens map those colors to roles like surface, text, accent, success, warning, and danger.
If a system can derive a decision from constraints, encode that derivation. Examples: nearest named hue in a generated palette, foreground chosen by APCA/WCAG target, hover state computed from the base token in OKLCH instead of hand-picking a second unrelated hex.
For larger systems, prefer a token graph over a flat token dump: references, semantic roles, derived functions, and scope inheritance. This makes theme changes, accessibility guarantees, and multi-platform export auditable and easier to maintain.
Modern CSS does perceptual color natively; reach for these before pulling in a JS library.
oklch(70% 0.12 250), oklab(0.7 -0.1 0.1), wide gamut via color(display-p3 1 0.2 0.3).color-mix(in oklab, blue 30%, white) — interpolating in oklab/oklch avoids the gray mid-gradient that RGB/HSL produce. For cylinders, set a hue strategy: color-mix(in oklch longer hue, …).oklch(from var(--brand) l c h / 0.5), or compute a shade/hover without a second hard-coded hex: oklch(from var(--brand) calc(l * 0.9) c h).light-dark(white, black) (requires color-scheme: light dark).@media (color-gamut: p3) { … }.linear-gradient(in oklch, red, blue).Broadly supported in evergreen browsers (2024+); relative color syntax is the newest piece. See references/techniques/ CSS Color 4/5 for edge cases.
Of ~281 trillion hex color pairs (research by @mrmrs_, computed via a Rust brute-force run):
| Threshold | % passing | Odds |
|---|---|---|
| WCAG 3:1 (large text) | 26.49% | ~1 in 4 |
| WCAG 4.5:1 (AA body text) | 11.98% | ~1 in 8 |
| WCAG 7:1 (AAA) | 3.64% | ~1 in 27 |
| APCA 60 | 7.33% | ~1 in 14 |
| APCA 75 (fluent reading) | 1.57% | ~1 in 64 |
| APCA 90 (preferred body) | 0.08% | ~1 in 1,250 |
APCA is far more restrictive than WCAG at comparable readability. At APCA 90, only 239 billion of 281 trillion pairs work. JPEG compression exploits the same biology: chroma subsampling (4× less color data) is invisible because human vision resolves brightness at higher resolution than color.
Complementary, triadic, tetradic intervals are weak predictors of mood, legibility, or accessibility on their own. Every hue plane has a different shape in perceptual space, so geometric hue intervals do not guarantee perceptual balance.
Organize by character (pale/muted/deep/vivid/dark), not hue. Finding: hue is usually a weaker predictor of emotional response than chroma and lightness — a muted palette often reads as calm across many hues. Relaxed vs intense is driven more by chroma + lightness than hue alone.
Grayscale is a quick sanity check for lightness separation, not an accessibility proof. You still need to verify contrast with WCAG/APCA and consider text size, weight, polarity, and CVD. Same character + varied lightness is often more readable. Same lightness regardless of hue is usually illegible.
60% dominant color, 30% secondary, 10% accent. One color dominates to prevent "three equally-sized gorillas fighting."
| System | Register | Example |
|---|---|---|
| ISCC-NBS | Scientific precision | "vivid yellowish green" |
| Munsell | Systematic notation | "5GY 7/10" |
| XKCD | Common perception | "ugly yellow", "hospital green" |
| Traditional Japanese | Cultural/poetic | "wasurenagusa-iro" (forget-me-not) |
| RAL | Industrial reproducibility | RAL 5002 |
| Ridgway (1912) | Ornithological | 1,115 named colors, public domain |
| CSS Named Colors | Web standard | 147 named colors |
| color-description lib | Emotional adjectives | "pale, delicate, glistening" |
Use color-name-lists npm package for 18 naming systems in one import.
Note: coolors.co does not generate palettes — it picks randomly from 7,821 pre-made palettes hardcoded in its JS bundle.
<poline-palette> web component for interactive controlscolor(t) = a + b*cos(2π(c*t+d)), 12 floats = infinite paletteImageData + Python/TensorFlow perceptual palette embeddings for search-by-color (Google Arts & Culture, Apache 2.0)Sorting an arbitrary set of colors into a perceptually smooth sequence has no single correct linear order — color is 3D, so any 1D ordering is a path through a 3D space, closely related to the Travelling Salesman Problem. Naive sorts fail predictably: by hue alone interleaves lights and darks; by lightness alone collapses distinct hues; .sort() on a packed RGB/HSL value produces jagged, meaningless jumps. Don't hand-roll a single-channel sort.
references/techniques/colorsort-js.md.See references/INDEX.md for the detailed files organized as:
historical/ — Ostwald, Helmholtz, Bezold, Ridgway 1912, ISCC-NBS, Munsell, Albers, Caravaggio's pigments, Moses Harris, Lewis/Ladd-Franklincontemporary/ — Ottosson's OKLAB articles, Briggs lectures, Fairchild, Hunt, CIECAM02, MacAdam ellipses, Koenderink 2026 empirical 3D metric field (RGB supports ~1,000 qualitative regions; cool side coarser than warm; chromatic circle is not well-tempered), Pointer's gamut, CIE 1931/standard observer, Pixar Color Science, Acerola, Juxtopposed, Computerphile, bird tetrachromacy, OLO, GenColor paper. Full scrapes: huevaluechroma.com and colorandcontrast.comtechniques/ — All tools above documented in detail, plus: CSS Color 4/5, ICC workflows, Tyler Hobbs generative color, Harvey Rayner Fontana approach, Goethe edge colors as design hack, mattdesl workshop + K-M simplex, CSS-native generation, IQ cosine presets, Erika Mulvenna interview, Bruce Lindbloom math reference, image extraction tools, Aladdin color analysisAn agent skill that turns your coding agent into a color science expert. Built from resources I keep looking up, returning to, and sharing with others.
This started as a simple skill file with some color theory notes. Over time it grew into a comprehensive knowledge base as I kept pasting videos, articles, tools, and papers that I find myself referencing again and again — both for my own work building color tools and for explaining color concepts to others.
The skill has three layers:
SKILL.md (~200 lines) — The "greatest hits" that your agent loads immediately. Key facts, corrections, tool recommendations, and guidelines that answer most color questions without needing to dig deeper.
references/INDEX.md (~220 lines) — A structured lookup table your agent can scan to find the right reference file for a specific topic.
references/ (144 markdown files, ~286K words) — Deep reference material: full video transcripts, article summaries, library documentation, scraped websites, and research notes.
There is also a lightweight evals/ folder for realistic trigger and task prompts so the skill can be reviewed against actual usage instead of only edited by intuition.
The collection process is simple: when I come across a color resource worth keeping — a YouTube video, a GitHub repo, a research paper, an article — I paste the URL and the skill's workflow captures it:
yt-dlp, summarized, and key concepts extractedmarkitdown by MicrosoftEverything goes into one of three folders and gets indexed.
SKILL.md # The skill definition (loaded on activation)
CLAUDE.md # Claude Code repo instructions
references/
INDEX.md # Master lookup table
historical/ # Pre-digital color science
*.md # Ostwald, Helmholtz, Bezold, Ridgway, ISCC-NBS,
# Moses Harris, Amy Sawyer, Lewis/Ladd-Franklin,
# Caravaggio's pigments, Itten critique...
pdfs/ # Source books from Archive.org (gitignored, ~236MB)
contemporary/ # Modern color science & theory
*.md # OKLAB articles, Briggs lectures, CSA webinars,
# Pixar Color Science, bird tetrachromacy, OLO,
# Acerola, Juxtopposed, Computerphile, GenColor paper...
huevaluechroma/ # Full scrape of David Briggs's site (11 chapters)
colorandcontrast/ # colorandcontrast.com extracted content
pdfs/ # Research papers (gitignored)
techniques/ # Tools, libraries, methods, practical application
*.md # Spectral.js, Culori, Color.js, RampenSau, Poline,
# RYBitten, PickyPalette, Color Buddy lint rules,
# APCA/Myndex, IQ cosine formula, Cubehelix,
# Tyler Hobbs generative color, Fontana approach,
# pixel art palettes, Book of Shaders, LYGIA,
# paint mixing lecture, color harmony lecture...
evals/
trigger-evals.json # Realistic should-trigger / should-not-trigger prompts
task-prompts.md # Realistic color tasks for qualitative review
MAINTENANCE.md # What belongs where, source quality bar, review rubric
ROADMAP.md # Planned scripts and future extensions
The repo now includes a minimal review loop rather than a heavy benchmarking framework:
evals/trigger-evals.json to sanity-check whether the frontmatter description is likely to trigger in the right situations.evals/task-prompts.md to test whether the skill answers realistic color questions at the right level.MAINTENANCE.md when deciding whether something belongs in SKILL.md, references/, or not in the repo at all.ROADMAP.md to track planned color-specific scripts and larger repo improvements.| Count | |
|---|---|
| Markdown reference files | 144 |
| Total words | ~286,000 |
| Source PDFs (local, gitignored) | 14 |
| Online tools catalogued | 48 |
| Video sources transcribed | 54+ |
The resources I keep returning to when explaining where color theory came from and where it went wrong:
The theory and science I reference when building tools or explaining why things work the way they do:
The practical resources — the tools I've built, use, or recommend:
Palette generation (actual algorithms, not pre-made swatches):
RampenSau, Poline, pro-color-harmonies, dittoTones, FarbVelo, IQ cosine formula, CSS-native generation with color-mix()
Color libraries: Culori (30 spaces, 10 distance metrics), Color.js (CSS spec editors, 154M downloads), @texel/color (5-125x faster), Spectral.js (Kubelka-Munk), RYBitten (26 historical cubes)
Analysis & linting: Color Buddy (38 lint rules), Censor (CAM16UCS, 20+ viz widgets), Color Palette Shader (WebGL2 Voronoi), colorsort-js (perceptual sorting)
Accessibility: APCA/Myndex (the WCAG 3 algorithm), apcach (contrast-first color composition), Bridge-PCA
Naming: color-name-lists (18 systems), color-description (emotional adjectives), Ridgway digitized JSON, colornerd (29,875 manufacturer swatches)
Generative art approaches: Tyler Hobbs (probability-weighted palettes), Harvey Rayner / Fontana (fully generative color), Piter Pasma (tweaked rainbow formula), mattdesl workshop, Book of Shaders, LYGIA shader library
Practical design: Pixel art palette construction, Goethe edge colors as a design hack, Cubehelix, color harmony lecture ("hue-first is a weak standalone heuristic; character-first often works better"), Aladdin color analysis, screen-to-print workflow
These aren't just preferences — they're supported by the research in the collection:
npx skills add meodai/skill.color-expert
Automatically detects your installed agents and places the skill in the correct directory. Works with Claude Code, Codex, Cursor, Copilot, OpenCode, and others.
Clone and symlink into your agent's skills directory:
git clone https://github.com/meodai/skill.color-expert ~/Sites/color-expert
| Agent | Symlink target |