The Race Question and United States Censuses... Here is the answer for the "Western States" formerly "New Spain" then "New Mexico", then U.S. territories.
The short answer is there were only two "races" until after 1940 - there was "White" and then there was "Colored" (meaning "Black" or "Negro"). This is why no one knows exactly how many Mexicans/Hispanics/Latin Americans served during WWI and WWII.
On my profiles, I do not list the race according to Census Information. I only list the names, ages, birth years, relationships, birth places (if they vary from census to census and if I do not have records that state actual birth place).
The Treaty of Hidalgo and Gadsden Purchase that ended the Mexican-American War and "finalized" the border between the USA and Mexico had a number of clauses that the USA agreed to grant (but never really enforced). In the agreement - all Mexican Nationals living on land that was ceded to the USA (Texas, New Mexico, Arizona, California, Utah, Nevada, Colorado, etc. ) were to be "classed" and treated as equals to "whites" in regard to land ownership and voting rights. This was because slavery had not yet been abolished. So, by law Census Enumerators were to write "W" or "White" on the Censuses. Some Enumerators took extra liberties to ensure that the U.S. Government was aware of who was "Mexican", "Mulatto", or "Octoroon" by writing these words in the margins of the censuses. "Mulatto" was actually an Indigenous Tribe of Northern Mexico. "Octoroon" could be as well also, however, my late grandma always told me that "mulatto" and "octoroon" was derogatory with the same connotations as "nigger". Octoroon could also be a variation of "Maroon" as in the "Maroon Seminoles", a "clan" or "sect" of Seminoles with African and Native American DNA (bi-racial and tri-racial when they married "whites" or "mestizos") who emigrated to Mexico between 1847-1851.
As for Native Americans being classed as "white" is because Native Americans were not "American" Citizens until 1924 (with some exceptions-Native American men who fought in World War I were granted U.S. Citizenship). Some people who had Native American DNA and "White DNA" chose not to "claim" their Native American heritage or self-identify at the time of the Dawes Census because they would lose their rights as American citizens.
From time-to-time, one will see "Mestizo" or "Mestiza" and this is the correct "term" for most Mexicans. Of course, there are variations of "mestizo". There are Euro-Mestizos meaning Spanish, French, German (Northern European) and Indigenous Tribes of Mexico (Blanca/o Mexicana/o or Blanca as in Spaniard or no "Indian"). Then there are Afro-mestizos. But in Mexico, for the most part, everyone is just "Mexican" or (La Raza).
In the Northern States, a dark skinned Mexican might have been classed as "Negro" or "Black" on a marriage license or census.