High-dynamic range (HDR) images are commonly used in computer graphics for accurate rendering. However, it is inefficient to store these images because of their large data size. Although vector quantization approach can be used to compress them, a large number of representative colors are still needed to preserve acceptable image quality. This paper presents an efficient color quantization approach to compress HDR images. In the proposed approach, a 1D/2D neighborhood structure is defined for the self-organizing map (SOM) approach and the SOM approach is then used to train a color palette. Afterward, a virtual color palette that has more codevectors is simulated by interpolating the trained color palette. The interpolation process is hardware supported in the current graphics hardware. Hence, there is no need to store the virtual color palette as the representative colors are constructed on the fly. Experimental results show that our approach can obtain good image quality with a moderate color palette.