- Home
- Skills
- UX & UI Design
- Design Tokens & Dark Mode — OKLCH + Tailwind v4
Works with the AI Agents you already use
Design Tokens & Dark Mode — OKLCH + Tailwind v4
Generate production-ready design token systems with light/dark modes, OKLCH scales, and Tailwind v4 exports.
Free
Design Tokens & Dark Mode — OKLCH + Tailwind v4
Example session with this skill installed
Create a design token system for a fintech app using #0052FF as the brand color. I need light/dark mode and Tailwind v4 CSS. Grep the src folder for any existing values first.
- Read your context and instructions
- Compiled the design tokens
I have analyzed the source files and identified 12 unique hex codes. I clustered these into a unified OKLCH scale and mapped them to a semantic token system.
Fintech Design System Tokens
@import "tailwindcss";
@theme {
/* Primitive Scale: Accent Blue */
--color-blue-50: oklch(0.96 0.02 255);
--color-blue-500: oklch(0.62 0.22 255); /* Brand #0052FF */
--color-blue-600: oklch(0.55 0.22 255);
--color-blue-950: oklch(0.18 0.08 255);
/* Primitive Scale: Neutral */
--color-neutral-50: oklch(0.98 0.005 255);
--color-neutral-900: oklch(0.25 0.01 255);
--color-neutral-950: oklch(0.15 0.01 255);
/* Layout Scales */
--spacing-1: 4px;
--spacing-4: 16px;
--radius-md: 8px;
}
:root {
--surface-base: var(--color-neutral-50);
--text-primary: var(--color-neutral-950);
--action-bg: var(--color-blue-600);
--border-default: var(--color-neutral-200);
color-scheme: light;
}
[data-theme="dark"] {
--surface-base: var(--color-neutral-950);
--text-primary: var(--color-neutral-50);
--action-bg: var(--color-blue-500);
--border-default: var(--color-neutral-800);
color-scheme: dark;
}
@theme inline {
--color-surface: var(--surface-base);
--color-fg: var(--text-primary);
--color-action: var(--action-bg);
}
| Semantic Pair | Light Ratio | Dark Ratio | Status |
|---|---|---|---|
| text.primary / surface.base | 14.5:1 | 12.8:1 | PASS |
| action.bg / surface.base | 5.2:1 | 4.8:1 | PASS |
| text.secondary / surface.base | 6.1:1 | 5.4:1 | PASS |
Next steps
- Add the provided
<script>toggle to your<head>to prevent dark mode flickering. - Replace raw classes like
text-[#0052FF]with the semantictext-action. - Review the
tokens.jsonfile for integration with Figma or other design tools.
Connects securely to your tools. The creator never sees your data.
About this skill
Hardcoded hex values and inconsistent spacing make codebases difficult to maintain and nearly impossible to theme. This skill transforms fragmented styles into a multi-tier design token system for production web apps.
What it does
- Multi-tier token architecture builds systems using primitive, semantic, and component-level tokens for maximum flexibility.
- Color scale generation creates perceptually uniform OKLCH scales for neutrals, accents, and status colors.
- Light and dark mapping defines semantic pairs like
surface.baseandtext.primarythat swap automatically. - Codebase extraction greps existing repos to cluster raw values and identify "drift" for cleanup.
- Accessibility verification checks every semantic pair against WCAG 4.5:1 and 3:1 contrast ratios.
- Multi-format export generates CSS variables, Tailwind v4
@themeblocks, and W3C DTCG JSON.
How it works
- Analyze the brand brief or existing codebase to identify core colors, typography, and density requirements.
- Build the primitive scales for colors (steps 50-950), spacing (4px base), and typography (1.25 ratio).
- Map semantic tokens to light and dark modes, ensuring elevation is handled via surface steps rather than shadows in dark mode.
- Export the final token manifest to
tokens.jsonand a production-ready CSS/Tailwind configuration.
Frameworks & tools
Specifically designed for modern web development using Tailwind CSS v4, CSS Variables, and the W3C Design Token Community Group (DTCG) standard. It utilizes oklch for color space precision and supports any framework that consumes CSS or JSON.
Why this beats prompting it yourself
Standard LLMs often generate random hex values that lack perceptual uniformity and ignore contrast accessibility. This skill enforces a strict three-tier architecture and uses specific mathematical scales for spacing and type, ensuring your UI remains consistent as it scales.
Use cases
- Add a professional dark mode to an existing React or Next.js application.
- Unify inconsistent margins and colors in a legacy CSS codebase.
- Scaffold a design system for a new project starting from a single brand color.
- Export design tokens from a codebase into a JSON format for design tool syncing.
Known limitations
Does not support Tailwind v3 config files. Requires the codebase to be accessible for the extract mode to identify raw hex and RGB values.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for UX & UI Design.
Supports Tailwind v4 only. Requires existing codebase access for extraction. Focuses on CSS/web platforms; no native mobile (SwiftUI/XML) export provided.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
1 use
Times used to date
Free to use
No account required to browse
Trust & safety
Security scan
Security scan passed 5 days ago
- Free with an Agensi account