Usage
makeSVG({
width: 100,
height: 100,
layers: [
{
color: "#e22",
name: "Diamine Brilliant Red",
strokeWidth: 0.5,
routes: Array(40)
.fill(0)
.map((_, i) => [
[10 + i, 10],
[80 + i / 4, 90],
]),
},
{
color: "deepskyblue", // also a valid CSS color
name: "Diamine Turquoise",
strokeWidth: 0.5,
routes: Array(40)
.fill(0)
.map((_, i) => [
[90 - i, 10],
[20 - i / 4, 90],
]),
},
],
});
Result:
notice the usage of "multiply" reproduces ink blending pretty accurately. (real world example: https://greweb.me/plots/291)
License of the code shared here: