This paper presents a novel color image segmentation method using principal component analysis (PCA) and the firefly algorithm, which helps optimize the clustering of grayscale images. The approach automates cluster determination and applies Gaussian mixture models through an expectation-maximization technique to classify pixels into homogeneous regions. Experimental results demonstrate the effectiveness of this method on multi-spectral images, showcasing improved segmentation quality compared to traditional techniques.