property
forced-color-adjust — CSS reference
This inherited property controls whether forced-color adjustments apply. Auto permits browser adaptation. None opts an element and its inheriting descendants out; reserve it for a narrowly scoped essential color sample and keep a text label outside it. Preserve-parent-color has special handling of inherited color, useful in selected SVG-related cases; the example only tests auto and none.
Formal Syntax & Structure
css syntaxcss
auto | none | preserve-parent-colorWorking Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS accessible theme lab</title><style>body {margin:0} .sample {height:12px;background:#006050}#swatch{forced-color-adjust:none;background:#0060a0;color:white;width:48px;height:24px;border:1px solid black} #a{forced-color-adjust:auto}</style><body><p id="a">Brand color: #0060a0</p><div id="swatch" aria-hidden="true"></div></body></html>