That looks like a diode... they're usually black.
Capacitors are usually tan (ceramics), green/blue (polyester or mica), or yellow and sometimes black (tantalum).
The leads are a sure giveaway, though - surface mount caps usually have leads under the ends of the device to reduce inductance for decoupling.