{
let schemes = Object.entries(d3)
.filter(([k]) => k.startsWith("scheme"))
.map(([name, colors]) => ({ name, colors }));
return html`
<style>
.scheme {
display: flex;
width: ${Math.min(600, width)}px;
margin-bottom: 6px;
}
.scheme .name {
flex-grow: 1;
flex-shrink: 0;
flex-basis: 200px;
}
.swatch-line {
display: flex;
flex-grow: 0;
flex-shrink: 1;
flex-basis: 400px;
justify-items: right;
}
.swatch {
display: inline-block;
flex: 0 1 32px;
height: 20px;
}
</style>
<div>
${schemes.map(
({ name, colors }) => html`
<div class="scheme">
<span class="name">${name}</span>
${swatchLine(colors)}
</div>
`
)}
</div>
`;
}