Here is an example of a labeled bar chart. Note that the label on the dark blue bar is colored white:
I’d like to duplicate this label contrast behavior in the annotations. I’ve implemented the contrast algorithm detailed here, but this yields slightly different results:
(Note that the label on the light blue bar is now white, in addition to the label on the dark blue bar.)
Is there a way to access the contrast/color value that Plotly is generating for each label? If not, where in the codebase (or online) might I be able to find the contrast algorithm that Plotly uses to determine the label text color?