Colloid in a magnetic field