data-type
<named-color> — CSS reference
Named colors are fixed case-insensitive keywords with defined sRGB values. They are not user preferences or palette variables. Similar names need not be evenly spaced in color perception. System colors and currentColor are separate keyword categories.
Formal Syntax & Structure
css syntaxcss
<named-color> (e.g. red | rebeccapurple | navy)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:ReBeccAPurple} #b{color:navy}
</style><body><p id="a">First color sample</p><p id="b">Second color sample</p></body></html>