Ptychographic coherent X-ray imaging is applied to obtain a projection of the electron density of colloidal crystals, which are promising nanoscale materials for optoelectronic applications and important model systems. Using the incident X-ray wavefield reconstructed by mixed states approach, a high resolution and high contrast image of the colloidal crystal structure is obtained by ptychography. The reconstructed colloidal crystal reveals domain structure with an average domain size of about 2 µm. Comparison of the domains formed by the basic close-packed structures, allows us to conclude on the absence of pure hexagonal close-packed domains and confirms the presence of random hexagonal close-packed layers with predominantly face-centered cubic structure within the analyzed part of the colloidal crystal film. The ptychography reconstruction shows that the final structure is complicated and may contain partial dislocations leading to a variation of the stacking sequence in the lateral direction. As such in this work, X-ray ptychography is extended to high resolution imaging of crystalline samples.