Set background color or border to scatter marker text

I’m currently plotting a scatter trace on top of a countour trace, but given that the contour can have the whole gradient of colors it is not possible to chose a text color that will fit all possible backgrounds.


For the symbol I use a white border which helps when plotted on top of the contour and is irrelevant in the white background.

Is it possible to set a background or any effect to the marker text?