"depravity, evil or corrupt state, wickedness," 1540s, from Latin pravitas "crookedness, distortion, deformity; impropriety, perverseness," from pravus "wrong, bad," literally "crooked," a word of unknown etymology.
late 14c., "wicked," from Old French pervers "unnatural, degenerate; perverse, contrary" (12c.) and directly from Latin perversus "turned away, contrary, askew," figuratively, "turned away from what is right, wrong, malicious, spiteful," past participle of pervertere "to corrupt" (see pervert (v.)).
The Latin word is glossed in Old English by forcerred, from past participle of forcyrran "to avoid," from cierran "to turn, return." The meaning "wrong, not in accord with what is accepted or standard, turned away from what is right" is from 1560s; the sense of "obstinate in the wrong, stubborn" is from 1570s. It keeps the non-sexual senses of pervert (v.) and allows the psychological ones to go with perverted. Related: Perversely; perverseness.
Perverse has reference to one's attitude, in both conduct and opinion. The perverse person is settled in habit and disposition of contrariness; he not only likes or dislikes, acts or refuses to act, by the rule of contradiction to the wishes, commands, or opinions of others, especially of those whom he ought to consider, but be is likely even to take pains to do or say that which he knows to be offensive or painful to them. Perversity may be found in a child, but it is so settled an element of character as to be rather the mark of an adult. [Century Dictionary]
mid-14c., diversite, "variety, diverseness;" late 14c., "quality of being diverse, fact of difference between two or more things or kinds; variety; separateness; that in which two or more things differ," mostly in a neutral sense, from Old French diversete "difference, diversity, unique feature, oddness:" also "wickedness, perversity" (12c., Modern French diversité), from Latin diversitatem (nominative diversitas) "contrariety, contradiction, disagreement;" also, as a secondary sense, "difference, diversity," from diversus "turned different ways" (in Late Latin "various"), past participle of divertere (see divert).
A negative meaning, "perverseness, being contrary to what is agreeable or right; conflict, strife; perversity, evil" existed in English from late 14c. but was obsolete from 17c. Diversity as a virtue in a nation is an idea from the rise of modern democracies in the 1790s, where it kept one faction from arrogating all power (but this was not quite the modern sense, as ethnicity, gender, sexual identity, etc. were not the qualities in mind):
The dissimilarity in the ingredients which will compose the national government, and still more in the manner in which they will be brought into action in its various branches, must form a powerful obstacle to a concert of views in any partial scheme of elections. There is sufficient diversity in the state of property, in the genius, manners, and habits of the people of the different parts of the Union, to occasion a material diversity of disposition in their representatives towards the different ranks and conditions in society. ["The Federalist," No. 60, Feb. 26, 1788 (Hamilton)]
Specific focus (in a positive sense) on race, gender, etc., "inclusion and visibility of persons of previously under-represented minority identities" is by 1992.