HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

color-scheme

Description

The color-scheme property for CSS allows an element to indicate the color schemes with which it is designed to be rendered.

Syntax

CSS

color-scheme: value;

JS

object.style.colorScheme = "value";

Values

<'color-scheme'> = normal | [ light | dark | <custom-ident> ]+ && only?
normal

Specifies the element doesn't support color schemes and the element should be rendered with the browser's default color scheme.

light

Specifies the element supports a light color scheme.

dark

Specifies the element supports a dark color scheme.

<custom-ident>

Specifies any valid identifier that is not misinterpreted as a keyword.

only

Forbids the user agent from overriding the color scheme for the element.

Initial

normal

Examples

1 · dark

2 · dark only

3 · light

4 · light only

5 · normal

6 · JS