Those black codes were enacted by Democrat-controlled state governments and were repealed whenever Republican won control of those state governments.
Hmmmm, Oregon didn't have a Republican majority in its legislature before 2000? Illinois didn't have a strong contingent of Whig/Republicans in their legislature before 1865 (at least ones that weren't jumping out of second floor windows that is..)? Ohio? Vermont? Even if you provide proof for this (which you won't), this makes the issue of black codes different how again? They existed in the north years before they existed in the South. And northern black codes were by far more heinous in many cases. As hard as you may try you cannot lay this at the feet of partisanship to wave your Republican flag.