The depth range that can be captured by structured-light 3D sensors is limited by the depth of field of the lenses which are used. Focus stacking is a common approach to extend the depth of field. However, focus variation drastically reduces the measurement speed of pattern projection-based sensors, hindering their use in high-speed applications such as in-line process control. Moreover, the lenses’ complexity is increased by electromechanical components, e.g., when applying electronically tunable lenses. In this contribution, we introduce chromatic focus stacking, an approach that allows for a very fast focus change by designing the axial chromatic aberration of an objective lens in a manner that the depth-of-field regions of selected wavelengths adjoin each other. In order to experimentally evaluate our concept, we determine the distance-dependent 3D modulation transfer function at a tilted edge and present the 3D measurement of a printed circuit board with comparatively high structures.