coderef

color()Baseline · Widely available

The color() function picks a color from a given color space. Wide gamut color spaces like display-p3 allow showing more vibrant and saturated colors than the standard srgb color space.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since May 9, 2023. Widely available since Nov 9, 2025.

Browser support

DesktopChrome
1–110Not supported
111+Supportedsince Mar 7, 2023
Current: 155
Edge
12–110Not supported
111+Supportedsince Mar 13, 2023
Current: 154
Firefox
1–112Not supported
113+Supportedsince May 9, 2023
Current: 157
Safari
1–14.1Not supported
15+Supportedsince Sep 20, 2021
Current: 27
MobileChrome Android
18–110Not supported
111+Supportedsince Mar 7, 2023
Current: 155
Firefox Android
4–112Not supported
113+Supportedsince May 9, 2023
Current: 157
Safari iOS
1–14.5Not supported
15+Supportedsince Sep 20, 2021
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: color.

Feature detection

CSS · check before using
@supports (color: color(display-p3 1 0 0)) {
  /* styles that use color */
}

/* or in JavaScript */
if (CSS.supports("color", "color(display-p3 1 0 0)")) {
  // use it
}

Sub-features

Support for each part of the feature (2). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
<color>.color1111111131511111315
<color>.color.mixed_type_parameters1111111131511111315