Colour of the bead in borax bead test is mainly due to the formation of metal metaborates. In this process, borax on strong heating loses its water of crystallisation and swells up to form puffy mass.
On further heating it melts into clear liquid that solidifies to transparent glass like bead that consists of sodium metaborate (NaBO2) and basic anhydride (B2O3).
Now, whenever a coloured salt containing cations like Ni2+,Co2+,Cr3+ etc. is heated with borax bead on platinum wire, the salt decomposes to form corresponding metal oxide that combines with B2O3 to form coloured metaborates. This test is called borax bead test.