What time period was the black code

The Black Codes were a series of laws passed in the United States between 1865 and 1866, immediately after the Civil War. They were enacted by Southern states to restrict the rights and freedoms of African Americans and ensure their continued subjugation and control. The Black Codes aimed to maintain a system similar to slavery through legal means, and they were eventually replaced by the Jim Crow laws in the late 19th and early 20th centuries.