color

The color property sets the foreground text color and is the default for currentColor.

Since CSS1 Spec ↗

Syntax

color: <color>;  /* keyword, hex, rgb(), hsl(), oklch() */

Examples

.title { color: oklch(0.55 0.18 265); }
.muted { color: rgb(0 0 0 / 0.6); }
svg { color: tomato; }
Output
Renders the title in a vivid blue, muted text at 60% black, and SVG icons in tomato via currentColor.

Notes

color also defines the currentColor keyword used by borders, shadows, and SVG fill. Prefer oklch() for perceptually uniform, wide-gamut colors in 2026.

Browser & runtime support

EnvironmentSince version
chrome 1.0
firefox 1.0
safari 1.0
edge 12

See also