Agent skill

DaisyUI 5 Color Rules

by saadeghi in saadeghi/daisyui

Rules for using daisyUI 5's semantic color names, such as primary and base-100, so interfaces stay readable across themes.

MITAuto-check passedFrontend & Design

Install DaisyUI 5 Color Rules

skills CLI
$ npx skills add saadeghi/daisyui --skill daisyui-colors -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install saadeghi/daisyui daisyui-colors --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/saadeghi/daisyui.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/daisyui/colors .claude/skills/daisyui-colors && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
daisyui-colors
GitHub stars
43k
Token cost
~1.7k tokens
SKILL.md length
586 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Rules for using daisyUI 5's semantic color names, such as primary and base-100, so interfaces stay readable across themes.

  • Works in 11 steps: daisyUI adds semantic color names to the… → Use daisyUI color names in utility… → The value of each daisyUI color name is… → …
  • Choosing colors for components in a daisyUI 5 interface
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Making a UI that adapts correctly when the theme changes

What it does

The skill lists daisyUI's semantic color names: primary, secondary, accent and neutral with matching content colors, three base surface shades with base-content, and info, success, warning and error with their content colors. They are used in Tailwind utility classes such as bg-primary, and each one is a variable whose value changes with the theme.

The rules follow from that: do not combine daisyUI colors with the dark prefix, prefer daisyUI names over Tailwind color names because those stay fixed in every theme and can leave text unreadable on a dark base, keep content colors in clear contrast with their surfaces, and use base colors for most of the page while reserving primary for the single most important element.

When your agent uses it

  • Choosing colors for components in a daisyUI 5 interface
  • Making a UI that adapts correctly when the theme changes
  • Fixing unreadable text caused by fixed Tailwind color names in dark themes
  • Reviewing markup that mixes the dark prefix with daisyUI colors

Example prompts

  • “Style this card with daisyUI colors only so it works in light and dark themes.”
  • “Replace text-gray-800 in this navbar with a theme-safe daisyUI color.”
  • “Which daisyUI color should I use for the main call to action on this page?”

Workflow steps

11 steps, taken from the first numbered list in SKILL.md.

  1. daisyUI adds semantic color names to the Tailwind CSS colors.
  2. Use daisyUI color names in utility classes as you use other Tailwind CSS color names. For example, bg-primary uses the primary color for…
  3. The value of each daisyUI color name is a variable. Thus, the color can change with the theme.
  4. Do not use dark: with daisyUI color names.
  5. If possible, use only daisyUI color names. This lets colors change automatically with the theme.
  6. If you use a Tailwind CSS color name such as red-500, its color stays the same in all themes.
  7. If you use a daisyUI color name such as primary, its color changes with the theme.
  8. Avoid Tailwind CSS color names for text. For example, text-gray-800 on bg-base-100 becomes unreadable in a dark theme because bg-base-100…
  9. *-content colors must have clear contrast with their related colors.
  10. Use base-* colors for most of the page. Use the default variant for all elements. Use primary only for the most important element on the…
  11. In rare cases, you can use a Tailwind CSS color if content must keep the same color in all themes. For example, you can use text-red-500…

What it can do on your machine

Read from SKILL.md and the folder at commit 8c24218. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are css and html).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • daisyui.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

DaisyUI 5 Color Rules loads about 1.7k tokens when it runs. Until then it costs about 15 tokens; SKILL.md has 586 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~15
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from saadeghi/daisyui at commit 8c24218, republished under its MIT licence (© saadeghi). 586 words, ~1,725 tokens.

Download SKILL.mdSave it as .claude/skills/daisyui-colors/SKILL.md (or your agent's skills folder).
name
daisyui-colors
description
Color rules that you must use with daisyUI 5

daisyUI 5 colors

daisyUI color names
  • primary: The main brand color.
  • primary-content: Foreground content color for use on primary.
  • secondary: An optional secondary brand color.
  • secondary-content: Foreground content color for use on secondary.
  • accent: An optional accent brand color.
  • accent-content: Foreground content color for use on accent.
  • neutral: A dark neutral color for UI areas that do not use saturated colors.
  • neutral-content: Foreground content color for use on neutral.
  • base-100: The page base-surface color for blank backgrounds.
  • base-200: A darker base shade that gives elevation.
  • base-300: A still darker base shade that gives more elevation.
  • base-content: Foreground content color for use on a base color.
  • info: Color for information and help messages.
  • info-content: Foreground content color for use on info.
  • success: Color for success and safe-state messages.
  • success-content: Foreground content color for use on success.
  • warning: Color for warning and caution messages.
  • warning-content: Foreground content color for use on warning.
  • error: Color for error, danger, and destructive-action messages.
  • error-content: Foreground content color for use on error.
daisyUI color rules
  1. daisyUI adds semantic color names to the Tailwind CSS colors.
  2. Use daisyUI color names in utility classes as you use other Tailwind CSS color names. For example, bg-primary uses the primary color for the background.
  3. The value of each daisyUI color name is a variable. Thus, the color can change with the theme.
  4. Do not use dark: with daisyUI color names.
  5. If possible, use only daisyUI color names. This lets colors change automatically with the theme.
  6. If you use a Tailwind CSS color name such as red-500, its color stays the same in all themes.
  7. If you use a daisyUI color name such as primary, its color changes with the theme.
  8. Avoid Tailwind CSS color names for text. For example, text-gray-800 on bg-base-100 becomes unreadable in a dark theme because bg-base-100 is dark.
  9. *-content colors must have clear contrast with their related colors.
  10. Use base-* colors for most of the page. Use the default variant for all elements. Use primary only for the most important element on the page. Use it only once.
  11. In rare cases, you can use a Tailwind CSS color if content must keep the same color in all themes. For example, you can use text-red-500 instead of text-error. For an SVG icon or chart, a fixed color can be necessary.
Show full SKILL.md (192 more words)Show less
Enable and apply themes

The default configuration enables light and dark. In the daisyUI plugin, select specified themes, all themes, or no built-in themes:

css
@plugin "daisyui" {
  themes: light --default, dark --prefersdark, cupcake;
}
  • Use themes: all; to enable all built-in themes.
  • Use themes: false; to disable all built-in themes. Usually, do this before you define only custom themes.
  • Add data-theme="THEME_NAME" to <html> or a nested element. You can nest themes with no depth limit.
html
<html data-theme="dark">
  <section data-theme="light">
    <div data-theme="retro">Nested theme</div>
  </section>
</html>
daisyUI custom theme with custom colors

A CSS file that contains Tailwind CSS, daisyUI, and a custom daisyUI theme has this structure:

css
@import "tailwindcss";
@plugin "daisyui";
@plugin "daisyui/theme" {
  name: "mytheme";
  default: true; /* set as default */
  prefersdark: false; /* set as default dark mode (prefers-color-scheme:dark) */
  color-scheme: light; /* color of browser-provided UI */

  --color-base-100: oklch(98% 0.02 240);
  --color-base-200: oklch(95% 0.03 240);
  --color-base-300: oklch(92% 0.04 240);
  --color-base-content: oklch(20% 0.05 240);
  --color-primary: oklch(55% 0.3 240);
  --color-primary-content: oklch(98% 0.01 240);
  --color-secondary: oklch(70% 0.25 200);
  --color-secondary-content: oklch(98% 0.01 200);
  --color-accent: oklch(65% 0.25 160);
  --color-accent-content: oklch(98% 0.01 160);
  --color-neutral: oklch(50% 0.05 240);
  --color-neutral-content: oklch(98% 0.01 240);
  --color-info: oklch(70% 0.2 220);
  --color-info-content: oklch(98% 0.01 220);
  --color-success: oklch(65% 0.25 140);
  --color-success-content: oklch(98% 0.01 140);
  --color-warning: oklch(80% 0.25 80);
  --color-warning-content: oklch(20% 0.05 80);
  --color-error: oklch(65% 0.3 30);
  --color-error-content: oklch(98% 0.01 30);

  --radius-selector: 1rem; /* border radius of selectors (checkbox, toggle, badge) */
  --radius-field: 0.25rem; /* border radius of fields (button, input, select, tab) */
  --radius-box: 0.5rem; /* border radius of boxes (card, modal, alert) */
  /* preferred values for --radius-* : 0rem, 0.25rem, 0.5rem, 1rem, 2rem */

  --size-selector: 0.25rem; /* base size of selectors (checkbox, toggle, badge). Value must be 0.25rem unless we intentionally want bigger selectors. If so it can be 0.28125 or 0.3125. If we intentionally want smaller selectors, it can be 0.21875 or 0.1875 */
  --size-field: 0.25rem; /* base size of fields (button, input, select, tab). Value must be 0.25rem unless we intentionally want bigger fields. If so it can be 0.28125 or 0.3125. If we intentionally want smaller fields, it can be 0.21875 or 0.1875 */

  --border: 1px; /* border size. Value must be 1px unless we intentionally want thicker borders. If so it can be 1.5px or 2px. If we intentionally want thinner borders, it can be 0.5px */

  --depth: 1; /* only 0 or 1 - Adds a shadow and subtle 3D depth effect to components */
  --noise: 0; /* only 0 or 1 - Adds a subtle noise (grain) effect to components */
}
Rules
  • You must include all CSS variables in the example.
  • Colors can use OKLCH, hex, or another format.
  • If you generate a custom theme, do not include the comments from the example. Give only the code.

Optional: Use the visual tool at https://daisyui.com/theme-generator/ to make a custom theme.

Change a built-in theme

Use the built-in theme name. Change only the necessary values. daisyUI inherits the other values:

css
@plugin "daisyui/theme" {
  name: "light";
  default: true;
  --color-primary: blue;
  --color-secondary: teal;
}

For a custom CDN theme, define the same variables in a selector. The selector must match the selected data-theme and theme controller:

css
:root:has(input.theme-controller[value=mytheme]:checked),
[data-theme="mytheme"] {
  color-scheme: light;
  --color-primary: oklch(55% 0.3 240);
  /* define the remaining custom-theme variables */
}

To make the Tailwind dark: variant follow one or more daisyUI themes, define a custom variant:

css
@custom-variant dark (&:where([data-theme=night], [data-theme=night] *));

© saadeghi, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/daisyui/colors of saadeghi/daisyui.

Open the folder on GitHubat commit 8c24218

Compare with similar skills

DaisyUI 5 Color Rules next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

DaisyUI 5 Color Rules compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
DaisyUI 5 Color Rules this skillsaadeghi/daisyui43k—~1.7kAutomated safety check: PassMIT
UI StylingOhh-889/skyroc79513 repos~2.5kAutomated safety check: PassMIT
Tailwind CSS Patternsever-works/ever-works1623 repos~1.6kAutomated safety check: NotesAGPL-3.0
Tailwind V4 Shadcnever-works/ever-works1622 repos~3.8kAutomated safety check: PassMIT
Bryl Minimal Designbryllim/bryl-minimal-design115—~2.9kAutomated safety check: PassMIT
Daisyuirayriffy/rayriffy-h126—~8.6kAutomated safety check: PassMIT

Similar skills

  • UI Styling

    Ohh-889/skyroc

    Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs.

    795 GitHub starsUsed in 13 repos~2.5k tokens
    Frontend & DesignAuto-check passed
  • Tailwind CSS Patterns

    ever-works/ever-works

    Provides comprehensive Tailwind CSS utility-first styling patterns including responsive design, layout utilities, flexbox, grid, spacing, typography, colors, and modern CSS best practices.

    162 GitHub starsUsed in 3 repos~1.6k tokens
    Frontend & DesignAuto-check: notes
  • Tailwind V4 Shadcn

    ever-works/ever-works

    Production-tested setup for Tailwind CSS v4 with shadcn/ui, Vite, and React.

    162 GitHub starsUsed in 2 repos~3.8k tokens
    Frontend & DesignAuto-check passed
  • Bryl Minimal Design

    bryllim/bryl-minimal-design

    Apply the bryl-minimal design language — a monochrome, typography-driven minimal aesthetic with halftone dot textures, pixel-font display headings, tiny uppercase monospace labels, soft large-radius…

    115 GitHub stars~2.9k tokensUpdated 3 mo ago
    Frontend & DesignAuto-check passed
  • Daisyui

    rayriffy/rayriffy-h

    Tailwind CSS component library providing semantic class names for 50+ components with built-in themes, dark mode, and customization for rapid UI development.

    126 GitHub stars~8.6k tokensUpdated 18 days ago
    Frontend & DesignAuto-check passed
  • Shadcn Tailwind UI

    LiarMTTT/TavernWeave

    Build, restyle, or review accessible React interfaces that use shadcn/ui, Radix UI primitives, and Tailwind CSS.

    154 GitHub stars~1.7k tokensUpdated 6 days ago
    Frontend & DesignAuto-check passed

More from saadeghi/daisyui

  • Bug Finder for daisyUI

    saadeghi/daisyui

    Investigates suspected bugs in the daisyUI monorepo through read-only analysis, then writes a decision-ready fix plan in tmp/bugs without changing any product code.

    43k GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Reviews open pull requests in the daisyUI repository using read-only GitHub data and isolated base-versus-PR checks, then writes a merge verdict report.

    43k GitHub stars~766 tokensUpdated yesterday
    Auto-check passed
  • Official daisyUI skill for Tailwind CSS projects, routing to install, usage, configuration, color and per-component guides before writing any HTML or JSX with its classes.

    43k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Rules for styling HTML with daisyUI 5 class names first, falling back to Tailwind utilities only when needed, and avoiding unnecessary custom CSS or default color variants.

    43k GitHub stars~846 tokensUpdated yesterday
    Auto-check passed
  • daisyUI 5 Installation

    saadeghi/daisyui

    Installation instructions for daisyUI 5 with Tailwind CSS 4: the npm setup, CSS plugin lines, CDN usage and pointers to framework-specific guides.

    43k GitHub stars~967 tokensUpdated yesterday
    Auto-check passed
  • daisyUI 5 Configuration

    saadeghi/daisyui

    Configuration options for daisyUI 5

    43k GitHub stars~352 tokensUpdated yesterday
    Auto-check passed

Questions about DaisyUI 5 Color Rules

What does DaisyUI 5 Color Rules do?

Rules for using daisyUI 5's semantic color names, such as primary and base-100, so interfaces stay readable across themes. The skill lists daisyUI's semantic color names: primary, secondary, accent and neutral with matching content colors, three base surface shades with base-content, and info, success, warning and error with their content colors. They are used in Tailwind utility classes such as bg-primary, and each one is a variable whose value changes with the theme.

When should I use DaisyUI 5 Color Rules?

DaisyUI 5 Color Rules fits situations like: choosing colors for components in a daisyUI 5 interface; making a UI that adapts correctly when the theme changes; fixing unreadable text caused by fixed Tailwind color names in dark themes; reviewing markup that mixes the dark prefix with daisyUI colors.

How do I install DaisyUI 5 Color Rules in Claude Code?

Run `npx skills add saadeghi/daisyui --skill daisyui-colors -a claude-code`. Or copy the skill folder (skills/daisyui/colors in saadeghi/daisyui) into .claude/skills/daisyui-colors in your project. Claude Code loads it when a task matches its description.

How do I install DaisyUI 5 Color Rules in Codex?

Run `npx skills add saadeghi/daisyui --skill daisyui-colors -a codex`. Or copy the skill folder (skills/daisyui/colors in saadeghi/daisyui) into .agents/skills/daisyui-colors in your project. Codex loads it when a task matches its description.

Can I use DaisyUI 5 Color Rules in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add saadeghi/daisyui --skill daisyui-colors -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/daisyui-colors, .gemini/skills/daisyui-colors, .github/skills/daisyui-colors and .opencode/skills/daisyui-colors in your project.

What does DaisyUI 5 Color Rules need to run?

SKILL.md names no scripts, command-line tools or credentials: DaisyUI 5 Color Rules is instructions for the agent only.

Does DaisyUI 5 Color Rules access the network?

SKILL.md names 1 domain. As links in the text: daisyui.com. This is read from the text; nothing was executed.

Is DaisyUI 5 Color Rules safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does DaisyUI 5 Color Rules use?

DaisyUI 5 Color Rules is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does DaisyUI 5 Color Rules use?

About 1.7k tokens (SKILL.md is roughly 6.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to DaisyUI 5 Color Rules?

Skills that share tags, products or a category with DaisyUI 5 Color Rules: UI Styling (Ohh-889/skyroc, 795 stars), Tailwind CSS Patterns (ever-works/ever-works, 162 stars), Tailwind V4 Shadcn (ever-works/ever-works, 162 stars) and Bryl Minimal Design (bryllim/bryl-minimal-design, 115 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains DaisyUI 5 Color Rules?

saadeghi (a GitHub user) maintains it in saadeghi/daisyui, which has 42,566 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 8, 2026.

Source: saadeghi/daisyui on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.