A quality is an attribute or a property characteristic of an object in philosophy. In contemporary philosophy the idea of qualities, and especially how to distinguish certain kinds of qualities from one another, remains controversial.
Aristotle analyzed qualities in his logical work, the Categories. To him, qualities are hylomorphically–formal attributes, such as "white" or "grammatical". Categories of state, such as "shod" and "armed" are also non–essential qualities (katà symbebekós). Aristotle observed: "one and the selfsame substance, while retaining its identity, is yet capable of admitting contrary qualities. The same individual person is at one time white, at another black, at one time warm, at another cold, at one time good, at another bad. This capacity is found nowhere else... it is the peculiar mark of substance that it should be capable of admitting contrary qualities; for it is by itself changing that it does so". Aristotle described four types of qualitative opposites: correlatives, contraries, privatives and positives.
John Locke presented a distinction between primary and secondary qualities in An Essay Concerning Human Understanding. For Locke, a quality is an idea of a sensation or a perception. Locke further asserts that qualities can be divided in two kinds: primary and secondary qualities. Primary qualities are intrinsic to an object—a thing or a person—whereas secondary qualities are dependent on the interpretation of the subjective mode and the context of appearance. For example, a shadow is a secondary quality. It requires a certain lighting to be applied to an object. For another example, consider the mass of an object. Weight is a secondary quality since, as a measurement of gravitational force, it varies depending on the distance to, and mass of, very massive objects like the Earth, as described by Newton's law. It could be thought that mass is intrinsic to an object, and thus a primary quality. In the context of relativity, the idea of mass quantifying an amount of matter requires caution.