In order to solve the problem of image color recognition, this paper proposes a method of image color recognition and optimization based on deep learning and designs a postprocessing framework based on word bag model (bow). The framework uses CNN features and calculates feature similarity. The image sets with high similarity are input into the image classifier trained by bow clustering model as the preliminary retrieval results. The retrieval results are the categories with the largest number of images. The experimental results show that the image retrieval accuracy of the framework is 90.4% based on the same data set and classification category, which is 10% higher than the image retrieval algorithm based on CNN features. Conclusion. The color matching degree between the image color and the image to be retrieved has been greatly improved.