The caste system, per say, wasn't originally based on race or colour, but on occupation. And since occupations can change with the generations, so could caste, sometimes within the same generation itself. A supporting fact is Krishna, one of the pivotal gods in the Hindu pantheon, was from a community generally seen as oppressed.
The discriminatory angle came much later on in history. That's why the Vedas and the Puranas, some of the oldest philosophical and theological works in the world(circa 2000 BC), has nothing mentioned in it about caste.
My explanation is based on the limited facts I know. So, clarification will help if available.
The caste system, per say, wasn't originally based on race or colour, but on occupation. No it was a TV series..Joanie Loves Chachi. I think..