media-feature
Color index — CSS reference
Reports the number of entries in the output color lookup table; zero means no such table. It is not the same as bits per color component.
Formal Syntax & Structure
css syntaxcss
@media (color-index: 0) { /* conditional declarations */ }Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>color-index</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}@media (color-index: 0) {#a{color:rgb(0,100,0)}}</style><body><main id="a">Resize the viewport to explore this example.</main></body></html>