function getPalette(allLegoColors, paletteColorIds, paletteColorNames) {
const legoColors = fromIds(allLegoColors, paletteColorIds, paletteColorNames);
const columns = [
"name",
"rgb",
"colorId",
"last6MonthsUsed_avgPrice",
"currentUsed_minPrice",
"currentUsed_maxPrice",
"currentUsed_avgPrice"
];
if (paletteColorNames) {
columns.unshift("paletteName");
}
const table = Inputs.table(legoColors, {
columns,
header: {
name: "Name",
rgb: "RGB",
colorId: "col#"
},
format: {
rgb: rgbCol,
colorId: link,
paletteName: (name) => html`<b>${name}</b>`
},
maxWidth: 1500,
layout: "auto"
});
return html`<div>
${table} Cost per 1000 (equal amount of each color, min, max, avg):
<b>${getCostPer1000(legoColors)}</b>
</div>`;
}