data-type

<system-color> — CSS reference

System color keywords represent roles in a browser or user-selected palette rather than fixed RGB numbers. Pair matching roles, such as Canvas with CanvasText, instead of assuming specific values. Their values may depend on color scheme and forced-colors mode. Deprecated aliases exist; use semantic modern roles.

Formal Syntax & Structure

css syntaxcss
Canvas | CanvasText | ButtonFace | ButtonText | Highlight | HighlightText | … (examples)

Working Example

Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS color lab</title><style>body {margin:0} .sample {height:12px;background:#006050}p {padding:12px;background:white;color:black;border:2px solid currentColor} #a{color-scheme:light;background:Canvas;color:CanvasText} #b{color-scheme:dark;background:Canvas;color:CanvasText}
</style><body><p id="a">First color sample</p><p id="b">Second color sample</p></body></html>
CSS Reference