Yellow and Red: Film capacitors. Red: Without safety approval. Yellow: With safety approval. (Colors: Just in your case. It's not because of the colors, it's because of the X... markings! Any type may be made in any color!) Depending on the conductor (real film or metallic layer) and dielectric, they feature (very) low ESR and (very) low dissipation factor. Good for switching power applications whenever you need more capacitance than ceramic capacitors can offer. You added the info that the red ones read 100nJ400, which means 100 nF; Tolerance: 5 %; 400 V. Common tolerance codes for capacitors: J = ± 5%; K = ± 10%; M = ± 20%.
Blue, from left to right: 2 x Safety-Rated Ceramic Disc Capacitors. Very low ESR, sometimes with a big tolerance and temperature coefficient, though. The third blue disc from the left appears to be a varistor, not a capacitor. It is labeled 7K471. 7K means it has a disk size of 7 mm (the disk size corresponds to the energy it can absorb) and it starts to conduct at or above "471" = 47*101 V = 470 V. Number four is 221; 1KV (no safety rating visible), meaning 22 * 101 pF = 220 pF; max. voltage 1 kV.
Black: Electrolytic Capacitors. Some bad properties, but you get an awesome C*V product per volume.
Hints on reading the values:
Hints on the safety ratings: X means you may use these between live and neutral (L and N). This is a critical application because a small leakage path will continuously be fed from the lines and fires may result. I have had one of these fail in a HP function generator last year and the room smelled toxic for weeks, even though I washed out all the stuff left by the smoldering decomposition of the cap - and luckily the design of the cap was of the self-extinguishing type. Y means you may use the caps between L or N and PE. Critical because fires may result for the reason just explained, and because an insulation failure may result in L being connected to the housing (PE). The number behind the X or Y shows the class (good or better). Datasheets will tell you more. Search for X1, X2, Y1 or Y2 and EMI capacitor. EMI because these capacitors are usually used in input filters, often before the fuse, and thus exposed directly the the mains terminals feeding your device.