There are two parts to this, first I save the color of that mesh also in the structured buffer which holds the position of the vertices (this happens in compute shader), second sampling that color in the shader of the mesh to color that particle accordingly.
So for the first part the line 100 samples the texture of the mesh using the uv of the vertex and saves it in the structured buffer of the mesh:
https://github.com/IRCSS/pointclouds-compute-shaders/blob/1f5b7e492c40288454b2455ee37d1e87ff18d005/Assets/PointCLouds/pointCloudMain.compute#L100
I am reading the color from the texture, but it could have also come from the vertex color, or other sources. Also this is with compute shader, if you don’t have access to compute shader and are instead writing the vertex position to a texture (like in the technique discussed in the Unreal forum, linked in the further reading and resources section), then you would need a second texture for colors parallel to the positions with the same indexing.
The second part happens in the shader of the mesh on line 69 https://github.com/IRCSS/pointclouds-compute-shaders/blob/1f5b7e492c40288454b2455ee37d1e87ff18d005/Assets/PointCLouds/Points.shader#L69
p is the particleData declared in line 38. It holds that color in the structured buffer which was written in the compute shader.
Hope that helps!