Did some research and found this explanation for you:
"Two reasons are possible.
The first is that there is photosynthetic tissue in the bark. It is hidden by bark pigments until the bark gets wet.
The second is algae and/or mosses that colonize the bark. They go dormant when there is no rain, but quickly inflate and become active when the bark is wet.
In any event, greening of trunks is not universal. The bark of some trees inhibits colonization by algae or mosses, and the bark can be too thick to support living photosynthetic cells. It is normally trees with thin bark that have photosynthetic cells near the surface."
EtherealDrift t1_iuc2zlx wrote
Reply to comment by Squeaky-squash in It started raining and this tree with grey bark suddenly turned tie-dye colours where the water hit. by Squeaky-squash
Did some research and found this explanation for you:
"Two reasons are possible.
The first is that there is photosynthetic tissue in the bark. It is hidden by bark pigments until the bark gets wet.
The second is algae and/or mosses that colonize the bark. They go dormant when there is no rain, but quickly inflate and become active when the bark is wet.
In any event, greening of trunks is not universal. The bark of some trees inhibits colonization by algae or mosses, and the bark can be too thick to support living photosynthetic cells. It is normally trees with thin bark that have photosynthetic cells near the surface."