Setting both color maps and opacity when plotting rasters and heatmaps with Makie

Hi all, I’m looking to make a plot of some rasters (or if all else fails heatmaps) of values using Makie where the base color is independent of the opacity. Trying to blend two bits of information here where there are two different arrays, one for the colorrange, and one for alpha values.

From looking at the gallery and docs, they all mostly show alpha being fed in as a single parameter. Is there a way to achieve the above?

If you don’t have a specific package in mind, check the viz recipe in GeoStats.jl. You can pass a vector of alpha to achieve the desired result.

See a small imagealpha() recipe I shared some time ago here on discourse: How to implement Value Suppressing Colormaps in Makie - #6 by aplavin
Maybe image() should just support alpha=matrix natively?..