Histogram equalization (HE) is one of the simplest and most effective techniques for enhancing gray-level images. For color images, HE becomes a more difficult task, due to the vectorial nature of the data. We propose a new method for color image enhancement that uses two hierarchical levels of HE: global and local. In order to preserve the hue, equalization is only applied to intensities. For each pixel (called the ‘‘seed’’ when being processed) a variable-sized, variable-shaped neighborhood is determined to contain pixels that are ‘‘similar’’ to the seed. Then, the histogram of the region is stretched to a range that is computed with respect to the statistical parameters of the region (mean and variance) and to the global HE function (of intensities), and only the seed pixel is given a new intensity value. We applied the proposed color HE method to various images and observed the results to be subjectively ‘‘pleasant to the human eye,’’ with emphasized details, preserved colors, and with the histogram of intensities close to the ideal uniform one. The results compared favorably with those of three other methods (histogram explosion, histogram decimation, and three-dimensional histogram equalization) in terms of subjective visual quality.