CSS color-scheme Property
Example
Set the entire page to a dark color scheme:
:root {
color-scheme:
dark;
}
Try it Yourself »
Definition and Usage
The color-scheme
property
indicates which operating system color scheme an element should render with.
Default value: |
normal |
Inherited: |
yes |
Version: |
CSS Color Adjustment Module Level 1 |
JavaScript syntax: |
|
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Property |
|
|
|
|
|
color-scheme |
81 |
81 |
96 |
13 |
68 |
CSS Syntax
color-scheme: normal|light|dark|only;
Property Values
Value |
Description |
normal |
The element should be rendered with the operating system default color
scheme |
light |
The element should be rendered with the operating system light color
scheme |
dark |
The element should be rendered with the operating system dark color
scheme |
only |
Forbids the browser to override the color scheme for the element |
W3schools Pathfinder
Track your progress - it's free!