Self-assembly of colloidal crystals