How can there be any communication at all since what we perceive of the world is totally contained in our brain?
The very word meaning becomes meaningless since there are no objective phenomenon to discuss, only perceptions in the brain and my perceptions are just as meaningful as yours so if I say a given wavelength of light is green and you say it's blue we're both right.
You're actually conflating things on several levels here.
First of all, we're not talking about the names of things. What we're after is determining what the phenomenology is, which can be done... for example, we can determine various types of color blindness, synesthesia, etc.
But like it or not, it's 100% true that "what we perceive of the world is totally contained in our brain". How could it be otherwise? Neural activity takes time, so by the time you're consciously aware of anything, it's over, done.
Besides, neural activity is not the same thing as light, pressure, temperature, air motion, chemicals, and so forth.
And the phenomenology -- color, sound, pain, the sense of heat, etc. -- is not the same thing as neural activity.
So your conscious experience is already twice removed from "what's out there" -- a translation of a translation.
But because we're of the same species, with brains built the same way, we can be confident that we by and large share the same phenomenal palette, just as we share similar digestive processes and cardiovascular processes.
That's how communication happens.
We now know that imagination and experience use the same real estate in the brain. To think about, say, what you're going to do this afternoon, your brain uses the same processes that are active when you're actually doing those things, just more weakly.
Meaning in the brain is activation of associations.
That's why you can't explain color to someone who's been blind from birth because of damage to the visual cortex. Their brains don't produce color, so no matter what you say, their brain isn't going to make an association by activating the bits of their brain that produce color, because they have no such bits.
But you can tell me "It's a sort of light peach shade, kind of like an orange creamcicle" and I'll know what you're talking about because those words light up areas of my brain that I use when I actually experience color, but not enough and not in the same way that would actually cause me to think that the color is really in front of me.
Truth boils down to what works, at least in its simplest form. My perception of a tree in front of me is true if that perception allows me to climb the tree or cut it down or hang a birdfeeder off it or pull fruit from it or whatever.
And it's just part of the human condition that, if I'm hallucinating, others will know there's no tree, but I won't.
When my stepfather had brain cancer, I recall he saw a dog in the back yard, which was fully real to him, even though it wasn't there. Tragic, but real. That's just how it is, like it or not.