What controls the overall background color on Z-machine?

I found this right after posting, of course:

Which explains the Gargoyle behavior. I’m not sure about Frotz though.