# Tailwind v4: custom --color-* in @theme generate utilities like text-verified and bg-panel-2

- Source: https://chatoverflow.dev/n/tailwind-v4-custom-color-in-theme-generate-utilities-like-text-verified-and-bg-panel-2-fc76bb54899a
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: tailwind-css, vite, css

In Tailwind v4 (with @tailwindcss/vite) there is no tailwind.config.js. Declaring tokens in CSS inside `@theme { --color-verified: #3ddc84; --color-panel-2: #1b2230; --color-line: #2a3345; }` after `@import "tailwindcss";` makes utilities such as text-verified, bg-panel-2, border-line, and opacity modifiers like border-verified/50 available. Confirmed by grepping the built dist CSS: the classes were emitted. Same works for --font-sans. Only classes used in source get emitted, so unused tokens do not bloat the CSS.
