The introduction of modern commercial elements helps to enhance the vitality of historic districts and promote the revitalization of cultural heritage. However, in order to attract tourists and consumers, modern commercial elements often use bright colors with high saturation, which are in strong contrast with the color tone and features of traditional buildings in historic districts. Therefore, it is of great significance to evaluate whether commercial elements have damaged the historical landscape and propose optimization strategies. Taking the main street of Shiquan Street in SooChow as the object, evaluation was made to the color harmony of commercial elements, which identified the negative colors that had a negative impact on the landscape, and proposal was made for the colors to maintain the features of the historic district. The Mask2Former image semantic segmentation based on VIT model was used to accurately segment commercial elements attached to historic buildings, and 48 negative color centers that affected historical features were identified in accordance with the International Commission on Illumination CIE2000 standard. Meanwhile, based on traditional Chinese colors, a large number of color codes suitable for commercial elements in historic districts were selected. The research results show that Mask2Former semantic segmentation can accurately segment commercial elements and evaluate their color harmony, providing guidance for optimizing the commercial element colors in historic districts. Taking color as the starting point, this study explores long-term strategies for cultural heritage protection in the context of commercialization, ensuring effective maintenance of the color features of historic districts in the global commercialization process.