Makie: Colorbar with the "High" and "Low" labels

A slightly easier way is to use a subgrid and place two labels and the colorbar in there.

begin
    fig = Figure()
    ax = Axis(fig[1,1], height=300, width=300)
    heatmap!(0:0.1:10π, 0:0.1:10π, [cos(x)+sin(y) for x in 0:0.2:20π, y in 0:0.2:20π],colormap=:viridis)
    subgrid = GridLayout(fig[1, 2], tellheight = false)
    Label(subgrid[1, 1], "High")
    Colorbar(subgrid[2, 1], colormap=:viridis, colorrange=(0,1),vertical = true, height=120, width=15, halign=:center, valign=:center,flipaxis = true, labelsize=20, labelpadding=10, ticksvisible=false, ticklabelsvisible=false)
    Label(subgrid[3, 1], "Low")
    rowgap!(subgrid, 5)
    resize_to_layout!(fig)
    fig
end

If you don’t constrain the colorbar height the labels will then match the edges of the axis, which can be nice.