This paper discusses the application of AI color analysis technology in oil painting teaching, combined with experiments to verify its effect on improving teaching quality. Firstly, the core algorithm of AI color analysis technology is analyzed, and the implementation scheme of digital image sharpening preprocessing is proposed based on the RGB color model, and the edge and color information of the image is extracted based on the improved Canny operator. Improved GAN completes the reconstruction of the oil painting image, and the characteristic colors of the oil painting are extracted using the optimized K-means clustering algorithm. The oil painting images are selected for color feature analysis, and the color matching scheme is improved based on the color feature results to construct the color analysis process based on AI technology in oil painting teaching. Finally, students from art colleges were selected as the research subjects, and a control experiment was designed to investigate the effect of AI color analysis in teaching. The p-value of the five factors of the experimental group and the control group’s post-test scores of creativity of modeling, application of color, color richness, emotional tendency of color and expression of the theme are all less than 0.05, and the average scores of the experimental group in these five aspects, 3.66, 3.74, 3.85, 3.77, 3.34, are all significantly larger than those of the control group, which indicates that the experimental group using AI color analysis to assist teaching has significantly widened the gap between the control group and the experimental group in terms of the use of color. It shows that the experimental group using AI color analysis to assist teaching has a significant gap with the control group in the use of color.