Is there anything in the British constitution that prevents them having a Black or Muslim Prime Minister?
You most certainly are allowed to ask. UK does not have a written consitution and there is nothing to stop anyone becoming prime minister, even a complete foreigner, a person who is not even a British citizen can become PM. But of course none of this can happen until such a person has raised a political party, been elected as an MP then won a general election. Far more difficult than it all sounds. The head of state of UK is NOT the prime minister. The UK head of state is HM Queen Elizabeth II. Thus if a despot or some other horrid person were to win an election and thus claim to be PM they would first have to go to HM Queen to ask her permission to form a government. She might very well refuse.