colorData = {
const colorObject = flatten(baseColors);
return Object.entries(colorObject).map(([key, hex]) => {
const c = new Color(hex);
const p3String = createVibrantP3(hex);
const [origL, origC, origH] = c.to("LCH").coords;
const [p3L, p3C, p3H] = new Color(p3String).to("LCH").coords;
return {
key,
hex,
origL,
origC,
origH,
p3: p3String,
p3L,
p3C,
p3H
};
});
}