/design-ops:palette [brand, mood, or existing colors]from design-ops
Generate a deep color system — oklch palettes, APCA contrast scores, dark mode, data-viz colors, gradients, and CSS custom properties.
Ships in design-ops. Installing the plugin adds it to Claude Code.
This command needs a brand, a mood, or existing colors to work from.
If the user invoked it with nothing and no target is evident from the conversation or open files, ask for it in one plain-language question and stop. Do not invent a target and do not produce generic output in place of the real work — output about something imaginary reads as authoritative and is worthless.
If a target is evident from context, use it and say which one you picked.
Generate a production-grade color system from a mood, sector, brand color, or open exploration. Every color is in OKLCH for perceptual uniformity, every text/background pair has APCA contrast scores, and every value is copy-paste ready.
This command goes deeper than /style on color alone. Use it when you need a standalone color system, want to refine an existing palette, or need specialized palettes (data visualization, gradients, brand extensions).
| Mode | Trigger | What Happens |
|---|---|---|
| Brand color | Provide a hex, oklch, or hsl value | Build entire system around that anchor |
| Mood | Provide a mood phrase ("warm minimal", "dark cyberpunk", "clean clinical") | Derive hues from mood semantics |
| Sector | Provide an industry ("fintech", "wellness", "SaaS") | Use sector color conventions |
| Explore | Say "explore" or provide no color input | Generate 3 distinct palette options to choose from |
| Refine | Provide an existing palette or .design-ops/style.json reference | Improve, extend, or audit what exists |
If .design-ops/style.json exists with color data from /style, load it as the starting point and extend/refine rather than regenerate from scratch.
Determine the primary brand hue based on input mode:
If brand color provided:
If mood provided:
If sector provided:
If explore mode:
Generate neutrals with slight hue tinting from the brand color. Pure gray is lifeless — good neutrals carry 0.005-0.015 chroma from the brand hue.
| Step | Token | OKLCH | Hex | Usage |
|---|---|---|---|---|
| 50 | neutral-50 | oklch(0.985 [c] [h]) | #... | Page background (light) |
| 100 | neutral-100 | oklch(0.965 [c] [h]) | #... | Raised surface, card bg |
| 150 | neutral-150 | oklch(0.945 [c] [h]) | #... | Subtle hover, table stripe |
| 200 | neutral-200 | oklch(0.925 [c] [h]) | #... | Border, divider |
| 300 | neutral-300 | oklch(0.87 [c] [h]) | #... | Disabled, placeholder |
| 400 | neutral-400 | oklch(0.71 [c] [h]) | #... | Helper text, icons |
| 500 | neutral-500 | oklch(0.55 [c] [h]) | #... | Secondary text |
| 600 | neutral-600 | oklch(0.445 [c] [h]) | #... | Body text |
| 700 | neutral-700 | oklch(0.37 [c] [h]) | #... | Strong body text |
| 800 | neutral-800 | oklch(0.27 [c] [h]) | #... | Heading text |
| 900 | neutral-900 | oklch(0.205 [c] [h]) | #... | Maximum contrast |
| 950 | neutral-950 | oklch(0.145 [c] [h]) | #... | Dark mode background |
The [c] chroma value is typically 0.005-0.015 (very subtle). The [h] hue matches the brand primary.
Build the primary color scale around the anchor hue.
Scale construction rules:
| Step | Token | OKLCH | Hex | Usage |
|---|---|---|---|---|
| 50 | brand-50 | oklch(0.97 0.02 [h]) | #... | Brand tint background |
| 100 | brand-100 | oklch(0.93 0.04 [h]) | #... | Light brand surface |
| 200 | brand-200 | oklch(0.87 0.08 [h]) | #... | Brand highlight |
| 300 | brand-300 | oklch(0.77 0.12 [h]) | #... | Brand border, tag bg |
| 400 | brand-400 | oklch(0.67 0.16 [h]) | #... | Hover state, secondary |
| 500 | brand-500 | oklch(0.55 0.18 [h]) | #... | Primary brand (hero) |
| 600 | brand-600 | oklch(0.48 0.16 [h]) | #... | Active/pressed state |
| 700 | brand-700 | oklch(0.40 0.14 [h]) | #... | Brand text on light bg |
| 800 | brand-800 | oklch(0.33 0.11 [h]) | #... | Dark brand accent |
| 900 | brand-900 | oklch(0.27 0.08 [h]) | #... | Brand on dark surface |
| 950 | brand-950 | oklch(0.20 0.05 [h]) | #... | Deepest brand |
Chroma values are maximums — actual values depend on the hue's gamut at each lightness level. Clamp to sRGB gamut.
Generate a secondary color using one of these strategies (choose based on sector/mood):
| Strategy | Hue Relationship | Best For |
|---|---|---|
| Analogous | +/- 30 degrees | Professional, harmonious (SaaS, fintech) |
| Complementary | +180 degrees | High energy, strong contrast (e-commerce, gaming) |
| Split-complementary | +150 / +210 degrees | Balanced variety (marketplace, social) |
| Triadic | +120 / +240 degrees | Vibrant, diverse (creative tools, media) |
Generate a full 10-step scale for the secondary color using the same OKLCH construction rules.
Optionally generate an accent color (a third hue) if the design calls for it — typically for CTAs that need to stand apart from both brand and secondary.
| Token | Light Mode OKLCH | Light Hex | Dark Mode OKLCH | Dark Hex | Usage |
|---|---|---|---|---|---|
| success-50 | oklch(0.96 0.03 145) | #... | oklch(0.20 0.04 145) | #... | Success bg |
| success-100 | oklch(0.91 0.06 145) | #... | oklch(0.25 0.06 145) | #... | Success light |
| success-500 | oklch(0.55 0.17 145) | #... | oklch(0.65 0.17 145) | #... | Success primary |
| success-700 | oklch(0.38 0.13 145) | #... | oklch(0.80 0.10 145) | #... | Success text |
| warning-50 | oklch(0.96 0.04 85) | #... | oklch(0.20 0.04 85) | #... | Warning bg |
| warning-100 | oklch(0.91 0.08 85) | #... | oklch(0.25 0.06 85) | #... | Warning light |
| warning-500 | oklch(0.72 0.17 85) | #... | oklch(0.75 0.15 85) | #... | Warning primary |
| warning-700 | oklch(0.45 0.12 85) | #... | oklch(0.85 0.10 85) | #... | Warning text |
| error-50 | oklch(0.96 0.03 27) | #... | oklch(0.20 0.04 27) | #... | Error bg |
| error-100 | oklch(0.91 0.06 27) | #... | oklch(0.25 0.06 27) | #... | Error light |
| error-500 | oklch(0.55 0.22 27) | #... | oklch(0.65 0.20 27) | #... | Error primary |
| error-700 | oklch(0.38 0.16 27) | #... | oklch(0.80 0.12 27) | #... | Error text |
| info-50 | oklch(0.96 0.02 250) | #... | oklch(0.20 0.03 250) | #... | Info bg |
| info-100 | oklch(0.91 0.05 250) | #... | oklch(0.25 0.05 250) | #... | Info light |
| info-500 | oklch(0.55 0.15 250) | #... | oklch(0.65 0.15 250) | #... | Info primary |
| info-700 | oklch(0.38 0.12 250) | #... | oklch(0.80 0.08 250) | #... | Info text |
For every functional text/background pairing, compute the APCA Lc (Lightness Contrast) value. APCA is the successor to WCAG 2.x contrast ratios and provides more accurate readability predictions.
APCA Minimum Thresholds:
| Content Type | Minimum Lc | Notes |
|---|---|---|
| Body text (16px+) | Lc 60 | Standard readability |
| Large text (24px+) | Lc 45 | Headings, display |
| Sub-text / captions (< 16px) | Lc 75 | Small text needs more contrast |
| Non-text UI (icons, borders) | Lc 30 | Functional elements |
| Disabled / placeholder | Lc 30 | Intentionally low, but still visible |
| Focus indicator | Lc 40 | Against adjacent colors |
Verification Table:
| Pair Name | Foreground | Background | APCA Lc | WCAG 2.2 | Body? | Large? | Status |
|---|---|---|---|---|---|---|---|
| Primary text on page | neutral-900 | neutral-50 | Lc 106 | 19.2:1 | Pass | Pass | OK |
| Secondary text on page | neutral-600 | neutral-50 | Lc 62 | 7.3:1 | Pass | Pass | OK |
| Brand text on page | brand-700 | neutral-50 | Lc ... | ...:1 | ... | ... | ... |
| Text on brand button | neutral-50 | brand-500 | Lc ... | ...:1 | ... | ... | ... |
| Success text on success bg | success-700 | success-50 | Lc ... | ...:1 | ... | ... | ... |
| Error text on error bg | error-700 | error-50 | Lc ... | ...:1 | ... | ... | ... |
| ... (all functional pairs) | ... | ... | ... | ... | ... | ... | ... |
Flag any failing pairs with the fix applied (e.g., "Shifted foreground from 600 to 700 to reach Lc 60").
Dark mode is NOT lightness inversion. Apply these transformation rules:
Background strategy:
Text strategy:
Brand color strategy:
Semantic color strategy:
Border strategy:
Shadow strategy:
Output the complete dark mode palette in the same table format as light mode.
Generate purpose-built palettes for charts and graphs. These are separate from the UI palette.
8a. Categorical Palette (6-8 colors)
For bar charts, pie charts, legends where each color represents a different category.
| # | Name | OKLCH | Hex | Colorblind Safe |
|---|---|---|---|---|
| 1 | viz-cat-1 | oklch(...) | #... | Yes — distinct hue |
| 2 | viz-cat-2 | oklch(...) | #... | Yes — distinct hue |
| 3 | viz-cat-3 | oklch(...) | #... | Yes — distinct hue |
| 4 | viz-cat-4 | oklch(...) | #... | Yes — distinct hue |
| 5 | viz-cat-5 | oklch(...) | #... | Yes — distinct hue |
| 6 | viz-cat-6 | oklch(...) | #... | Yes — distinct hue |
Rules:
8b. Sequential Palette (single hue, 5-7 steps)
For heatmaps, choropleth maps, single-variable intensity.
| Step | OKLCH | Hex | Value Mapping |
|---|---|---|---|
| 1 (low) | oklch(0.95 0.02 [h]) | #... | Minimum value |
| 2 | oklch(0.85 0.06 [h]) | #... | Low |
| 3 | oklch(0.72 0.10 [h]) | #... | Below average |
| 4 | oklch(0.60 0.14 [h]) | #... | Average |
| 5 | oklch(0.48 0.16 [h]) | #... | Above average |
| 6 | oklch(0.36 0.14 [h]) | #... | High |
| 7 (high) | oklch(0.25 0.10 [h]) | #... | Maximum value |
Hue should match or complement the brand primary.
8c. Diverging Palette (two hues, 7-9 steps)
For data with a meaningful midpoint (profit/loss, above/below average, sentiment).
| Step | OKLCH | Hex | Value Mapping |
|---|---|---|---|
| 1 (neg extreme) | oklch(0.35 0.15 [h1]) | #... | Strong negative |
| 2 | oklch(0.45 0.12 [h1]) | #... | Moderate negative |
| 3 | oklch(0.60 0.08 [h1]) | #... | Slight negative |
| 4 (neutral) | oklch(0.92 0.01 0) | #... | Midpoint / zero |
| 5 | oklch(0.60 0.08 [h2]) | #... | Slight positive |
| 6 | oklch(0.45 0.12 [h2]) | #... | Moderate positive |
| 7 (pos extreme) | oklch(0.35 0.15 [h2]) | #... | Strong positive |
Common diverging hue pairs: red-blue, orange-teal, purple-green. Avoid red-green.
Generate 4-6 gradient recipes using the palette colors. Each is CSS-ready.
| Name | CSS | Usage |
|---|---|---|
| Brand subtle | linear-gradient(135deg, oklch(0.97 0.02 [h]) 0%, oklch(0.95 0.03 [h2]) 100%) | Card backgrounds, hero sections |
| Brand bold | linear-gradient(135deg, oklch(0.55 0.18 [h]) 0%, oklch(0.45 0.16 [h+30]) 100%) | CTA buttons, brand banners |
| Warm glow | radial-gradient(ellipse at top, oklch(0.96 0.04 40) 0%, oklch(0.99 0.01 0) 70%) | Page background accent |
| Dark surface | linear-gradient(180deg, oklch(0.18 0.01 [h]) 0%, oklch(0.14 0.01 [h]) 100%) | Dark mode card variation |
| Mesh (multi-stop) | background: oklch(0.97 0.01 [h]); background-image: radial-gradient(at 40% 20%, oklch(0.95 0.04 [h1]) 0px, transparent 50%), radial-gradient(at 80% 0%, oklch(0.94 0.03 [h2]) 0px, transparent 50%) | Hero backgrounds, landing pages |
Output a complete, copy-paste CSS block.
/* ============================================================
Color System — [Context]
Generated by Design Ops /palette
OKLCH-first, sRGB hex fallbacks in comments
============================================================ */
:root {
/* --- Neutral --- */
--color-neutral-50: oklch(0.985 0.005 [h]); /* #... */
--color-neutral-100: oklch(0.965 0.005 [h]); /* #... */
--color-neutral-150: oklch(0.945 0.005 [h]); /* #... */
--color-neutral-200: oklch(0.925 0.005 [h]); /* #... */
--color-neutral-300: oklch(0.87 0.005 [h]); /* #... */
--color-neutral-400: oklch(0.71 0.005 [h]); /* #... */
--color-neutral-500: oklch(0.55 0.005 [h]); /* #... */
--color-neutral-600: oklch(0.445 0.005 [h]); /* #... */
--color-neutral-700: oklch(0.37 0.005 [h]); /* #... */
--color-neutral-800: oklch(0.27 0.005 [h]); /* #... */
--color-neutral-900: oklch(0.205 0.005 [h]); /* #... */
--color-neutral-950: oklch(0.145 0.005 [h]); /* #... */
/* --- Brand Primary --- */
--color-brand-50: oklch(...); /* #... */
--color-brand-100: oklch(...); /* #... */
--color-brand-200: oklch(...); /* #... */
--color-brand-300: oklch(...); /* #... */
--color-brand-400: oklch(...); /* #... */
--color-brand-500: oklch(...); /* #... hero */
--color-brand-600: oklch(...); /* #... */
--color-brand-700: oklch(...); /* #... */
--color-brand-800: oklch(...); /* #... */
--color-brand-900: oklch(...); /* #... */
--color-brand-950: oklch(...); /* #... */
/* --- Secondary --- */
--color-secondary-50: oklch(...); /* #... */
/* ... full scale ... */
--color-secondary-950: oklch(...); /* #... */
/* --- Semantic --- */
--color-success-50: oklch(...);
--color-success-100: oklch(...);
--color-success-500: oklch(...);
--color-success-700: oklch(...);
--color-warning-50: oklch(...);
--color-warning-100: oklch(...);
--color-warning-500: oklch(...);
--color-warning-700: oklch(...);
--color-error-50: oklch(...);
--color-error-100: oklch(...);
--color-error-500: oklch(...);
--color-error-700: oklch(...);
--color-info-50: oklch(...);
--color-info-100: oklch(...);
--color-info-500: oklch(...);
--color-info-700: oklch(...);
/* --- Semantic Aliases (Light) --- */
--color-bg: var(--color-neutral-50);
--color-bg-subtle: var(--color-neutral-100);
--color-bg-muted: var(--color-neutral-150);
--color-bg-emphasis: var(--color-brand-500);
--color-fg: var(--color-neutral-900);
--color-fg-muted: var(--color-neutral-600);
--color-fg-subtle: var(--color-neutral-500);
--color-fg-on-emphasis: var(--color-neutral-50);
--color-border: var(--color-neutral-200);
--color-border-strong: var(--color-neutral-300);
--color-border-brand: var(--color-brand-500);
/* --- Data Visualization --- */
--color-viz-cat-1: oklch(...);
--color-viz-cat-2: oklch(...);
--color-viz-cat-3: oklch(...);
--color-viz-cat-4: oklch(...);
--color-viz-cat-5: oklch(...);
--color-viz-cat-6: oklch(...);
/* --- Gradients --- */
--gradient-brand-subtle: linear-gradient(
135deg,
var(--color-brand-50) 0%,
var(--color-secondary-50) 100%
);
--gradient-brand-bold: linear-gradient(
135deg,
var(--color-brand-500) 0%,
var(--color-secondary-500) 100%
);
}
/* --- Dark Mode --- */
[data-theme="dark"],
.dark {
--color-bg: var(--color-neutral-950);
--color-bg-subtle: var(--color-neutral-900);
--color-bg-muted: var(--color-neutral-800);
--color-bg-emphasis: var(--color-brand-400);
--color-fg: oklch(0.93 0.005 [h]);
--color-fg-muted: var(--color-neutral-400);
--color-fg-subtle: var(--color-neutral-500);
--color-fg-on-emphasis: var(--color-neutral-950);
--color-border: oklch(1 0 0 / 0.1);
--color-border-strong: oklch(1 0 0 / 0.18);
--color-border-brand: var(--color-brand-400);
/* Semantic shifts for dark mode */
--color-success-50: oklch(0.2 0.04 145);
--color-success-500: oklch(0.65 0.17 145);
--color-success-700: oklch(0.8 0.1 145);
--color-warning-50: oklch(0.2 0.04 85);
--color-warning-500: oklch(0.75 0.15 85);
--color-warning-700: oklch(0.85 0.1 85);
--color-error-50: oklch(0.2 0.04 27);
--color-error-500: oklch(0.65 0.2 27);
--color-error-700: oklch(0.8 0.12 27);
--color-info-50: oklch(0.2 0.03 250);
--color-info-500: oklch(0.65 0.15 250);
--color-info-700: oklch(0.8 0.08 250);
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
/* Same dark overrides */
}
}
All (...) values are replaced with actual computed values at generation time.
.design-ops/style.json/palette owns tokens.color and nothing else. Follow design-memory: load the
file, deep-merge your subtree, append "/palette" to meta.updatedBy, write it
back.
Merge the neutral, brand, secondary, semantic, data-viz and gradient scales into
tokens.color, and the dark-mode deltas into tokens.$themes.dark.color.
Do not replace the file. A whole-file write here discards the type scale, the
spacing system, the tone and the reference apps that /style decided.
## Palette: [Context — mood / sector / brand color]
### Anchor Color
[Hue selection rationale, OKLCH value, mood/sector reasoning]
### Neutral Scale
[Full 12-step table with oklch + hex + usage]
### Brand Primary Scale
[Full 11-step table]
### Secondary Scale
[Full 11-step table with relationship strategy explained]
### Semantic Colors
[Success/warning/error/info — light + dark mode values]
### APCA Contrast Verification
[Every functional pair with Lc score and pass/fail]
### Dark Mode Palette
[Complete transformation with strategy notes]
### Data Visualization
[Categorical (6-8), Sequential (5-7), Diverging (7-9) — all colorblind verified]
### Gradient Recipes
[4-6 CSS-ready gradients]
### CSS Custom Properties
[Complete copy-paste block with light + dark themes]
### Saved
> Palette saved to `.design-ops/style.json` — available to `/style`, `/type`, `/tokens`, `/screen`, `/component`
For every categorical and diverging palette, verify distinguishability under:
| Condition | Prevalence | Hue Confusion Pairs | Verification Method |
|---|---|---|---|
| Protanopia (no red) | 1.3% male | Red-green | Simulate and check unique lightness per color |
| Deuteranopia (no green) | 6% male | Red-green | Simulate and check unique lightness per color |
| Tritanopia (no blue) | 0.01% | Blue-yellow | Simulate and check unique lightness per color |
| Achromatopsia (no color) | 0.003% | All hues | Ensure unique lightness for every category |
Strategy: When hues become confusable under simulation, ensure each color has a unique lightness value so they remain distinguishable even without hue discrimination. This is the primary advantage of working in OKLCH — lightness is perceptually calibrated.
When generating palettes, draw knowledge from:
color-palette-library skill for 500+ curated palette references and industry conventionsui-visual-design-system skill for color theory, harmony models, and perceptual principlesvisual-design-mastery skill for color scoring, canonical color rules, and design critiqueaccessibility-inclusive-design skill for WCAG 2.2/3.0, APCA methodology, and colorblind designdata-visualization-mastery skill for data-viz-specific color requirements and chart palette designcross-cultural-i18n-ux skill for cultural color associations and localizationsector-style-intelligence skill for sector-specific color conventions and psychologydesign-token-presets skill for pre-built color token systems as starting pointsNext -> /type — Generate typography system to pair with this palette
Or -> /style — Full visual identity (color + type + spacing + motion + tone)
Or -> /tokens — Export palette as production W3C design tokens
Or -> /dark — Deep-dive dark mode with surface elevation strategy
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
Generated from the plugin's indexed repository (shotcowboystyle/design-ops-plugin) — no native marketplace selected
npx claudepluginhub p/shotcowboystyle-design-ops39 commands in this plugin
/a11yA11y — Accessibility AuditAccessibility audit — WCAG 2.2 AA full checklist, ARIA audit, keyboard navigation, color contrast (APCA), focus management, screen reader, cognitive a11y, with code fixes./ai-auditAI UX Audit CommandAudit AI-powered features against agentic, trust, safety, and interaction best practices with scoring and specific fix recommendations./animateAnimate — Animation Recipe GeneratorGenerate production animations — CSS keyframes, Framer Motion, scroll-driven, micro-interactions, with reduced motion fallbacks./auditAudit — Comprehensive Design AuditComprehensive design audit — heuristic, cognitive, flow, fortification, cognitive load analysis, and summary scoring in one command. Run all lenses or pick specific sections./before-afterBefore / After — Transformation ProofBefore/after comparison — show exactly how AI-generated slop transforms into production-quality UI. Visual proof of every design improvement./benchmarkBenchmark — Competitive Design AnalysisCompetitive analysis — 10-dimension scorecard, gap analysis, improvement roadmap, and differentiation strategy.Other plugins' commands for the same job