black code (n.)
local or state legal restrictions on black persons, free or slave, 1774, American English, though the first reference is to French colonies in the West Indies.