What it does is it makes slight differences in colour, using the decoration layer. Since firework explodes the colour of it decoration layer it is coloured, it will always be shades of orange.
sand effect uses deco layer to color randomly any powder, and fireworks uses deco layer, and fireworks are orange, so when you use sand effect, it is colored close to its original color with deco layer, so when it explodes it is orange