The Ultimate Tailwind CSS v4 Color Utility Classes Cheat Sheet

Complete developer cheat sheet for Tailwind CSS v4 color utility classes. Quick reference table for bg-, text-, border-, ring-, and OKLCH defaults.

Abhay VachhaniFull Stack Software Engineer
2 min read
Updated: Jul 27, 2026

Tailwind Color Utility Prefixes Overview

Tailwind CSS applies color variables across every visual DOM property. The standard prefixes include:

  • `bg-{color}-{stop}`: Background color (`background-color`)
  • `text-{color}-{stop}`: Text color (`color`)
  • `border-{color}-{stop}`: Border color (`border-color`)
  • `ring-{color}-{stop}`: Focus ring outline (`box-shadow` ring)
  • `divide-{color}-{stop}`: Border divider between child elements
  • `outline-{color}-{stop}`: Native browser outline color
  • `accent-{color}-{stop}`: Form checkbox & radio accent color
  • `caret-{color}-{stop}`: Input text cursor color
  • `fill-{color}-{stop}`: SVG path fill color
  • `stroke-{color}-{stop}`: SVG path stroke outline color

All 22 Default Color Families in v4

Tailwind CSS v4 ships with 22 built-in color families, each containing 11 numeric stops (50 to 950):

1. Neutrals: - **Slate**: Cool blue-tinted grays (`slate-50` to `slate-950`) - **Gray**: Standard balanced grays (`gray-50` to `gray-950`) - **Zinc**: Cool technical grays (`zinc-50` to `zinc-950`) - **Neutral**: Pure neutral grays (`neutral-50` to `neutral-950`) - **Stone**: Warm organic grays (`stone-50` to `stone-950`)

2. Vivid Accents: - **Red**, **Orange**, **Amber**, **Yellow**, **Lime**, **Green**, **Emerald**, **Teal**, **Cyan**, **Sky**, **Blue**, **Indigo**, **Violet**, **Purple**, **Fuchsia**, **Pink**, **Rose**


Neutral Gray Families Comparison (Slate, Zinc, Neutral, Stone)

Gray NameHex Anchor (500)Perceptual ToneSuggested Use
Slate`#64748b`Cool Slate BlueDeveloper Dashboards & SaaS
Zinc`#71717a`Cool Metallic TechnicalModern Clean Interfaces
Neutral`#737373`Pure Balanced NeutralEnterprise Apps & Typography
Stone`#78716c`Warm Earthy StoneEditorial & Blog Reading UIs

Opacity Modifiers & Alpha Syntax

In Tailwind CSS v4, arbitrary opacity values can be appended to any color utility class using the forward slash (`/`) syntax:

html
<!-- Background with 10% opacity and border with 20% opacity -->
<div className="bg-primary/10 text-primary p-4 border border-primary/20 rounded-xl">
  Callout Banner
</div>

Author Insight: Standardizing Class Prefixes

Author Insight by Abhay Vachhani (Full Stack Engineer): > In enterprise engineering teams using Prettier with `prettier-plugin-tailwindcss`, color class names are automatically sorted into standard execution order. Enforcing automated class sorting prevents merge conflicts across large git repositories.

Frequently Asked Questions

How do I apply 50% opacity to a background color utility in Tailwind v4?

Append /50 directly after the class name, such as bg-blue-500/50 or text-slate-900/50.

What is currentcolor utility in Tailwind CSS used for?

bg-current or fill-current makes the element inherit the current text color (color property) of its parent container, which is ideal for inline SVG icons.

Try Our Developer Tools

Put Modern Color Science into Practice

Convert HEX codes to Tailwind v4 classes, test WCAG contrast ratios, and generate uniform OKLCH palettes in seconds.