At least since reruns of the Wizard of Oz were shown on colour television, the rainbow has been a metaphor for a spectrum of diversity. As any home decorator knows, there are a vast number of possible colour combinations, as many as we care to name, and when we run out of names we can use ever larger numbers to distinguish one colour of the rainbow from another, in much the same way as astronomers did when they ran out of names for stars in the universe.
It's unhelpful that the rainbow metaphor has been carried over from sexuality to the debate about sex and gender, as it presents us with wholly misleading ideas. An infographic in a Scientific American blog post from 2017 entitled 'Visualizing sex as a spectrum', often cited in the transgender debate, illustrates the problem neatly. In a classic case of 'fit the facts to the theory', a spectrum of possible sexes ranging from extremes of typical female to typical male is displayed with a multicoloured header ranging from mint green through mango yellow to fuchsia pink.