<!DOCTYPE html>
<html>
<head>
<style>

.box {
    color: CanvasText;
    background-color: Canvas;
}

</style>
</head>
<body>

<div style="color-scheme: dark">
<div class="box">Dark</div>
</div>

<div style="color-scheme: light">
<div class="box">Light</div>
</div>

</body>
</html>
