Both primary and secondary qualities are spoken of as properties of objects, but there is a difference between them. Locke describes primary qualities as a kind of power in the object which affects the mind causing the secondary quality. Thus, the color I experience as blue is not in the book on my desk, but there is a power in the book which causes me to perceive blue. The shape of the book, however, is in the material object on my desk; my idea of the primary quality - rectangle - is an exact representation of the material quality in the book. So, primary qualities are part of the material world whether or not I’m perceiving because they are part of material substance, but secondary qualities only exist in the mind of the perceiver
George Berkeley collapses this distinction since he sees no reason to suppose a material substratum to uphold the primary qualities. For Berkeley, all qualities are ideas, and must therefore exist in some mind or other. What we call the external world is really the perception (or set of perceptions) of God's mind.