Skip to main content

Apply brand

Have your agent apply your brand to a project's global stylesheet, with colors for light and dark mode, fonts and radius, so every component and block follows.

Usage

Give the agent your brand in any form: hex values, a brand book, your website, screenshots, or the name of a ready-made theme.

Prompt
/shadcnpro-apply-brand Our primary color is #6d28d9. Body font Inter, headings in Playfair Display, soft corners. Keep the grays slightly violet.
  • /shadcnpro-apply-brand Match the look of our marketing site, https://acme.com

  • /shadcnpro-apply-brand Start from the Aurora theme and change the primary color to #0f766e

  • /shadcnpro-apply-brand Use the colors and fonts from brand-guide.pdf in this repository

The agent writes down what it found, confirms it with you unless you gave exact values, and reports every variable it changed with the old and the new value.

What the skill does

  1. Reads your stylesheet: the variables, their color format and how fonts are loaded.
  2. Collects the brand from your sources.
  3. Picks the starting point: your current theme, or one of the 18 ready-made themes when one is close.
  4. Converts every color with a script and checks its contrast.
  5. Sets the tokens for light mode and derives dark mode.
  6. Installs the fonts and maps them to --font-sans and --font-heading.
  7. Sets --radius. Every corner in the project follows it.
  8. Searches your own code for styling that ignores the theme.
  9. Checks buttons, inputs, cards, menus, charts and the sidebar in the browser, in light and dark mode.

What changes, and what doesn't

A shadcn/ui project gets its look from a few dozen CSS variables in one stylesheet, as Themes explains. The skill changes those variables and nothing else:

  • It edits values in :root and .dark, one variable at a time. Variables it doesn't change stay as they were, including your own tokens.
  • It never edits components/ui or a block to get a color. A color the theme has no place for becomes a new token, such as --brand-accent, which gives you bg-brand-accent.
  • It keeps the color format your stylesheet uses: OKLCH in current projects, HSL in older ones.

Commit your work first, so the diff shows exactly what the brand changed.

From a brand color to a theme

Your brandBecomes
Primary color--primary and the text on it, the focus ring and the sidebar's primary color
NeutralsBackground, text, cards, borders and inputs. The grays can lean toward your brand color or stay neutral.
Other brand colorsThe chart colors, or new tokens when the interface needs them
Corner style--radius
Typefaces--font-sans for body text and --font-heading for headings

Secondary buttons, hover states and highlighted menu items stay close to the neutrals. A saturated brand color there makes every hover loud.

Contrast is checked

The agent runs every color and the text on it through a script: 4.5:1 for text, and 3:1 for the primary color against the page background, so buttons and focus rings stand out. A light brand color, such as yellow, keeps its value and gets dark text.

Dark mode gets its own values. The primary color usually becomes lighter there, and every pair is checked again, because dark mode is where contrast breaks. Pairs that can't reach 4.5:1 with your brand's own colors are listed in the report.

Fonts

Fonts from the registry install with one command each, which loads the font the way your framework does. Other fonts are loaded the way your project already loads fonts, such as next/font in Next.js. A font that needs a license is yours to provide: the agent doesn't download font files from the web.

Which skill for which source