Open
Description
Problem
Coloring the bars in the bar chart based on some value isn't uncommon (#23265, #26310) and colors=cmap(norm(values))
is serviceable but it'd be nice if folks could directly set the cmap, norm, and data separately-especially for legend and colorbar creation.
Proposed solution
While it has it's problems, scatter has an API for how to manage colormap/norm or colors for discrete markers, so I think it would stay consistent if the scatter API for colors could be ported to bars. Could then probably adapt scatter.legend_elements implementation to auto generate legends from the colors.
ETA: If we did this, it'd probably also be a good reason to implement #7383