Black codes made it illegal for black and white people to use the same public facilities. They put black codes into place so the black and the white people could revive the same freedoms. (They could both go to a restaurant) but they had SEPARATE restaurants. And most of the time the white restaurants would be better than the establishments for blacks.