← Chrome 159 reference · All APIs

v159 · css · enabled by default

AccentColor & AccentColorText follows accent-color value

AccentColor and AccentColorText resolve at computed-value time to the element’s effective accent-color property and a contrasting foreground color for it, instead of only reflecting the OS-level platform accent color. When accent-color is auto (or when Forced Colors Mode is active and not opted out), both keywords fall back to the browser/OS system accent colors.

Limited availability — following accent-color is not Baseline (base AccentColor/AccentColorText keywords are also Limited availability)

  • Chrome · 159 (desktop, Android)
  • Edge · Chromium-based (dev passes partial WPT; no BCD entry yet)
  • Firefox · Positive position; fixed blue/white per BCD
  • Safari · PR in progress (WebKit #74949); fixed blue/black per BCD

The system-color-accentcolor web-feature is Limited availability per webstatus.dev (Chrome/Edge 149 desktop only, Firefox 103, Safari 16.5; Chrome for Android unsupported in BCD). BCD css/types/color.json does not yet have a subfeature for resolving AccentColor and AccentColorText against the element’s accent-color property (checked 2026-11-24). The companion accent-color property is also Limited availability on webstatus.dev due to Android contrast notes.

at a glance

Shipped inChrome 159 (desktop, Android), enabled by default — filed under “Enabled by default” in the milestone=159 listing; Android WebView listed as unconfirmed (null) in the ChromeStatus API record
Origin trial / flagNo origin trial, no user-facing chrome://flags toggle. ChromeStatus records Finch flag name CSSSystemAccentColorKeyword (not present as a standalone entry in runtime_enabled_features.json5 on main as of 2026-11-24)
SpecificationCSS Color Module Level 4 §6.2 System Colors (AccentColor, AccentColorText); CSS Basic User Interface Module Level 4 §7.1 accent-color
CSSWG issuew3c/csswg-drafts#5900 — resolution that AccentColor takes its value from accent-color unless Forced Colors Mode is active
Intentblink-dev Intent to Ship
Tracking bugissues.chromium.org/536420071
Web platform testscss/css-ui/accent-color-keyword-* and forced-colors-mode/accent-color-keyword-forced-colors.html
ChromeStatus6207138742534144 — AccentColor & AccentColorText follows accent-color value

why it exists

Chromium previously exposed AccentColor and AccentColorText only as platform system colors (returning the OS accent color when accent-color was auto, or a fixed default otherwise — see the Chrome 150 system-colors page). That left custom controls and accented surfaces unable to stay in sync with an author-specified accent-color value without duplicating custom properties alongside accent-color. By making AccentColor and AccentColorText follow the element’s computed accent-color, a single inherited accent-color declaration themes both native form controls (<input type="checkbox">, <input type="range">, <progress>) and custom UI components, while preserving an accessible contrasting foreground color automatically.

Source: ChromeStatus motivation (6207138742534144); w3c/csswg-drafts#5900.

Syntax

No new CSS property or keyword syntax is introduced; the existing CSS Color 4 <system-color> keywords change how they resolve against the CSS UI 4 accent-color property:

/* CSS Color 4 — existing <system-color> keywords (case-insensitive) */
<system-color> = AccentColor | AccentColorText | ...

/* CSS UI 4 — accent-color property (inherited, initial: auto) */
accent-color: auto | <color>;

/* Usage anywhere a <color> is accepted */
background-color: AccentColor;
color: AccentColorText;
border-color: color-mix(in srgb, AccentColor 60%, Canvas);

“To maintain consistency with widget accent color styling, AccentColor takes its value from accent-color, unless Forced Colors Mode is enabled. AccentColorText takes its value from the contrasting foreground color to AccentColor as is described for widget accent color styling.”

This reference covers four parts of the Chrome 159 contract: AccentColor resolution (inherited, own, registered properties, color functions, and 2D canvas), AccentColorText contrast resolution, cyclic and currentcolor resolution, and Forced Colors Mode and animation updates.

Source: CSS Color 4 §6.2 System Colors (normative quote fetched 2026-11-24); CSS UI 4 §7.1 accent-color.

AccentColor resolution — inputs and outputs

Inputs. The keyword AccentColor (case-insensitive) is accepted in any CSS property or function taking a <color> value, in registered custom properties declared with syntax: "<color>" (via @property or CSS.registerProperty()), inside CSS color functions (color-mix(), light-dark(), relative color syntax such as rgb(from AccentColor r g b), contrast-color(AccentColor), alpha(from AccentColor / 0.5)), in box-shadow and filter: drop-shadow(), and in HTML <canvas> 2D context color strings (ctx.fillStyle = "AccentColor").

Outputs. Resolution evaluates at computed-value time against the element’s effective accent-color property:

Computed resolution of AccentColor by effective accent-color state (from WPT accent-color-keyword-resolution.html)
Element’s effective accent-colorResolved AccentColorNotes
Explicit <color> on the elementThat computed <color>Overrides any ancestor accent-color
Inherited <color> from an ancestorThe inherited computed <color>Updates immediately when ancestor accent-color mutates
auto (or initial)Browser/OS default system accent colorMatches the pre-159 system accent behavior
currentcolorUsed value of the element’s own colorSee cyclic resolution if color also references AccentColor
Active Forced Colors Mode (forced-color-adjust: auto)User’s forced system accent colorAuthor accent-color is ignored; see Forced Colors Mode

On a 2D <canvas> element, setting ctx.fillStyle = "AccentColor" or a color function referencing AccentColor resolves against the <canvas> element’s own or inherited accent-color at the time the style is assigned; resetting canvas.style.accentColor = "initial" returns the default system accent color.

Source: WPT accent-color-keyword-resolution.html; CSS Color 4 AccentColor.

AccentColorText resolution — contrasting foreground

Inputs. AccentColorText is accepted anywhere a <color> value is valid, and pairs with an AccentColor background so text or iconography placed on top of an accented surface remains legible.

Outputs. When the element’s effective accent-color is a non-auto color (inherited or set on the element itself), AccentColorText resolves to a browser-chosen contrasting foreground color for that accent-color — matching the contrast pairing specified for widget accent colors in CSS UI 4. In Chromium’s WPT suite, light accent colors (such as rgb(255, 165, 0) or rgb(245, 245, 245)) produce rgb(0, 0, 0) and dark accent colors (such as rgb(10, 10, 10)) produce rgb(255, 255, 255). When accent-color is auto (or Forced Colors Mode is active without opt-out), AccentColorText resolves to the browser/OS system accent text color.

Source: WPT accent-color-text-keyword-resolution.html; CSS Color 4 AccentColorText; CSS UI 4 §7.1.

Cyclic and currentcolor resolution

Because accent-color is itself a color property and accepts currentcolor or <system-color>, self-referential combinations require deterministic cycle breaking:

Cycle-breaking rules for AccentColor, AccentColorText, and currentcolor (from WPT accent-color-keyword-cyclic.html)
Declaration on child elementCycle?Resolved result
accent-color: currentcolor (with own color: C)Noaccent-color resolves against this element’s own used color (C), not the parent’s; AccentColor on this element mirrors C
accent-color: AccentColor (or AccentColorText)Yes (self-reference)Resolves against the parent element’s computed accent-color instead of forming a loop
color: AccentColor; accent-color: currentcolorYes (two-property cycle)Breaks the cycle on color by falling back to the parent element’s computed color

Using AccentColor or AccentColorText in any other property (including color when accent-color is not currentcolor) resolves normally against the element’s own computed accent-color.

Source: WPT accent-color-keyword-cyclic.html; CSS UI 4 §7.1.

Forced Colors Mode, animations, and lifecycle

Forced Colors Mode. Under active Forced Colors Mode (@media (forced-colors: active)) with the default forced-color-adjust: auto, AccentColor and AccentColorText do not mirror an author-specified accent-color: both keep the user’s forced system accent palette so author colors cannot override high-contrast accessibility preferences. Setting forced-color-adjust: none opts the element out of forced colors and restores mirroring of the element’s accent-color.

Dynamic updates & animations. Both AccentColor and AccentColorText remain live across style mutations and Web Animations / CSS transitions. When an element animates to or from AccentColor, AccentColorText, or a color expression containing them (light-dark(), color-mix(), rgb(from AccentColor ...), contrast-color(), alpha(from AccentColor ...), box-shadow, filter: drop-shadow()), mutating an ancestor’s or the element’s accent-color mid-animation immediately updates the interpolated computed color.

Lifecycle. accent-color is an inherited CSS property; changing it triggers normal style recalculation and repaint on descendants referencing AccentColor or AccentColorText. On <canvas>, ctx.fillStyle snapshots the resolved color when assigned, so script must reassign ctx.fillStyle and redraw after changing accent-color.

Source: WPT accent-color-keyword-forced-colors.html; WPT accent-color-keyword-animation.html; CSS Color Adjustment 1 — Forced Colors Mode.

Errors, unsupported browsers, and feature detection

CSS color values do not throw exceptions on unsupported resolution behavior. Crucially, CSS.supports("color", "AccentColor") and CSS.supports("color", "AccentColorText") return true even in browsers where AccentColor and AccentColorText ignore accent-color (such as Chrome 149–158, Firefox 103+, and Safari 16.5+), because both keywords parse as valid <system-color> values in all of them. An author who relies solely on @supports (color: AccentColor) will still see the OS or fixed blue/white/black accent colors in engines that have not shipped this change.

Source: BCD css/types/color.json (Chrome 149 / Firefox 103 / Safari 16.5 fixed-blue notes); ChromeStatus interop notes.

Context and exposure

AccentColor and AccentColorText are CSS <system-color> values usable in any document stylesheet, shadow DOM stylesheet, inline style attribute, registered custom property, or HTML <canvas> 2D context. They require no secure context, no permission, no user activation, and no JavaScript. They are not available in Web Workers except where an offscreen canvas does not have a DOM element’s computed style (OffscreenCanvas has no element accent-color).

Source: CSS Color 4 §6.2; WPT accent-color-keyword-resolution.html.

Examples

No interactive demo exists yet on the Chrome Platform Showcase for Chrome 159. The feature owner’s standalone sample is live at kyerebo.github.io/demos/system-accent-color/.

Syncing custom buttons and native controls with one accent-color

<section class="theme-card">
  <label><input type="checkbox" checked> Enable alerts</label>
  <button class="accent-cta" type="button">Save preferences</button>
</section>

<style>
  .theme-card {
    /* Single source of truth for both native inputs and custom UI */
    accent-color: #0b57d0;
  }

  .theme-card[data-tone="amber"] {
    /* Light accent: AccentColorText flips automatically to dark text */
    accent-color: rgb(255, 165, 0);
  }

  .accent-cta {
    background-color: AccentColor;
    color: AccentColorText;
    border: 2px solid color-mix(in srgb, AccentColor 70%, black);
    padding: 0.5rem 1rem;
  }
</style>
Source: CSS Color 4 §6.2; WPT accent-color-text-keyword-resolution.html.

Detecting accent-color following vs fixed system keywords

function accentColorKeywordFollowsProperty() {
  const probe = document.createElement("div");
  probe.style.position = "absolute";
  probe.style.visibility = "hidden";
  probe.style.accentColor = "rgb(1, 2, 3)";
  probe.style.backgroundColor = "AccentColor";
  document.body.append(probe);
  const follows = getComputedStyle(probe).backgroundColor === "rgb(1, 2, 3)";
  probe.remove();
  return follows;
}

if (!accentColorKeywordFollowsProperty()) {
  document.documentElement.classList.add("fallback-accent-vars");
}
Source: WPT accent-color-keyword-resolution.html (probe pattern derived from the test assertion).

Avoiding self-referential cycles and handling Forced Colors Mode

/* Parent defines an accent-color */
.panel {
  accent-color: rgb(20, 40, 60);
}

/* Child copies parent's accent-color without creating a cycle */
.panel > .child {
  accent-color: AccentColor;      /* resolves to rgb(20, 40, 60) */
  background-color: AccentColor;  /* rgb(20, 40, 60) */
  color: AccentColorText;         /* contrasting white */
}

/* In Forced Colors Mode, leave forced-color-adjust at its default (auto)
   so AccentColor / AccentColorText respect the user's high-contrast palette. */
@media (forced-colors: active) {
  .accent-cta {
    outline: 2px solid AccentColor;
  }
}
Source: WPT accent-color-keyword-cyclic.html; WPT accent-color-keyword-forced-colors.html.

Browser compatibility

Support for AccentColor / AccentColorText following accent-color. BCD has no subfeature for this behavior yet; implementation status comes from ChromeStatus, engine PRs/issues, and wpt.fyi (checked 2026-11-24). The base-keyword column is from BCD.
BrowserFollows accent-colorEvidence / notesBase AccentColor / AccentColorText (BCD)
Chrome (desktop, Android)159Enabled by default on desktop and Android per ChromeStatus (Android WebView status is null / unconfirmed in the API record)149 desktop (fixed blue/white outside installed web apps); Chrome Android false in BCD
EdgeUnknown
(in dev)
Chromium-based; wpt.fyi Edge 160.0.4408.0 passes 4/4 cyclic, 4/7 resolution, 2/2 computed-time, 1/12 animation, and 2/3 forced-colors subtests (2026-11-24)149 (mirror)
FirefoxNo releaseMozilla standards position: Positive; no shipped release yet103 (fixed blue / white)
SafariIn developmentWebKit PR #74949 in progress; ChromeStatus lists Safari view as Shipped/Shipping citing that PR, but no stable Safari version is confirmed16.5 (fixed blue / black)
Source: BCD css/types/color.json; ChromeStatus API record; wpt.fyi accent-color-keyword results; webstatus.dev system-color-accentcolor.

Security and privacy

Resolving AccentColor and AccentColorText from the element’s own CSS accent-color value introduces no new storage, network capability, permission, or cross-origin data channel: when accent-color is author-specified, the resolved color comes solely from the page’s own stylesheet. When accent-color is auto (or in Forced Colors Mode), the behavior matches existing system-color resolution; CSS Color 4 notes that system colors can expose OS theme preferences (such as dark mode or user accent color) and allows user agents to return fixed fallback colors (as Firefox, Safari, and non-installed Chrome contexts do) to limit fingerprinting. Chromium’s ChromeStatus record notes no new security risks and lists security/privacy reviews as Pending (checked 2026-11-24).

Source: ChromeStatus security_risks & review status; CSS Color 4 §6.2 System Colors; CSS Color 4 Privacy & Security Considerations.

Specifications

see also