Lets make the comments into an answer:
How does this relate to the image below? Are the black lines representative of gluons?
The black line represent quarks, the wiggly ones gluons.
So are gluons what mediate pion exchange, which is in turn what binds protons and neutrons with the strong nuclear force?
The strong nuclear force is a spill over force from the strong color force. The diagram you show is for the valence quarks of protons and neutrons. The reality of a nucleus is much more complicated see this
where exchanges of gluons are the binding force in the bag. The whole nucleus is color neutral and the model used to calculate the nuclei is lattice QCD , because of the complication of the multitude of strong gluon interactions within the hadron bag.
It is only neutral in color quark combinations that could range as virtual exchange particles outside the bag, creating a spill over force, as with the diagram above. A gluon is always colored and has to remain within the nucleon, within the hadron bag, there is a probability to create a virtual color neutral combination, which can then be the carrier of a spill over force that can interact with another color neutral nucleus. The pion is the lightest such combination.
Actually the pion as an exchange between nuclei was proposed long before color forces were even imagined, by Yukawa:
The Yukawa interaction was developed to model the strong force between hadrons. A Yukawa interaction is thus used to describe the nuclear force between nucleons mediated by pions
.....
In 1935 he published his theory of mesons, which explained the interaction between protons and neutrons, and was a major influence on research into elementary particles
So gluons mediate the strong color force, pions mediated the strong nuclear force, and the diagram above is one of the possible ways the pions could be created within a nucleus and get out to interact with another nucleus.