diff --git a/client/src/components/production-board-kanban-card/production-board-kanban-card-color-legend.component.jsx b/client/src/components/production-board-kanban-card/production-board-kanban-card-color-legend.component.jsx index e9cc0f4e0..15b33ccc4 100644 --- a/client/src/components/production-board-kanban-card/production-board-kanban-card-color-legend.component.jsx +++ b/client/src/components/production-board-kanban-card/production-board-kanban-card-color-legend.component.jsx @@ -2,12 +2,21 @@ import { Col, List, Space, Typography } from "antd"; import React from "react"; import { useTranslation } from "react-i18next"; -const CardColorLegend = ({ bodyshop, cardSettings }) => { +const CardColorLegend = ({ bodyshop }) => { const { t } = useTranslation(); - const data = bodyshop.ssbuckets.map((size) => ({ - label: size.label, - color: size.color?.hex ?? "white", - })); + const data = bodyshop.ssbuckets.map((bucket) => { + let color = { r: 255, g: 255, b: 255 }; + + if (bucket.color.rgb) { + color = bucket.color.rgb; + } + color = bucket.color; // default to white + + return { + label: bucket.label, + color, + }; + }); return (