In this paper, a novel color-coding method for absolute phase measurement is proposed. A three steps phase-shift algorithm was adopted to calculate the relative phase (wrapped phase) because of the least need of images. Color strips were used to mark each 2π phase-change period and three neighboring colors as a group were used as codewords to identify the fringe orders. With the two parts, relative phase and fringe orders, the absolute phase can be obtained directly. We selected five colors (black, red, green, blue, and white) to test our algorithm, and nearly 60 different codewords were embedded in one image. The fringe orders and the relative phase are calculated simultaneously, and this algorithm can circumvent the phase unwrapping process. Moreover, errors will not diffuse, because the relative phase and fringe orders are uncorrelated. Besides, no need of unwrapping processing will lead to high speed in 3D profile measurement. In addition, large object can be measured with high precision using this method owe to enormous codewords can be embedded in one color image. One experiment with a small object and a big complex object was designed to test the algorithm for separate objects, and experimental results showed the validity of our algorithm for absolute phase measurement.