This function is internal to 'pheatmap' and not exported, but our code depends on it. We added it here till it becomes exported.
pheatmap_scale_colours(mat, col = rainbow(10), breaks = NA, na_col)
matrix
color palette default set to rainbow(10)
number of breaks
color for na values