I have a work around figured out last week.
It turns out that the html notes are stored internally as html file, even when you edit it in the markdown editor.
The evidence is that if you export a html note to markdown + front matter, the output file is still an html file!
So the solution is the following:
- export notes to markdown + front matter
- change the html file extension to md
- import the markdown + front matter backinto joplin
Then even though this note contains extensive html markup, in Joplin it is recognized as a markdown note, and the background color works because as we know it works for the markdown notes!