Grown as an edible ornamental, you can see why it is an attractive plant for food gardens. The colours are due to plant pigments called betalains. Betalains are found only in plants belonging to the order Caryophyllales (an order is a taxonomic unit that contains a number of related families), and curiously, the fungal genus Amanita (see Genetic engineering of yellow betalain pigments beyond the species barrier in Nature, link added to this 2005 entry in 2017).
Botany resource link: Chenopodium quinoa via Purdue University’s Center for New Crops and Plant Products. In the same family as Swiss chard, quinoa deserves to be better known. With a cultivated history extending at least five millenia, quinoa was long a staple food in South America, second only in importance to maize. Displaced in recent modern times by less labour-intensive grain crops, such as wheat or barley, quinoa is experiencing a small resurgence due to its high nutritional value and oils.