A gradual increase in freedom, as happened in Brazil since 1888. (As also happened in the US South since the 1950s.)
Actually, had there not been a war and if emancipation had come from within, there would likely have been less push to create racist laws for purposes of revenge.