skills/color-theory-palette-harmony-expert/SKILL.md
Expert in color theory, palette harmony, and perceptual color science for computational photo composition. Specializes in earth-mover distance optimization, warm/cool alternation, diversity-aware palette selection, and hue-based photo sequencing. Activate on "color palette", "color harmony", "warm cool", "earth mover distance", "Wasserstein", "LAB space", "hue sorted", "palette matching". NOT for basic RGB manipulation (use standard image processing), single-photo color grading (use native-app-designer), UI color schemes (use vaporwave-glassomorphic-ui-designer), or color blindness simulation (accessibility specialists).
npx skillsauth add curiositech/windags-skills color-theory-palette-harmony-expertInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are an expert in perceptual color science for computational photo composition, specializing in optimal transport methods and diversity-aware palette selection.
Is the collection size known?
├─ YES: Large collection (>100 photos)
│ ├─ Diversity λ < 0.6? → Use DPP sampling for better variety
│ └─ Diversity λ ≥ 0.6? → Use MMR with Sinkhorn EMD (faster)
└─ NO: Small collection (<100 photos)
├─ Target harmony > 0.8? → Pure EMD matching, skip diversity
├─ Mixed styles? → MMR with λ=0.7
└─ Unknown quality? → Start with λ=0.5, adjust based on results
What's the input format?
├─ RGB photos → Always convert to LAB first (deltaE calculations need LAB)
├─ Already LAB → Proceed directly
└─ HSV/HSL → Convert RGB→LAB (HSV not perceptually uniform)
Is perceptual accuracy critical?
├─ YES → Use CIEDE2000 (most accurate, slower)
├─ SPEED critical → Use Euclidean LAB distance (faster approximation)
└─ BALANCED → Use deltaE94 (middle ground)
What's the desired visual impact?
├─ DRAMATIC → Neutral-with-accent (85% muted, 15% vivid)
│ └─ Accent placement? → Golden ratio positions (0.382, 0.618)
├─ SMOOTH → Hue-sorted gradient
│ ├─ Full spectrum? → 360° hue range
│ └─ Limited range? → Analogous hues only
├─ RHYTHMIC → Warm/cool alternation
│ └─ Strict alternation vs temperature waves?
└─ BALANCED → Temperature-balanced grid (equal warm/cool distribution)
Symptoms: Selected photos all have similar dominant colors (e.g., all blues, all warm tones) Detection Rule: If max pairwise EMD between selected palettes < 0.3, you have diversity collapse Root Cause: λ parameter too high (>0.8) or no diversity penalty applied Fix: Reduce λ to 0.6-0.7, or switch from pure EMD to MMR algorithm
Symptoms: Mathematically similar colors that humans perceive as clashing Detection Rule: If EMD < 0.4 but human feedback rates harmony < 3/5, you have perceptual mismatch Root Cause: Using RGB/HSV distance instead of perceptual LAB space Fix: Always use LAB space with CIEDE2000, validate against human-labeled training data
Symptoms: Abrupt warm-to-cool transitions creating visual discord Detection Rule: If adjacent photos have |b_value| difference > 40 in LAB space, flag transition Root Cause: No temperature-aware arrangement or poor b-axis thresholding Fix: Implement temperature wave pattern or enforce minimum transition buffer zones
Symptoms: All selected photos have similar chroma levels, lacking visual interest Detection Rule: If chroma standard deviation < 15 across selected palettes, you have saturation monotony Root Cause: No chroma diversity in selection criteria Fix: Add chroma variance term to objective function: score += 0.1 * chroma_diversity_bonus
Symptoms: Sinkhorn algorithm doesn't converge, returns suboptimal distances Detection Rule: If Sinkhorn iterations > 100 or relative error > 0.01, optimization failed Root Cause: ε parameter too small (<0.05) or cost matrix poorly conditioned Fix: Increase ε to 0.1, add regularization to cost matrix, or fall back to exact EMD
Scenario: User has 50 beach photos (all blues/whites) and wants 12 for a collage
Step 1 - Diagnosis:
Step 2 - Palette Analysis:
Photo_001: LAB palette [(65, -8, -25), (45, 2, -15), (85, -5, -10)] → Ocean, sand, sky
Photo_023: LAB palette [(70, -12, -30), (40, 5, -20), (90, -3, -8)] → Similar but darker water
Step 3 - MMR Selection:
Expert Insight: Novice would select by harmony only → all similar blues. Expert catches diversity need early.
Scenario: Wedding photos with mixed indoor (warm 3200K) and outdoor (cool 5600K) lighting
Step 1 - White Balance Detection:
Indoor photos: Average b-value = +25 (warm/yellow bias)
Outdoor photos: Average b-value = -20 (cool/blue bias)
Temperature gap: 45 LAB units (significant)
Step 2 - Global Color Grading Decision:
Step 3 - Affine Transform:
# Map warm indoor colors toward neutral
indoor_transform = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 0.7]]) # Reduce b-channel
# Map cool outdoor colors toward neutral
outdoor_transform = np.array([[1, 0, 0], [0, 1, 0], [0, 0, -0.3]]) # Increase b-channel
Result: Temperature difference reduced to 20 LAB units while preserving natural lighting character
Do NOT use this skill for:
When to delegate:
tools
Building resilient distributed systems with circuit breakers, retries with full-jitter exponential backoff, retry budgets (per-request 3-attempt + per-client 10% ratio per Google SRE), deadline propagation, and the cascading-failure math (4 layers × 3 retries = 64x amplification). Grounded in Resilience4j, Microsoft Cloud Patterns, AWS Architecture Blog (Marc Brooker), and Google SRE Book.
testing
Designing HTTP cache headers that work correctly across browsers, CDNs, and shared proxies — `Cache-Control` directives per RFC 9111, `stale-while-revalidate` and `stale-if-error` per RFC 5861, the Vary header for varying responses, and surrogate keys for tag-based purging. Grounded in IETF RFCs and Cloudflare/Fastly docs.
development
Use when designing or fixing a Content Security Policy on a real site, choosing between nonce-based and hash-based CSP, adding strict-dynamic, debugging "Refused to execute inline script" errors, deploying CSP in report-only mode first, configuring report-to / report-uri, or auditing an existing policy for unsafe-inline / unsafe-eval / wildcards. Triggers: "CSP blocks legitimate inline script", strict-dynamic, nonce-{RANDOM}, sha256-{HASH}, object-src none, base-uri none, frame-ancestors, Trusted Types, X-Content-Security-Policy obsolete, report-only vs enforced. NOT for general HTTP security headers (HSTS, COOP/COEP), Trusted Types deep dive, CORS configuration, or building a WAF.
tools
Choosing and operating an HTTP API versioning strategy that doesn't break clients — Stripe's date-based pinned versions, the Deprecation/Sunset header pair (RFC 9745 + RFC 8594), URI vs header vs media-type approaches, and the version-transformer pattern. Grounded in Stripe's published architecture and IETF RFCs.