For users with visual impairments, the MakeCode Editor offers an inbuilt High Contrast Mode that inverts colours, this animation shows how to enable it from the settings menu:



The Python Editor doesn't currently support this, but if you are able to use Chrome you can use the High Contrast Extension to do the same or enable it in Windows. Different options will alter the display of the code.