INTRODUCTION: The article discusses the key steps in digital visual design reengineering, with a special emphasis on the importance of information decoding and feature extraction for flat cultural heritage. These processes not only minimize damage to the aesthetic heritage itself but also feature high quality, efficiency, and recyclability.OBJECTIVES: The aim of the article is to explore the issues of gene extraction methods in digital visual design reengineering, proposing a visual gene extraction method through an improved K-means clustering algorithm.METHODS: A visual gene extraction method based on an improved K-means clustering algorithm is proposed. Initially analyzing the digital visual design reengineering process, combined with a color extraction method using the improved JSO algorithm-based K-means clustering algorithm, a gene extraction and clustering method for digital visual design reengineering is proposed and validated through experiments.RESULT: The results show that the proposed method improves the accuracy, robustness, and real-time performance of clustering. Through comparative analysis with Dunhuang murals, the effectiveness of the color extraction method based on the K-means-JSO algorithm in the application of digital visual design reengineering is verified. The method based on the K-means-GWO algorithm performs best in terms of average clustering time and standard deviation. The optimization curve of color extraction based on the K-means-JSO algorithm converges faster and with better accuracy compared to the K-means-ABC, K-means-GWO, K-means-DE, K-means-CMAES, and K-means-WWCD algorithms.CONCLUSION: The color extraction method of the K-means clustering algorithm improved by the JSO algorithm proposed in this paper solves the problems of insufficient standardization in feature selection, lack of generalization ability, and inefficiency in visual gene extraction methods.