diff --git a/src/generators/background-colors.js b/src/generators/background-colors.js index 9d4d39bec..628c7b4fc 100644 --- a/src/generators/background-colors.js +++ b/src/generators/background-colors.js @@ -11,7 +11,12 @@ function findColor(colors, color) { module.exports = function ({ colors, backgroundColors }) { if (_.isArray(backgroundColors)) { - backgroundColors = _(backgroundColors).map(color => [color, color]).fromPairs() + backgroundColors = _(backgroundColors).flatMap(color => { + if (_.isString(color)) { + return [[color, color]] + } + return _.toPairs(color) + }).fromPairs() } return _(backgroundColors).toPairs().map(([className, colorName]) => {