Press space bar to enter commands. In the format {Type:0b,Colors:[I;X],FadeColors:[I;Y],Flicker:0b,Trail:0b} Type is 0 = Small Ball, 1 = Large Ball, 2 = Star-shaped, 3 = Creeper-shaped, 4 = Burst. Other values will be named "Unknown Shape" and render as Small Ball. Trail is 0 or 1. Flicker is 0 or 1. Replace X and Y with color values using the color code output number.
Put the code you receive into a command block. Put a chest on top. Activate command block. Simple.