How to go from UMaterial to an average RGBA vector?C++

Hey people,
I am playing around with parsing level geometry to JSON, and I cannot get my head on how transform the Materials linked to static meshes into simple materials (simple RGBA vector)

Since it’s possible to mix up textures to the BaseColor of the material, I assume the RGB information should be a 2D array right? Therefore I could get the average value of the map~
But I don’t get how to get this array out ~ Anyone can enlighten me?
Thank you if you reach me out ah