I have not done significant testing but I was looking at this recently and responding to Jolenia in game chat so I will share the results here. I just did some basic 3-and-more gem matching at different masteries and this is what I found (this was all done on yellow mana):
At 11 Mastery I was receiving 34 mana on a 3 match and 67 mana on a 6 match (an increment of ~11 mana per +1 match
At ~50 Mastery I was receiving 41 mana on a 3 match and 81 mana on a 6 match (an increment of ~13.5 mana per +1 match
At my highest mastery currently (182) I was receiving 49 mana for a 3 match and 99 mana on a 6 match (an increment of ~16.5 mana per +1 match)
I did all matches from 3 through 8 on each of these mastery levels and the increments bore out. From this cursory data it looks like there is significant diminishing returns on Mastery. Clearly there is a “starting formula” for mana per match (base 0 mastery) but increase to mastery looks like a downward slope of return the higher you go. This would at least suggest that at higher levels it really doesn’t matter what color gear you have; you should focus on bonuses and traits.
EDIT #1: I offer the caveat that I don’t know if certain elements of the game are working/not working as intended and to the best of my knowledge I did not have any gear equipped that gave traits/bonuses that effected the mana collection based on gem match
EDIT #2: Based on @Tresk 's question below, I revisited the loadout swapping and confirmed that changing between the 3 loadouts does not seem to auto update the numbers in the Stats screen. However when I swapped characters and then back to the +0 Light Mastery loadout, the stats screen did update and my Light Mastery was 168 instead of 182. Also swapping out specific pieces of equipment also seemed to be updated in real time to the stats page. Ultimately however, the mana gain barely changed as noted further in this post