
applying-themes
Use when a visual artifact needs a consistent color and type system applied — slide decks, reports, HTML pages, dashboards, PDFs, docs — or when asked to "theme this", "restyle with a palette", "make these slides look consistent", "pick colors and fonts", or to build a custom theme from a brand or a description. Provides 10 contrast-verified themes with semantic tokens and a checker script.
- Installs
- 117
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/osmontero/opencode-skills --skill applying-themes- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads applying-themes automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Applying Themes
Overview
A theme is a complete set of semantic tokens, not a list of nice colors. Four hex values with no defined roles produce inconsistent output, because every component has to decide for itself which one is text and which one is background.
Core principle: Every theme resolves to the same eight tokens. Components reference token names, never hex values. Swapping the theme then means swapping one block.
base surface line ink ink-2 ink-3 accent accent-ink
The Iron Law
NO THEME APPLIED WITHOUT ITS CONTRAST VERIFIED
A palette that looks good and fails 4.5:1 is unusable, and contrast is not eyeballable — mid-tone accents on mid-tone surfaces fail constantly while looking fine. Every bundled theme ships with a machine-checkable contrast block. Custom themes get the same treatment before use.
Checklist
- Present the themes — the table below, with what each is for
- Get an explicit choice — do not assume one
- Read the theme file —
themes/<name>.mdis the source of truth - Verify contrast — run the checker; for a custom theme this is mandatory
- Emit the token block — once, at the top of the artifact
- Apply by token name — no raw hex anywhere in components
- Check the render — look at the output, especially secondary text
The Themes
| Theme | Character | Base | Best for |
|---|---|---|---|
ocean-depths | Deep maritime calm | Dark | Financial, consulting, infrastructure |
sunset-boulevard | Golden-hour warmth | Light | Creative, launches, hospitality |
forest-canopy | Grounded earth tones | Light | Sustainability, craft, long-form |
modern-minimalist | Grayscale discipline | Light | Docs, portfolios, systems |
golden-hour | Amber richness | Light | Reviews, food, retrospectives |
arctic-frost | Cold clinical clarity | Light | Medical, analytics, compliance |
desert-rose | Dusty sophistication | Light | Boutique, invitations, wellness |
tech-innovation | Terminal high-contrast | Dark | Dev tools, AI, changelogs, status |
botanical-garden | Cultivated and alive | Light | Food, agriculture, community |
midnight-galaxy | Deep-space drama | Dark | Launches, entertainment, keynotes |
Each themes/<name>.md carries the full palette with roles, the contrast requirements, a web font pairing plus a metric-safe PDF fallback, the scale ratio, and notes on how the theme fails if misused.
theme-showcase.pdfis a legacy visual from an earlier version of this skill and its colors and fonts no longer match the theme files. The markdown files are authoritative. Do not present the PDF as an accurate preview.
Presenting and Choosing
Show the table, ask once, and wait. Do not apply a theme without an explicit choice — restyling an entire deck to the wrong palette wastes more time than the question costs.
If the user describes a need rather than naming a theme ("something serious for a board deck"), recommend two with one-line reasoning and let them pick.
Verifying Contrast
source ~/.local/opencode-venv/bin/activate
python3 scripts/check_contrast.py themes/ocean-depths.md # one theme
python3 scripts/check_contrast.py themes/*.md # all of them
python3 scripts/check_contrast.py --pair "#8a7357" "#fbf5ea" # ad-hoc pair
Exit code is non-zero on any failure, so it works as a gate. All ten bundled themes pass all six checks.
Applying
HTML / CSS
Emit the token block once in :root, then reference tokens only.
:root {
--base: #0f1c26; --surface: #16283a; --line: #2d4859;
--ink: #eef6f8; --ink-2: #accad4; --ink-3: #8aa7b3;
--accent: #4fd1c5; --accent-ink: #04222a;
--font-display: "Young Serif", Georgia, serif;
--font-text: "IBM Plex Sans", system-ui, sans-serif;
}
body { background: var(--base); color: var(--ink); font-family: var(--font-text); }
h1, h2 { font-family: var(--font-display); }
.card { background: var(--surface); border: 1px solid var(--line); }
.meta { color: var(--ink-3); }
.btn { background: var(--accent); color: var(--accent-ink); }
No raw hex outside :root. Grep for # in your component styles before finishing — a stray hex is how themes stop being swappable.
Both Color Schemes
If the artifact must work in light and dark, pick a light theme and a dark theme and map them to the same token names:
:root { /* forest-canopy tokens */ }
@media (prefers-color-scheme: dark) { :root { /* ocean-depths tokens */ } }
:root[data-theme="dark"] { /* ocean-depths tokens */ }
:root[data-theme="light"] { /* forest-canopy tokens */ }
Both the media query and the explicit attribute — a toggle that cannot override the OS preference in both directions is broken.
PDF and Slides
Use the PDF / slides column from the theme's typography table. Web fonts are frequently unavailable to PDF renderers, and a missing font silently substitutes something with different metrics, which breaks every layout that assumed the original.
from reportlab.lib.colors import HexColor
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
BASE, SURFACE, LINE = HexColor("#f7f6f0"), HexColor("#fffffb"), HexColor("#dcded1")
INK, INK2, INK3 = HexColor("#1a271a"), HexColor("#4a5a46"), HexColor("#79876f")
ACCENT, ACCENT_INK = HexColor("#2f6b3c"), HexColor("#f4fbf5")
# Bundled open-licensed faces from the designing-canvas-art skill
pdfmetrics.registerFont(TTFont("Display", "../designing-canvas-art/canvas-fonts/YoungSerif-Regular.ttf"))
pdfmetrics.registerFont(TTFont("Text", "../designing-canvas-art/canvas-fonts/WorkSans-Regular.ttf"))
ink-3 is the token most likely to fail in print — many printers and projectors compress the light end. For slides projected in a lit room, use ink-2 for anything the audience must read.
React
export const theme = {
base: "#0f1c26", surface: "#16283a", line: "#2d4859",
ink: "#eef6f8", ink2: "#accad4", ink3: "#8aa7b3",
accent: "#4fd1c5", accentInk: "#04222a",
};
For Tailwind, map the tokens into theme.extend.colors so the utility classes carry the semantics: bg-base, text-ink-2, border-line.
Building a Custom Theme
When no bundled theme fits, construct one rather than picking colors ad hoc.
- Name the direction in two words and name a real-world reference. "Coastal Survey — 1970s nautical chart" produces a palette; "modern and clean" produces defaults.
- Choose a hue strategy — monochromatic, analogous, complementary, or neutral-plus-spot. Commit to one.
- Build the neutrals by tinting, never pure gray. Mix 4-8% of the accent into every neutral so the palette reads as one family.
- Derive
inkfrom the accent's hue at very low chroma and very low lightness — this is what makes a palette feel designed rather than assembled. - Set the accent two ways if needed: a bright value for fills, a darker value for text. One value rarely serves both.
- Write the file in
themes/using an existing one as the template, including thecontrastblock. - Run the checker. Adjust lightness until it passes. Do not ship a failing custom theme.
- Show the user the palette and one rendered sample before applying it to the whole artifact.
For the underlying color theory — OKLCH construction, ramp generation, dark-mode rules — see designing-frontend-interfaces/references/color-and-theme.md.
Common Mistakes
Applying a theme without asking. Restyling a finished deck to a palette the user did not choose is worse than not theming it.
Raw hex in components. The :root block exists, and Card.css still says #16283a. The theme is now unswappable.
ink-3 used for body text. It passes 3:1, not 4.5:1. It is for captions and metadata at large sizes only.
Accent used as both a large fill and small text. The value bright enough to work as a fill is almost never dark enough for text. Use two steps.
Web fonts in a PDF pipeline. Silently substituted, breaking every layout. Use the metric-safe column.
Second accent added "for variety". Two saturated accents from different hue families make an artifact look assembled. If a second color is genuinely needed, take it from the ink ramp.
Dark theme, shadows unchanged. Shadows are invisible on dark backgrounds. Elevation on dark comes from a lighter surface, not a darker shadow.
Contrast checked in one mode only. Light passing tells you nothing about dark.
FAQ
What does the applying-themes skill do?
Use when a visual artifact needs a consistent color and type system applied — slide decks, reports, HTML pages, dashboards, PDFs, docs — or when asked to "theme this", "restyle with a palette", "make these slides look consistent", "pick colors and fonts", or to build a custom theme from a brand or a description. Provides 10 contrast-verified themes with semantic tokens and a checker script.
How do I install applying-themes?
Run npx skills add https://github.com/osmontero/opencode-skills --skill applying-themes in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/applying-themes/ (personal) or .claude/skills/applying-themes/ (project).
Which AI agents can use applying-themes?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is applying-themes safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains applying-themes?
It is published by osmontero in osmontero/opencode-skills. It has 117 recorded installs.
More from osmontero/opencode-skills
designing-frontend-interfaces
osmontero/opencode-skills
Use when building or restyling any web interface — landing pages, dashboards, marketing sites, web apps, React/Vue components, HTML/CSS layouts, artifacts, posters — or when asked to make a UI look better, more polished, more distinctive, less generic, or less "AI-generated". Also use when a design brief, art direction, visual identity, type scale, or color system is needed before implementation.
designing-user-experience
osmontero/opencode-skills
Use when designing how an interface behaves rather than how it looks — user flows, navigation and information architecture, forms and validation, loading/empty/error states, confirmation and undo for destructive actions, button and error message wording, feedback for slow operations, or mobile and touch behavior. Also use when a UI looks finished but breaks on bad input, slow networks, no data, or first use.
reviewing-interface-quality
osmontero/opencode-skills
Use when asked to review, critique, audit, or improve an existing user interface — "review this UI", "why does this look generic", "make this more polished", "design feedback", "does this look AI-generated", "audit this page". Also use as the final gate before shipping any frontend work, and when a UI renders correctly but feels unfinished, cheap, or inconsistent without an obvious cause.
building-accessible-interfaces
osmontero/opencode-skills
Use when building or auditing any web UI for accessibility — keyboard navigation, screen readers, focus management, ARIA, color contrast, form labels and error announcements, reduced motion, or touch target size. Triggers include "is this accessible", "WCAG", "a11y", "screen reader", "keyboard navigation", "focus trap", "contrast ratio", "aria-label", or building modals, menus, tabs, comboboxes, toasts, and custom controls that must work without a mouse.
systematic-debugging
osmontero/opencode-skills
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
verifying-before-completion
osmontero/opencode-skills
Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always
Popular frontend & design skills
setup-matt-pocock-skills
mattpocock/skills
Configure this repo for the engineering skills: set up its issue tracker, triage label vocabulary, and domain doc layout. Run once before first use of the other engineering skills.
frontend-design
anthropics/skills
Guidance 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.
hyperframes-animation
heygen-com/hyperframes
All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.
prototype
mattpocock/skills
Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
hyperframes-core
heygen-com/hyperframes
The HyperFrames composition contract — build one renderable project. Use for composition structure, the data- timing attributes, class="clip", tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.
vercel-react-best-practices
vercel-labs/agent-skills
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.