We propose a two-step trapezoidal-pattern phase-shifting method for 3-D surface-shape measurements. Shape measurements by trapezoidal phase-shifting methods require high-quality trapezoidal patterns. Furthermore, most of the video projectors are nonlinear, making it difficult to generate high quality phase without nonlinearity calibration and correction. To overcome the limitations, we propose a method for synthesizing trapezoidal intensity fringes as a way to solve the problems caused by projector/camera gamma nonlinearity. The fringe generation technique consists of projecting and acquiring a temporal sequence of strictly binary color patterns (Gray code), whose (adequately weighted) average leads to trapezoidal fringe patterns with the required number of bits, which allows a reliable three-dimensional profile reconstruction using phase-shifting methods. Validation experiments are presented.