A convenient synthesis of peripherally substituted or unsubstituted phthalocyanines having a variety of metals is described. Phthalocyanines can be obtained by heating phthalimides or phthalic anhydride with metal salts, hexamethyldisilazane, a catalytic amount of p-TsOH, and DMF at 150 degrees C.