Why don’t we see all the colours in a rainbow?

There are three main reasons why we don’t see all the colours in a rainbow. The first reason is that the colours we see in a rainbow are spectral colours, which means that they are also present in the visible spectrum. The second reason is that some colours, like pink and brown, are made when two different colours mix together, and the colours in a rainbow don’t mix together. The third reason is that our eyes can only see a certain range of colours, so some colours, like those in the ultra-violet and infrared regions, are invisible to us.
So if western society generally agrees that there are only the main seven rainbow colours in the sky, and out of all the colours we can see, why are only seven of them present in the rainbow. So where are the rest?
Could it be possible that there are many more colours present in the rainbow, but our eyes can only distinguish those seven? That is precisely true.
The rainbow has colours that range from the ultra-violet and infrared region as well. That’s a lot of colours, but we simply can’t see them.
The main colours present in a rainbow that our eyes can see only totals 7. The colours are always seen in the same order. These colours are: Red, Orange, Yellow, Green, Blue, Indigo and Violet
Rods and Cones in our eyes
When we walk into a dark room, have you ever noticed that it takes time for our eyes to adjust? This happens due to the presence of rods and cones at the back of our eyes. Rods are sensitive and respond only to the presence or absence of light, whereas cones are all about colours, and we have three different types of cones – blue, red, and green.
When you look at a banana, your red and green cones fire up and allow you to see the yellow of the banana. Your cones activate depending on what colour you see. The proper mixture of cones being fired up allows us to see those colours. For some colours, one cone might fire up completely, while another only fires partially. When you see the colour white, for instance, all three cones will respond.
Some people who are considered 'colourblind' because one or more of their cones don’t work or react differently will see a smaller set of colours or the colours will be less prominent to them.
Absence of colours in the rainbow
Now we know how eyes perceive colours (the cones in our eyes), but, when one looks up at a rainbow, we still don’t see brown, white, black, pink, and many other colours. This is because the colours we see from the rainbow are spectral colours, colours that are present in the visible spectrum.

Notice how there’s no pink or brown, or even purple? These colours don’t have their own wavelength. For humans to see them, they have to be mixed with colours of different wavelengths. Take pink, for example, which is only made when you mix red and blue wavelength. When one puts this in the contect of a rainbow, there is no overlapping of the blue and red bands, so there is no pink.
Now you might possibly understand why these colours aren’t visible, but what about black and white? This can be considered a particularly interesting and brilliant part of the rainbow colour mystery.
White light is the reason why we see the rainbow in the first place. The seven main colours we see come from this 'white' light.
Furthermore, black is the absence of any colour, and in the context of a rainbow, that would explain its abscence.
Another interesting fact is that everyone will see slightly different shades of colour when they look at a rainbow. Different people perceive different responses to colours due to natural genetic variations.
So there are still plenty of colours that we can’t see in a rainbow, but that doesn’t mean they aren’t there, these other colours are in the ultra-violet and infrared regions, which the majority of peoples eyes cannot naturally detect.