Copied straight from plotly/plotly.js#2951
Bug in online API reference?
The color attribute description, see https://plot.ly/javascript/reference/#bar-insidetextfont-color, lacks that it can be an array of colors as well.
The attribute indeed accepts and works with an array of colors. IMHO this is also correctly specified in https://github.com/plotly/plotly.js/blob/48209a09ac391b6ac2ea540988f2f103f2078d5e/src/traces/bar/attributes.js#L20 through arrayOk: true
CC @cldougl