Ethnicity and culture
Ethnicity and culture are socially defined categories of people who identify with each other because of their ancestors, society, religion, region, or other kinds of experience that they have in common with each other. This is part of how they think of who they are, and how they see themselves-- or are seen by others-- as different and separate from other groups. The shared background of ethnicity and culture are part of what give shape to how a group of people think of gender roles, and whether they give recognition to transgender and nonbinary gender identities. There are also some aspects of racism that specifically influence transgender and nonbinary people, or of which they need to have awareness.
Gender roles unique to certain cultures and ethnic groups
See main article: Gender-variant identities worldwide.
The shared background of ethnicity and culture are part of what give shape to how a group of people think of gender roles. For example, how many gender roles to which they give recognition, what expectations they have for those roles, and how they let people into those roles. Some ethnic and cultural groups give recognition to certain gender roles that others don't.
Racism and cultural discrimination
There are several forms of racism and cultural discrimination that specifically influence transgender and nonbinary people, or of which they need to have awareness. These issues include cultural appropriation, binarism, and false comparison.
Cultural appropriation is the act of taking things from another culture that belong only to that culture. Cultural appropriation is a mistake that nonbinary people themselves can make. There are many words for gender nonconforming gender identities and gender expressions that belong only to people of color, or only to a certain ethnicity or culture. People from other ethnicities and cultures aren't entitled to call themselves by those words, because they would be taking something that doesn't belong to them. For example, the gender/sexual identities of ag, stud, and boi originated in African-American culture, and only African-American people can call themselves by these words. Only people of color can reclaim the term third gender, because Western anthropologists had only applied it to LGBT people of color in a way that othered them.
Cultural appropriation generally refers to a white person taking something that should only belong to people of color. Generally speaking, the reverse is not cultural appropriation: identities that originated among white people are available for anyone to adopt. This is because cultural appropriation is generally a problem of white oppressors taking substance away from oppressed people of color for their own use. An oppressed people can't do comparable harm to their oppressors. However, it is still a problem for people of color to appropriate from the cultures of different groups of people of color. For example, an African-American nonbinary person is not entitled to call themself Two-Spirit, as this identity can only be adopted by Native Americans. That case is still cultural appropriation.
Sometimes there is dispute about whether a word belongs only to a certain culture, and if so, to which. The word "boi" has many meanings in different groups, and there are currently people of all ethnic backgrounds who call themselves by that word. A person who studies language and tells people how they should talk (a prescriptivist linguist) may say the word should still only be used by African-Americans. A different kind of linguist, who documents how language is used, without telling people what to do (a descriptivist linguist), would have a different view. Another dispute is about the name and description of the nonbinary gender identity pangender ("pan" meaning all). Critics express the concern that this means that person also has all ethnic genders. Otherwise, such a person should only say they have "many genders," and call themself multigender. Supporters of the word "pangender" say that by "all genders," they only mean all the genders that they're entitled to, within their own ethnicity and culture.
People can do cultural appropriation by accident, not knowing or thinking enough about it. For example, a nonbinary person can easily make up the word "Two-Spirit" or "third gender" for themself, without knowing that these words already had another meaning. It could be an innocent coincidence. Once that person finds out, the right thing to do is to let go of those words, and take up different words for themself.
See main article: Binarism.
There are some kinds of discrimination that are both sexism and racism at the same time. Binarism is the common but wrong idea that there are only two genders, and this idea is expressed in a way that is a feature of colonialism and Western imperialism, which forces other cultures and people of color to conform within the white, Western gender binary system. Binarism is a form of sexism that erases ethnic nonbinary gender roles and identities, such as Native American Two-Spirit and Samoan Fa'afafine. Binarism is also part of why the Western anthropologist's term third gender is now coming to be seen as offensive.
When people try to talk about other kinds of discrimination than racism by comparing them to racism, this kind of comparison can be offensive. It is often a false comparison. It ignores some important differences between how racist discrimination happens, and how other kinds of discrimination happen. One well-known example of this comparison is Douglas Hofstadter's short satirical essay, "A Person Paper on Purity in Language," about a fictional world in which racism is so pervasive that even personal titles and pronouns have long been based around race instead of gender. The essay is effective in its intention to show how pervasive sexism is in real life. However, despite the essay's best efforts, it still downplays how racism actually does pervade language and daily life, and therefore makes racism look as if it was a smaller problem than sexism.
Tips for nonbinary people trying not to be racist
It's no help to say "I'm not racist," or "I didn't mean it in a racist way." Being non-racist is an active process, not a passive process that just happens in the absence of intentional racist acts. A person must work at being non-racist by doing research to inform one's self about the issues; when one makes mistakes, admit them, apologize, and do what one can to set things right. Here is some advice about how to be respectful about issues of ethnicity, culture, and racism that come up specifically in relation to nonbinary and transgender issues.
- If you want to take up a certain word for your gender identity, do research on it before you start using it for yourself. Learn all you can about the word's history. Find out if it's mostly or only used by people of certain ethnicities or cultures. If so, and you don't have that ethnicity or culture, then you are not entitled to use it. Don't use that word, and look for a different word to which you are entitled.
- You might find a controversy about whether people like you are entitled to the word, so you aren't sure if you can use it. If so, then give much thought to how you would feel about being seen as connected to that controversy, and how you would feel about often defending your use of it.
- If you wish you could take up for yourself a nonbinary gender identity label that is only for people of color, and you make up a new gender label that is very derivative of that one, that is still appropriation. For example, if a white person wished they could call themself Two-Spirit, which is for Native Americans only, it would still be appropriation if that person made and took up a label derivative of those, such as "three-spirit." 
- Don't compare sexism to racism. Find a way to get other people to understand about sexism, without making that one analogy.
- Be careful about how you talk about the genders of people from other cultures, or from long ago. Even though it might be hard to find out, do your best to show respect by using the words and views that those people would use for themselves. It might be wrong to call them by Western or modern words, such as transgender, nonbinary, or third gender. It also might be wrong to re-frame their gender from a Western, modern perspective, such as telling their life story in a way that makes it fit into the transgender narrative. That said, the language from their time and place may be seen as offensive in ours, so this needs to be handled carefully as well.
- If you make a collection of pictures or personal profiles of many nonbinary people, they should not all be white. This often happens in such collections. It gives an incomplete view of what nonbinary people are like.
- If you make spaces for nonbinary people, work hard to make those spaces safe for people of color. Some ways to do that:
- Have a zero-tolerance policy about not allowing any self-identified white supremacists into those spaces. Accepting bigots is the wrong way to do acceptance.
- Educate yourself about warning signs that someone might be a white supremacist, so you can expel them from the space before they do damage. Do research online to find out about some signs to watch for, especially some kinds of things they tend to say, and some symbols they wear to recognize one another.
- Educate yourself about how to recognize casual racism. Make sure your safe space for nonbinary people reprimands casual racism whenever it might happen, instead of staying silent about it.
- Don't allow racist jokes, which are never just jokes.
- Educate yourself about how to be aware and respectful of different cultural backgrounds of the people in that space. That means not lazily expecting those people to educate you, but doing your own research on your own time. Only ask them questions when research is no substitute for it. Don't expect them to speak for all of their people.
- Don't perpetuate binarism by talking about the gender binary as if it was always universal to all cultures. Don't take for granted that all cultures view gender in the same or similar way.
- In 2014, as part of the protest of police violence against African-Americans, Twitter users created the hashtag #BlackLivesMatter, to protest how the law system was treating them like their lives had no value. Soon, people created other hashtags in the same format to tweet about other kinds of injustice, such as #TransLivesMatter. That hashtag could be acceptable if tweeting about how most transphobic violence is against black trans women. Then it's still related to the original message. However, if the context is about white trans people only, using that hashtag would be bad taste. Taking a message about racism and using it for unrelated purposes is appropriation, no matter how valuable those other purposes may be.