For full spectrum analysis, we would need a completely different kind of eye.
The reason we can see color is because each of our three cone cells contain a different pigment, and each pigment responds to a different range of wavelengths. All animals on earth use basically the same system; some have more pigment types (butterflies have up to 16) but there is a fundamental limit to this system.
The wavelengths of visible colors do overlap (so there are no "invisible wavelengths" between the highest and lowest wavelengths we can perceive) but there are "dips" in sensitivity within the colors we can see; our range of blue perception lies fairly far away from our range of red and green perception, which is why colors on the blue end of the visual spectrum are harder to differentiate than shades of reds, yellows, and greens.
This does make sense from an evolutionary perspective; primates probably evolved trichromatic vision mainly to differentiate between a healthy branch and a dead one (pretty important if you're a monkey), so picking up subtle shades of yellow and green is more important than subtle differences in the color of the sky or sea.
Sound works completely differently; we can detect different pitches because of the spiral shape of the cochlea; every part of this organ responds to a slightly different pitch, making us capable of detecting differences in sounds more or less equally at any point within our full hearing range.
There would be some potential benefits for detecting color this way - basically the same as the advantages of just adding more colors, but a little better. We could detect subtle shades that reflect the health or species of prey or predators, or tree branches, fruits, and flowers, as the case may be. Butterflies and mantis shrimp have some of the best color vision around; butterflies use it to detect slight differences between flowers and mantis shrimp probably use it for hunting, although they may also use it for communication.
But it is unlikely for a full spectral analysis mechanism to evolve on Earth, even if it is technically superior than pigment-based vision, as it would require the eye to be completely rebuilt from scratch. Life on Earth has been using pigment-based vision since before multicellular life existed, and it works just fine for all practical purposes. If an organism does need to detect more colors, it's much more practical to just evolve a new visual pigment than to completely rebuild the entire concept of an eye from the ground up.