Open this example in the interactive library
Source code
<style>
.demo {
background: #e0f2fe;
color: #0c4a6e;
}
@media (prefers-color-scheme: dark) {
.demo {
background: #0c4a6e;
color: #e0f2fe;
}
}
</style>
<div class="demo">Choose colours from the system theme</div>