function svgFromScheme(scheme) {
const svg = d3.create("svg").attr("width", 700).attr("height", 50);
svg
.selectAll()
.data(scheme)
.enter()
.append("rect")
.attr("width", 50)
.attr("height", 50)
.attr("fill", function (d) {
return d;
})
.attr("x", function (d, i) {
return 50 * i;
})
.attr("stroke", "black");
return svg.node();
}