data-type
<color-space> — CSS reference
A color space specifies coordinates, reference conditions and the mapping to a color. Gamma-encoded sRGB and linear-light sRGB represent the same primaries but encode intensity differently. Color interpolation and conversion must account for the chosen space. The exact allowed space identifiers depend on the consuming function.
Formal Syntax & Structure
css syntaxcss
color(srgb 0.5 0.5 0.5); color(srgb-linear 0.5 0.5 0.5);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:color(srgb 0.5 0.5 0.5)} #b{color:color(srgb-linear 0.5 0.5 0.5)}
</style><body><p id="a">First color sample</p><p id="b">Second color sample</p></body></html>