Butterflies rely extensively on colour vision to adapt to the natural world. Most species express a broad range of colour-sensitive Rhodopsin proteins in three types of ommatidia (unit eyes), which are distributed stochastically across the retina. The retinas of Drosophila melanogaster use just two main types, in which fate is controlled by the binary stochastic decision to express the transcription factor Spineless in R7 photoreceptors. We investigated how butterflies instead generate three stochastically distributed ommatidial types, resulting in a more diverse retinal mosaic that provides the basis for additional colour comparisons and an expanded range of colour vision. We show that the Japanese yellow swallowtail (Papilio xuthus, Papilionidae) and the painted lady (Vanessa cardui, Nymphalidae) butterflies have a second R7-like photoreceptor in each ommatidium. Independent stochastic expression of Spineless in each R7-like cell results in expression of a blue-sensitive (Spineless(ON)) or an ultraviolet (UV)-sensitive (Spineless(OFF)) Rhodopsin. In P. xuthus these choices of blue/blue, blue/UV or UV/UV sensitivity in the two R7 cells are coordinated with expression of additional Rhodopsin proteins in the remaining photoreceptors, and together define the three types of ommatidia. Knocking out spineless using CRISPR/Cas9 (refs 5, 6) leads to the loss of the blue-sensitive fate in R7-like cells and transforms retinas into homogeneous fields of UV/UV-type ommatidia, with corresponding changes in other coordinated features of ommatidial type. Hence, the three possible outcomes of Spineless expression define the three ommatidial types in butterflies. This developmental strategy allowed the deployment of an additional red-sensitive Rhodopsin in P. xuthus, allowing for the evolution of expanded colour vision with a greater variety of receptors. This surprisingly simple mechanism that makes use of two binary stochastic decisions coupled with local coordination may prove to be a general means of generating an increased diversity of developmental outcomes.