How to automatically set font colors on an annotated heatmap

Its possible to automatically set the font colors based on cell colors on an heatmap made with figure_factory? For example, if the cell is white the font color should be dark.