The present invention relates to a grating for X-ray phase contrast and/or dark-field imaging. It is described to form a photo-resist layer on a surface of a substrate. The photo-resist layer is illuminated with radiation using a mask representing a desired grating structure. The photo-resist layer is etched to remove parts of the photo-resist layer, to leave a plurality of trenches that are laterally spaced from one across the surface of the substrate. A plurality of material layers are formed on the surface of the substrate. Each layer is formed in a trench. A material layer comprises a plurality of materials, wherein the plurality of materials are formed one on top of the other in a direction perpendicular to the surface of the substrate. The plurality of materials comprises at least one material that has a k-edge absorption energy that is higher than the k-edge absorption energy of Gold and the plurality of materials comprises Gold.