Slave codes were a set of laws established in the colonies and later in the United States that defined the status of enslaved individuals and the rights of their owners. These codes sought to control and restrict the behavior of enslaved people, emphasizing their lack of rights and reinforcing the institution of slavery as a legal and social norm.