To make the directory lists and error pages of the simple HTTP server from http.server more readable in dark environments, a simple dark mode support using a few lines of CSS could enhance user experience. I propose the following CSS code, which uses white font on black background when requested by the browser:
<style type="text/css">
@media (prefers-color-scheme: dark) {
body {
background-color: #000;
color: #fff;
}
}
</style>