Open this example in the interactive library
Source code
<style>
.demo {
color: #0f172a;
background: #f1f5f9;
font-weight: 700;
}
@media (prefers-color-scheme: dark) {
.demo {
color: #f8fafc;
background: #0f172a;
}
}
</style>
<p class="demo">High-contrast status label</p>