If while walking your dog, you notice that your dog barks more at people of color than lighter-skinned people, you may be mortified and feel compelled to ask, "Is my dog a racist?"
Rest assured, race is not on your dog's mind. Race and racism are human constructs. Your dog does not harbor any racial-supremacy views. Your dog simply has a narrow idea of what a safe human should look like. You do not need to feel embarrassed about this, just be aware that there are ways to remedy it. With some training (using dog treats as a reinforcement) and positive exposure, he or she can expand this idea. If your dog is a protector or a herder, then he or she will have a ways to go before feeling completely at ease with different looks but it is still possible.
However, someone who looks different from you and the people you spend time with may startle your pup. The phrase "look different" can go well beyond skin color: height, hair style, head-wear, eye-wear, piercings, tattoos, or even make-up can set your dog off on a barking crusade.
When my dog first went to daycare, all of the young hipsters with purple hair and facial piercings freaked her out. She did not understand why there was any metal on another's lip or eyebrow and took pains to express her trepidation. Fortunately, she soon got over that and now embraces hipsters across the city: even those with man-buns. But it took time for her to get used to that.
Essentially, she initially understood people's faces as needing to conform to a certain look; when they did not, it frightened her. It's not unlike human children, but unlike people, dogs do not resort to a sense of tribalism. They simply need to gain an understanding of what else people can look like. When she learned that there were people who loved her and took care of her, even though they looked differently from how I looked, she grew more at ease.
There might be some things that upset your dog about a person's look that have nothing to do with race. Many dogs do not like a person's eyes to be covered up. Another's eyes will give a dog information about what that person's intentions are: are they looking directly at the dog? At you? At some food across the room? If your dog is a protector at all, then they will notice this. But if they cannot see the eyes of a person who is moving towards them or you, then they will understandably get nervous and bark.
Something you can do is practice wearing sunglasses around your pet, and have your friends do the same thing. This may not stave off every instance of barking but it's a good way to warm up. It's also helpful to know in advance if your pup does this. If you are ever pulled over by police - hey, it happens to the best of us - with your dog in the car, make sure that your dog is either at ease or that you inform the police that sunglasses frighten your dog. You may also want to practice with ski goggles and/or helmets with visors, if those are available to use. Preparation is the key.
Hats are something to be aware of as well. If a person is wearing a simple beanie, then most likely your dog will not cause any problems. However, if a hat appears to elongate or stretch out somebody's head, then there might be some barking. Hats and sunglasses together can definitely stop your dog in his tracks so exposure is the key. Walks in the city or hikes will provide plenty of exposure to the differently-styled. My dog slowly got used to the idea of my father wearing a baseball cap but did not like the fishing hat with lures on it at all. It's a process (although to be fair to my dog, that fishing hat is pretty awful).
People in wheel chairs or who need crutches or some type of structural aid may also alarm your dog. This can be particularly galling to you, the dog-owner, because obviously the last thing you want to do is make someone feel even more self-conscious about a disability. If this is a person you are going to be socializing with, ask for the person's permission and if granted, allow your dog to get a good sniff of the wheel chair or aid. But respect that person enough to know you may have to either keep your dog held back or remove your dog altogether.
Finally, there are some things that may just strike your dog as completely strange. People in clown make-up or full body costumes where faces are covered by either make-up or a mask are, for the general population, not common enough occurrences to give your dog proper preparation time. If you are hosting a costume party, then know your dog may not feel comfortable around all of your guests. You may need to slowly introduce him to just one or two people at first. If you can remove a mask in front of the dog before putting it back on, then do that in a sparsely populated room at first. The same is true for trick-or-treaters: your dog may not feel comfortable with strange-looking people continuously knocking on the door and taking your food. I noticed that my herder was fine with children in costumes and masks but did not like adults who did the same. That was a relief but it may not apply to all dogs. If you are hosting a children's costume party, you will need to be especially careful of your dog's potential reaction. Tell the children that the dog finds costumes and masks a little scary. If they want to pet the dog, they may need to remove parts of the costume first.
Know your dog's body language too: if he or she gives the "whale eye" or you see the fur starting to rise, your dog is giving clear signals that he is scared. Don't let others taunt your dog or there could be an unfortunate result. If your dog gives any of these signs, or growls at anyone, remove him from the group at once.
Your dog can love a wonderful array of diverse people. Learn your dog's signals and work in incremental exposure. Your job as a dog owner is to keep both your pup and those around him as safe as you can. Try not to be frustrated. Your dog will adjust on his own time and will soon learn to trust others as you do.