Does Locke say that secondary qualities are just ideas in the mind?
Like philosophers both before and after him, John Locke distinguishes between different qualities in objects. Those that account for their shape or solidity, among other features, are primary; those that account for their color or smell are secondary. Locke is commonly taken to have said that primary qualities exist in the objects themselves, but secondary qualities only exist in the mind of the perceiver.
Does Locke really say this?
He does not.
For Locke, qualities, whether primary or secondary, exist in objects only.
The reason for the common confusion on this point is that Locke distinguishes not only between primary and secondary qualities, but also between qualities (whether primary and secondary) and ideas of qualities.
Qualities are properties inherent in bodies; and they have the power to cause ideas in our minds. The qualities of an object cause us to perceive that object as, say, extended, solid, or blue. But if all qualities inhere in objects, why does Locke distinguish between primary and secondary ones? The difference, for Locke, is that ideas of primary qualities resemble primary qualities, whereas ideas of secondary qualities do not resemble secondary qualities. The shape we see in objects is caused by, and resembles, the shape they have; but the color we see in objects is caused by properties that do not resemble that color.
As Locke puts it in An Essay Concerning Human Understanding (2.8.15):
“The ideas of primary qualities of bodies are resemblances of them, and their patterns do really exist in the bodies themselves; but the ideas, produced in us by these secondary qualities, have no resemblance of them at all. There is nothing like our ideas existing in the bodies themselves. They are in the bodies, we denominate from them, only a power to produce those sensations in us: and what is sweet, blue or warm in idea, is but the certain bulk, figure, and motion of the insensible parts in the bodies themselves, which we call so.”
Thus, secondary qualities exist in objects only; they cause ideas of secondary qualities in us; and these ideas (yellow, or a certain smell or taste) do not resemble the qualities that cause them.