Fundamentally countries have a right to self determination and that includes the future direction of the countries, culturally, economically, etc. So long as it does not encroach on other countries' sovereignty.
In the US we actually had a racist immigration policy, the Chinese Exclusion Act [0] because it was actually applied to a single race created by actual racists. Do you see the difference?
And yes, the Chinese exclusion act was by definition racist... But no one in any major western country is talking about excluding one race or even nationality of people outright (Trump talks about "pausing" immigration from conflict zones).
People do speak about controlling their legal immigration and deterring illegal/undocumented/etc. immigration (but pretty much all countries do have visa requirements (or inter country-region agreements) --even those who mainly export workers.
I don't actually consider the UK's immigration policy as racist. Short-sighted, definitely. but racist? Definitely not
But these immigration and cultural issues aren't necessarily racist. The weight behind anti-immigration movements includes other social/cultural/economic opinions, in addition to flat-out racism.
There are aspects of their history which was racist and the treatment of people of Korean descent living in Japan for generations is debatably racist (more ethnicist than racist) but their immigration policy, I don't think is racist just because they are very strict about accepting new immigrants and naturalizing people.
I think it is also clear that it would be foolish to just focus on the "you're a racist!" angle.
Today's globalization and technology -- while bringing many benefits to the world -- also are leaving a lot of people behind, as seen by the growing inequality in much of the world today.
So you look at the Brexit demographics. The single biggest predictor for the Brexit vote appears to be average educational attainment -- the higher educated the area, the more likely the Remain vote. Social class was also a strong predictor -- lower middle class and above leaned Remain, working class and below leaned Leave. (http://www.theguardian.com/news/datablog/2016/jun/24/the-are...)
The core issue to me, is that no one has really come up with a great solution for people "left behind" in today's economy (eg, those with low education or low skills). For them, things really are worse than it used to be. I know in the US, for instance, that real hourly wages for the lower class actually have fallen 5% over the last 25 years (http://www.epi.org/publication/charting-wage-stagnation/). I cannot find similar charts at the moment for the UK, but I think I remember reading that it's similar (maybe even worse).
I believe a lot of these people have latched onto immigrants as the problem, as a proxy for issues brought on by other factors. Perhaps because immigrant culture is a very visible sign of global change, and they know things are crappier than they used to be... and, well, they blame what is obviously new and strange to them. This is a phenomenon found in many places, from Donald Trump to the Le Pens.
It's wrongheaded -- I believe this vote will economically hurt the lower classes more than the middle to upper class. The world is not going to un-globalize and technology is not going to un-invent itself. But without solutions to address inequality and wage stagnation, I'd expect more votes in the same direction.
But this seems to be the pattern. A lot of young, technical people here, are upset and one way to show their anger and disappointment is to just say their countrymen who voted the way they did hate darker skin colors.
It is hard to argue against that because if they say "that's not why", the reply is probably "oh, but they'll never admin in public, so they are still racist".
I can understand and see anger and effect it has, but I think it show badly and paints them in a bad light. In other words those that jump up and yell racist! are not looking tollerant or in general don't manage to convince other effectively as to why EU was a better option.
(Economic advantage and breakage of those ties is a much better argument and I can see that one being real).
There is a lot of talk about Camerons failure, but really what has happened is that the Labour party has been too dysfunctional for too long, and populists like Farage took the opportunity to fill the void.
Would you prefer xenophobic?