The terms refer to the work force of the 1920s. "White-collar" workers had jobs in offices and "blue-collar" workers had jobs in factories.
google "what is the difference between a white-collar worker and a blue-collar worker?"
Both terms came into common use in the 1920s, with novelist Upton Sinclair credited with coining the term “white-collar” to denote those workers who performed administrative or clerical work. More than a collar put blue-collar workers in a separate category; so did their entire work uniform. As construction workers, loggers, mechanics, carpenters and factory assemblymen, they wore overalls, jeans or durable work shirts – mostly in the color blue, to more easily cover the dust and dirt they inevitably came into contact with.