Hmm
.
Guffaw! The Internet: Helping unfunny people try to be witty since 19XX.
More to the point, Patterns, Glamers, and Phantasms are mind affecting or adjust the sensory properties of a thing. If you had a spell "detect red" and then cast invisibility on that item the red would be just as invisible as the rest of the item. This can be assumed because invisibility makes all the PROPERTIES of the item in question just as invisible as the item itself.
Further, if something is "only in your mind" you can't "detect magic" on it because what you're seeing isn't actually there and so has no "properties" to speak of. You would have to know that the object, creature, or whatever in question was magic to begin with otherwise your mind would not assign it an aura of magic.
For example, let's say I created a phantasm of an orange in your mind. You use detect magic to see if the orange is magic but because the orange doesn't exist in the first place (unlike a figment which does exist outside the viewer) it cannot give off an aura of magic.