For data fields shown on top of map display's, white text on transparent background is best in Dark map mode and black when not in Dark map mode.
Problem is, there is no way to get information on which mode the map view is in. And no way to read the settings (on, off, auto).
I guess the easiest solution would be to have GetBackgroundColor() for a data field shown on top of a map to return black in dark mode or white when not in dark mode. But the very best would be to have a method returning "not on top of map", "dark mode", "not dark mode" kind'a information.