Tried a few things, including using the same colors as error messages from the Console, but I found the light pink background used in Console to be too subtle for a short message. (We made it very subtle because Console errors can have a lot of content and different text colors; which is not a concern here.)
So instead I kept the white text, and used:
- Red 60 background in the light theme (contrast ratio: 5.36:1)
- Red 70 background in the dark theme (contrast ratio: 8.12:1)
The Red 70 background looked too dark/de-saturated in a light context, and the Red 60 looked a bit too vibrant in a dark context, so I think that's a decent solution. Both are accessible (>=4.5:1).