From @nicolaskruchten :
While testing this I also found some cases where the hoverlabel text doesn't automatically contrast with the bgcolor in a sufficient way ... setting layout.hoverlabel.bgcolor = "white" gives this, where issue 1 is that the bottom overlabel doesn't have black text and issue 2 is that the trace-name portion of the label doesn't have black text. Setting layout.hoverlabel.font.color = "black" only corrects issue 1.

From @nicolaskruchten :
While testing this I also found some cases where the hoverlabel text doesn't automatically contrast with the
bgcolorin a sufficient way ... settinglayout.hoverlabel.bgcolor = "white"gives this, where issue 1 is that the bottom overlabel doesn't have black text and issue 2 is that the trace-name portion of the label doesn't have black text. Settinglayout.hoverlabel.font.color = "black"only corrects issue 1.