Colour Bar for heatmap does not render for SVG

When rendering a heatmap with a colour bar as a PNG this displays perfectly

However when I render as an svg the colour bar goes black. Image and MWE below
image

using CairoMakie
a = rand(10,10)
f = Figure();
ax = Axis(f[1,1])
hm = CairoMakie.heatmap!(ax,a)
Colorbar(f[:, end+1], hm)   
f

# Render as SVG 
CairoMakie.activate!(type = "svg")
f
1 Like

Partially confirmed in Pluto (not from the REPL), and firefox.
Except here the svg image is just black.

A direct save("try.svg", f) is weird as well (black in firefox/libreoffice, blurry in inkscape).
This looks like this comment.

1 Like

I suspect it’s that the colorbar is a 1-pixel wide image. Somebody could try and see if that’s actually the problem, if so there would be several options for workarounds

I suspect it’s that the colorbar is a 1-pixel wide image

I saw your comment above after writing this comment,
which adds some support to your analysis.

What do you mean by “try and see if that’s actually the problem” ?
I’d be glad to help, but know close to nothing about svg.

It might be trickier though, as this comment says

Or in other words: It’s not a SVG gradient at all, it’s a encoded PNG used as pattern fill - bitmap data.