When an article is using language like theis –
At that time, cowboys did the kind of hard labor that wealthy white Americans would often force others to do, meaning many were black slaves.
I tend to start choking on the salt grain.
And while Mexicans were, as noted in the article, a significant percentage of the population and of the working cowhands (particularly in the southerly Southwestern states), black cowboys were definitely a small minority.
I would guess that Hollywood looked at the then current populations of the Western states and the pool of available actors when casting their movies.
Revising history was probably not even in their mindset. The novels that the movies were based on were in many cases written by authors like Owen Wister or Zane Grey. Wister made trips to Wyoming and was fascinated by the culture and lifestyle of the West, but Wyoming is not a terribly representative slice of the demographics of the Old West.
Zane Grey – born in Ohio, educated and lived in Pennsylvania, moved to California, made trips into other Western states and did basic research. I really doubt that he had an agenda to either whitewash or on the other hand provide an accurate history of the West.
There is also the fact that the dime novels written in 1800s were often penned by Eastern authors who had never set foot west of the Mississippi.
And, of course, Buffalo Bill had a big part in this as well – his Wild West Show was a stereotype of what Hollywood came to portray. All again based on the Great Plains and the northern West of Wyoming.