Contrast detection may be used to induce (natural) classes of sounds (Dresher 2014, Sandstedt 2018). I show that it possible to implement such an approach in standard OT with domain-general methods, namely, by using inconsistency detection (Tesar 1995) to induce indexed constraints (Pater 2000, 2010) that are local to segments (Round 2017). This setup was tested on a set of toy languages adapted from Prickett & Jarosz (2021). These feature a dominant/recessive vowel harmony process and a palatalization process, which can either feed each other (transparent palatalization) or counterfeed each other (opaque palatalization). I also included a version where palatalization was lexically specific. Phonetically natural classes were found for all cases, and appropriate phonologically natural classes (i.e., classes defined by sound and by participation in a process) were found for the opaque and lexical cases. Interestingly, the contrast that is partially neutralized in the data is not reflected in the classes. This means that the inconsistency-based algorithm finds phonetically natural classes based on non-neutralized contrast, and finds phonologically natural classes when phonetically natural ones are not sufficient.