Actually scrap that it’s possible by overlaying heatmaps with different xgap, ygap and colorscales
import plotly.graph_objects as go
go.Figure(
data=[
go.Heatmap(
z=[[1, 1, 1], [1, 1, 1], [1, 1, 1]],
xgap=4,
ygap=4,
colorscale=["#08a", "#08a"],
showscale=False,
),
go.Heatmap(
z=[[1, 1, 1], [1, 1, 1], [1, 1, 1]],
xgap=20,
ygap=20,
colorscale=["#fff", "#fff"],
showscale=False,
),
],
).update_layout(
yaxis_scaleanchor="x",
plot_bgcolor="#fff",
width=400,
height=400,
margin=dict(b=0, t=20, l=0, r=20)
)