import { Prefix } from '../constants'; import { customPalette as colors } from '../../../../src/style/variables'; import { getVarName } from '../helpers'; export const getColorPalette = () => { const variations = {}; for (const key in colors) { variations[key] = []; if (colors.hasOwnProperty(key)) { const baseVarName = getVarName(Prefix.color, key); for (let i = 0; i < colors[key].length; i++) { const newColor = { hsl: `${baseVarName}-${i + 1}`, hex: colors[key][i], }; variations[key].push(newColor); } } } return variations; };