Heatmap visualizer for underlying grid.

Hello, material noob here, I am creating a vector field pathfinding and I want to visualize the heatmap like this:
Efficient_Pathing_Path_vs_Linear_Distance

The cost of each tile determines the distance from the goal, so the closer tiles are darker with smaller values and tiles further are bright with larger values.

I have the grid and cost function all working as expected.

But I don’t want to spawn smaller planes and assign color values, I want to get more into materials and I think this exercise would be a good one, so what I thought of is making a plan that encompasses the entire grid and on that plane I can read value from underlying tile and change its color.

Is this something possible in the material editor?

Thanks in advance.