So pretty! ^-^
A rainbow block (a.k.a. rainbow wool) is a solid block, which is made of 7 different colors of wool.
The rainbow block changes colors in your inventory and when placed.
Note:The picture portrayed shows three different blocks placed near each other, this isn't a gif.
Then, put the cloth into a 3 x 3 crafting area in any order and in any slots to get 1 rainbow block.