Agent skill

Color Mode and Theme Skill: Light, Dark or Both

The color-mode-and-theme skill helps an AI coding agent choose light, dark or combined mode from brand tone, decide when a theme selector is worth building, and set dark mode token rules.

Install
git clone https://github.com/dembrandt/dembrandt-skills.git
View on GitHub

Stars, license and last push from GitHub. Install count as reported by the open skills directory.

What is the color-mode-and-theme skill?

The color-mode-and-theme skill is a SKILL.md in the dembrandt-skills repository that treats color mode as a brand and context decision. It guides an AI coding agent on light, dark or combined themes, when to add a theme selector, and dark mode token rules such as avoiding pure black surfaces.

The color-mode-and-theme skill opens with a flat rule: color mode is a brand and context decision, not a personal preference. It sits in skills/color-mode-and-theme inside dembrandt-skills, a repository of design knowledge packaged for AI agents.

Its frontmatter lists path patterns such as CSS and SCSS files, tokens and theme folders and tailwind.config, plus prompt phrases like dark mode, theme selector and brand tone. These are the triggers the metadata declares for when the skill applies.

Light, dark or combined

ModeToneFits
LightOpen, trustworthy, content-forward, accessible, professionalMarketing sites, e-commerce, editorial, SaaS with mixed audiences, consumer products
DarkPremium, focused, immersive, technical, high-contrast dataTrading platforms, developer tools, creative tools, dense data dashboards, entertainment, gaming
CombinedSystem default plus a manual overrideMost products with a returning user base

Light is called the safer default for most products, because it performs better in bright environments and has broader accessibility coverage out of the box. Dark mode is harder to get right, and light mode beats a broken dark mode.

The combined approach respects prefers-color-scheme for the default and offers a toggle. The skill shows CSS with media queries for dark and light tokens, plus data-theme attribute selectors for the manual override.

When a theme selector earns its place

A selector is a UI control that takes space and adds complexity, so the skill recommends one only when user control genuinely matters. The rule of thumb is whether the user spends hours per day in the tool.

SituationTheme selector?
Marketing site, landing pageNo, pick one mode and commit to it
Consumer SaaS, general audienceCombined, system default plus a toggle
Developer tool, technical productYes, developers expect it
Trading platform, financial dashboardYes, long low-light sessions are common
B2B enterprise toolYes, power users with long sessions
E-commerce storefrontUsually no, light default

Place the toggle in the header, top right near the account area, or in user settings. Keep it out of primary navigation.

Brand tone also steers the default mode. A very dark primary such as navy or near-black surfaces naturally in dark, while a bright, vivid primary lets light mode breathe.

  • Clean, minimal, trustworthy and open brands default to light.
  • Premium, exclusive, bold and immersive brands default to dark, as do technical, data-heavy ones.
  • Playful, colorful brands default to light, since vivid colors are harder to maintain in dark.
  • Neutral, enterprise brands default to light with a system-default toggle.

Dark mode token rules

A theme switcher is a second palette, not a toggle. Each semantic color needs a verified value in every mode, because contrast that passes on light routinely fails on dark.

  • Do not use pure black #000000 as the base surface. Use a very dark neutral such as #0A0A0F or #111827.
  • Build surface hierarchy from lightness steps, with each higher surface lighter instead of more shadowed.
  • Reduce brand color saturation slightly, by about 10 to 15%, so vivid colors stay readable.
  • Raise font weight by one step for light text on dark, for example Regular to Medium.
  • Verify every text and background contrast pair against WCAG 2.2 AA in both modes.
/* Dark mode surface scale */
--color-surface:         #0A0A0F;  /* base */
--color-surface-raised:  #141419;  /* cards */
--color-surface-overlay: #1E1E26;  /* modals, popovers */
--color-border:          rgba(255,255,255,0.08);
--color-text:            #F0F0F5;
--color-text-secondary:  #8A8F98;

It also warns that a hardcoded color equal to a token's value is that token, written in a form that cannot follow the theme. Its fix is mechanical: grep markup for literal colors, count them as a debt and block new ones.

Who the color-mode-and-theme skill is for

Best for

  • Deciding whether a new product needs dark mode, light mode or both.
  • Defining a base palette that matches brand tone and use context.
  • Adding a theme toggle without creating a second maintenance burden. For deeper implementation detail, see dark-mode-design.
  • Reviewing a dark theme that feels off, using the eight-question checklist.

Not for

  • Generating a palette from a brand color. The same repository lists a separate algorithmic-color-palette skill for that. See also color-system.
  • Full accessibility audits. The README lists a separate WCAG skill, and this one only asks you to verify contrast.
  • Pixel-level component styling, since it deals with palette and mode decisions.

Use it with UiChemy

The skill advises on color mode and CSS tokens, and it builds no pages. Its table says a marketing site or landing page should pick one mode and commit to it.

Decide the mode with the skill, design the pages in Figma in that one mode, then convert them with UiChemy Figma to WordPress. Click Get Started on uichemy.com. For building the palette itself, see better-colors.