In Texas, the Eleventh Legislature produced these codes in 1866, right after the Civil War. The law reaffirmed the position that slaves and free blacks had held in Texas and was intended to make blacks work. The codes showed how stubborn white Texans were accepting blacks as equals and also their fears that freedmen would not work unless forced. The codes continued legal discrimination between whites and blacks. The legislature, when it amended the 1856 penal code, emphasized the difference between whites and blacks by defining all people with one-eighth or more black ancestry as persons of color, subject to special parts in the law.
The black codes were enforced immediately after the American Civil War. Though different from state to state, they each set out to secure a steady supply of cheap labor, and continued to assume the weakness of the freed slaves. The black codes had their roots in the slave codes that had formerly been in effect. The idea behind slavery in America was that slaves were property, and, as such, they had few, if any, legal rights. The slave codes, in their many loosely-defined forms, were seen as effective tools against slave unrest, particularly as a protective method against revolts and runaways. Enforcement of slave codes also varied, but bodily punishment was widely and harshly used to great effect. These black codes were very unfair and lucky for African Americans are not used