The Rainbow Cacti[sic] is a block added by Thaumic Bases. When it is harvested and is not the last block it will drop all of the Vanilla dyes (with the exception of black, white, and blue dyes), with Cactus Green dropping more frequently than others; any Rainbow Cacti blocks above the harvested one will drop intact. Like regular Cacti it grows 3 blocks high except that coming into contact with it will not inflict damage or destroy items.
Magic is not always strict and logical - it is magic, afterall[sic]. The same goes to life - it can take various shapes, sometimes shocking, sometimes funny. Well, you have managed to create a plant, that, pretty much, is a definition of the word 'funny'. This plant functions just like the regular cacti - must be placed on sand and grows up to 3 blocks. However, once broken it will only drop itself it it is the last cacti block left. Otherwise it will drop all kinds of dyes. however, cacti can't create certain dye types, like bonemeal and Lapis. It is also more likely to drop green dye than other dyes.