I’m reaching the edges of my CSS knowledge here (but that’s nothing new).
I’m able to set a background on the canvas element, but I can’t seem to create anything that overlays the canvas, because of the way it renders.
With CSS it turns out you can set multiple backgrounds and choose a blend mode, so I was able to layer the gradient and a starry SVG under the graph, but I wasn’t able to do much beyond that.
It’s a start, but needs a bit more work to make it look really nice.
canvas {
background-color: #161616;
background-image: var(--stars-svg), linear-gradient(134deg, rgba(72, 54, 153, 0.8) 0%, rgba(6, 1, 28, 0.8) 100%);
background-blend-mode: soft-light;
}
.graph-view.color-fill {
color: #afaaca;
}
.graph-view.color-circle {
color: #ffffff;
}
.graph-view.color-line {
color: #3d3566;
}
.graph-view.color-text {
color: #afaaca;
}
.graph-view.color-fill-highlight {
color: #11083f;
}
.graph-view.color-line-highlight {
color: #afaaca;
}
html {
--stars-svg: url("data:image/svg+xml,...");
}
I’ve left out the full SVG code for the sake of brevity (and because it was not a great image, to be honest)
I found a free starry .eps file here deleted the big star and the background, saved it as .svg and then used this tool to URL-encode the SVG data into a css background-image (in the --stars-svg: variable)
I’m sure you should be able to find / make a better starry SVG.
Plus you could play around with different blend modes, different gradients, stacking more gradients/SVGs, etc.