Image colorization is the technology used to add colors to a grayscale image by computers. A novel image colorization method based on local and global consistency is proposed, which uses an oversegmentation-based graph model and a modified energy function to take advantage of the local and global information of each pixel. An oversegmentation-based graph model is used to approximate each pixel by a linear combination of its neighboring pixels in the same oversegmented region, and the modified energy function based on local and global consistency is smoothness enough with respect to the inherent structure uncovered by colored and uncolored pixels. In contrast to most previous energy functions with the assumption that nearby pixels with close luminance values tend to have close color values, we formulate the assumption that pixels constituting each oversegmented region should have similar colors. Experiments on different types of images show that our approach achieves more robust colorization results compared with two existing approaches. Moreover, we also demonstrate our method on various applications, such as image recolorization and matting.