A combination of phase-shift with Gray-code light projection into a three-dimensional (3-D) measurement system has been exploited to digitalize 3-D shape information of a tested object, even with a discontinuous surface. Unfortunately, the phase unwrapping will fall into an error, when an improper value of Gray coding is caused by mistake at the partial boundary of two adjacent binary words. To this end, a new complementary Gray-code method is proposed in this paper as well as the corresponding phase-unwrapping method. This problem of phase unwrapping could be cleverly solved by projecting an additional Gray-code pattern to extend this code and using the different and complementary boundary locations of the traditional and additional codes. The results of computer simulation and experiment confirm that this proposed method based on complementary Gray-code can reliably reconstruct the nature phase distribution of the tested object with only one extra fringe pattern. ► A new complementary Gray-code method is proposed in this paper as well as the corresponding phase-unwrapping method. ► The problem of phase unwrapping could be cleverly solved by projecting an additional Gray-code pattern to extend this code. ► The results of computer simulation and experiment confirm that this proposed method is based on complementary Gray-code.