izynu/chromary / skills/gradient-smith
gradient-smith
VerifiedCreate smooth, perceptual CSS gradients with no gray dead zones. Handles linear, radial, conic, mesh and grainy gradients interpolated in OKLab/OKLCH. Use when the user asks for a gradient, says their gradient looks muddy or gray in the middle, or wants modern CSS gradient code.
Gradient Smith
Gradients that stay vivid from stop to stop, because they're interpolated in a perceptual space, not sRGB.
When to use
- "Make a gradient from X to Y" / hero backgrounds / buttons / borders
- "My gradient goes gray/brown in the middle" ← the classic sRGB bug
- Mesh backgrounds, animated gradients, grainy textures
Workflow
- Diagnose the pair: two colors, or a color list? Hue-span crossing 180°+ (e.g. yellow→blue) is where sRGB dies.
- Choose the space:
- 2 similar-hue stops →
in oklabis enough. - Big hue sweep or pastel-critical work →
in oklch(or explicit multi-stops).
- 2 similar-hue stops →
- Write the CSS with CSS Color 4 interpolation syntax.
- Hunt dead zones: mentally walk the ramp; if any midpoint desaturates, insert explicit midpoint stop(s) with full chroma.
- Finish the surface: grain overlay for banding, size/units check, motion rules if animated.
- Verify text on it: pick the worst-case region of the gradient and check 4.5:1 for any text that sits there.
Decision rules
| Want | Recipe |
|---|---|
| Simple smooth ramp | linear-gradient(in oklab, #F97316, #22C55E) |
| Big hue sweep, keep punch | linear-gradient(in oklch longer hue, gold, dodgerblue) or add midpoint stops |
| Radial glow | radial-gradient(in oklab, oklch(80% .15 150 / .9), transparent 70%) |
| Angular / conic wheel | conic-gradient(in oklch longer hue, red, red) (hue wheel, constant L/C) |
| Mesh hero | 3 to 5 layered radial-gradients + base color (see recipe) |
| Kill banding | overlay feTurbulence SVG noise at 4 to 8% opacity |
| Animate cheaply | @property --angle + rotate a conic; or translate an oversized gradient layer, never animate filter: blur() on large areas |
Hard gates
- Never interpolate brand-to-brand hues in raw sRGB when
in oklabis one keyword away. - Any text over a gradient: verified ≥ 4.5:1 against the gradient's lightest and darkest region.
- Animated gradients must respect
prefers-reduced-motion. - No gradient-on-gradient-on-gradient soup: max 2 competing gradient layers per section (texture overlays don't count).
Output format
A single copy paste CSS block (with the in oklab/oklch keywords) + one line naming the interpolation space and why + any midpoint stops you added and why.
Example
User: "yellow → blue gradient keeps turning green-gray."
→ linear-gradient(in oklab, oklch(90% .18 95), oklch(65% .17 250)); if a dull middle persists, insert oklch(78% .16 170 / 1) 50%. Report: interpolated in OKLab, midpoint added to preserve chroma; white text passes only over the left 40% → recommended scrim.
Part of Chromary · deep dive: 07 · CSS gradients · recipe: gradient-interpolation.js
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |