Here’s how I achieved this (there might be better ways, I’m quite a newbie):
Go to .obsidian/snippets and create a textfile (i.e. editor.css) with the content:
.CodeMirror-lines {
background-color: brown;
}
Save it and switch on in settings ‘appearance’ / ‘css snippets’ the snippet (‘editor.css’) you just created.
Replace ‘brown’ in the file with the color desired.