We develop an effective algorithm for colorizing a grayscale image. In our approach, a reference color image, an RGB to Lαβ color transform L=luminance, α β=chrominance), and a block-based vector quantization of luminance mapping (VQLM) technique are used to automatically colorize the grayscale image. The VQLM technique compares the grayscale image with the luminance of the color reference image to obtain the information of the αβ planes of the grayscale image. After the chrominance is padded, the inverse color transform, L αβ to RGB, colorizes the grayscale scene is colorized. Meanwhile, we create a mean of VQLM (MVQLM) method to improve the quality of the colorized grayscale image. Experimental results show the MVQLM method is better than the VQLM method. Also, we investigate colorizing the grayscale image working in the Lαβ and YIQ spaces. The simulation results also reveal that working in the Lαβ space is slightly better than working in the YIQ space. Compared to other colorizing schemes, our proposed method has two advantages: 1. the codebook and MVQLM techniques colorize the grayscale images for any size image that can be evenly divided by 2 automatically; and 2. the MVQLM method obtains a smoother colorizing effect and improved quality compared to the VQLM method.