← Back to properties

CSS Property

color

Typography

Sets the foreground color of an element's text and text decorations.

Syntax

color: value;

Example

color: #3dffa0;

Common use cases

  • Setting text color
  • Theming with CSS custom properties
  • Accessible contrast ratios

Practical developer insight

color is inherited — set it once on body and it cascades down. Always check contrast ratio against background for accessibility (minimum 4.5:1 for normal text).

Related properties