You're right, but I think this depends on the browser too. I actually pass a stylesheet in the HTTP response header to make text appear white on a black background. Firefox respects this, but Chrome doesn't (at least for plain text files):
link: <https://txtify.it/dark.css>; rel="stylesheet"
Will have to test again when I get some time to see what the options are. Might be a bit of a hack as there really aren't any HTML elements to target, so it might be that Firefox applies the CSS after inserting the text into an HTML template.