Dress codes shown in 18th-Century art can tell us a lot about race and identity