Zhihao Zhang, Zhisheng Zhang, Zhijie Xia (2022). The style correlation between color palette generated by the k-means and original picture. In: Ergonomics In Design. AHFE Open Access, vol. 47, pp. 353–357. https://doi.org/10.54941/ahfe1001956
A color theme (palette) is a set of significant color samples that can represent color choices in works of art or designs. The generation of color palette usually starts from selecting an appropriate image, and then extracting colors from the image to form a color palette. This paper use a method, K-means clustering algorithm, to extract seven colors from pictures to generate a 7 color palette for designers. Whether the extracted palette can reflect the image of the original image is the key to extracting color. Therefore, this paper designs a qualitative scale according to the pre semantic difference method, and the subjects subjectively evaluate the color of the image and from the image according to the qualitative scale. Then, the correlation coefficient is used to measure the subjective feeling correlation between the two pictures, so as to judge whether the style of the palette generated by the main tone of the picture can reflect the style of the original picture and could used by designer.
Color have an impact on people’s psychology, some of which are direct and strong, while others are subtle (Kita and Miyata, 2016). Since the recognition of the significance of color, the research on the psychology of color has been initiated. With the rapid development of economy and society, people have been trying to use various colors in different settings. In design activities, designers will define a color palette in advance to serve as a reference and standard for the color.
Color palette is a set of color samples that can represent or describe main color in a work of art or design (Wijiffelaars, 2008). When designers are asked to design a magazine cover, posters or web pages, they usually begin the process by selecting an appropriate image and then extract color from the image (Delon, 2005). Designers often choose three, five or seven colors to make up a color palette, giving their work a clean and uniform feel rather than a complex one. They use the color palette throughout the design process. However, creating and evaluating a set of colors is difficult for most people. Designers often look for inspiration from many sources, such as art, pho- tography, and color palette books. The process of selecting a set of color is
guided by intuition and qualitative rules (Peng, 2019). In addition to selecting colors to compose a palette, designers can also use some objective methods to generate color palettes. Bahng proposes a novel approach to generate multi- ple color palettes that reflect the semantics of input text, and then colorize a given grayscale image according to the generated color palette (Bahng, 2005). An automated mechanism for extracting color palettes from images could boost inspiration and creativity and greatly improve productivity.
Color perception is a very subtle process. It brings different stimuli to peo- ple through human vision and perception. People have accumulated a lot of visual experience in life, they will have different reactions to different colors. Once the perceptual experience is consistent with the external color stimuli, it will trigger a specific emotion in our mind.
This paper uses K-means clustering algorithm to generate a 7-color palette of images, and generate a pixel picture from the 7-color palette. The semantic difference method was used to design a qualitative scale. Subjects judge the color perception of images and pixel pictures. Then the correlation coefficient is used to measure the correlation between the two images. We could know whether the style of the color palette generated by the main color of the image reflects the style of the original image. Finally, it generates a color palette for the designer as a reference.
METHODS
The k-means clustering algorithm is one of the most popular unsupervi- sed learning algorithms for solving the clustering problem (Sinaga, 2020). K-means clustering algorithm is a clustering algorithm that can extract the main colors of an image by clustering the colors in the image based on finite iterations. In this experiment, we processed the image by following the steps below. First, K colors are selected from the original image as the initial clu- stering center. According to the color similarity criterion, the colors in the original image are classified. They are divided into different sub-clustering families. Then the clustering center of each sub cluster family is revalua- ted. The mean of the colors in each subcluster family is used to represent the new cluster center and check whether each subcluster center has chan- ged. If all cluster centers are unchanged, the clustering process is completed. Otherwise, reclassify the colors in the original image, and recalculate the clu- ster centers of each sub-cluster family until all the cluster centers no longer change. Finally, according to the final color clustering center points to form a new color palette.
The semantic differential method is a method for studying the meaning of things or concepts using semantic area subscales (Petrenko, 2020). In earlier study, the semantic difference method was used to test people’s perception about drawing at different times (Donald, 2000). This method is carried out in the form of paper and pen. Subjects are required to evaluate a thing or concept on seven-point semantic scales in order to understand the mea- ning and intensity of the thing or concept in each evaluated dimension. The words at the two endpoints of the scale are usually adjectives with opposite meanings, such as honest and dishonest, strong and weak, important and unimportant.
The Style Correlation Between Color Palette Generated 355
Figure 1: Five classical paintings used in experiment.
Figure available in the original PDF paper.
Figure 2: Pixel images generated by clustering color (from left to right respectively corresponding to five classical paintings in Figure 1).
Experimental Study Subjects: Twenty students (10 males and 10 females) were recruited in this experiment. All participants had normal or corrected visual acuity and nor- mal color vision. The mean age of the participants was 22 years old, ranging from 21 to 24 years old. The participants are major in design. They can clearly distinguish color feelings and have received professional training.
Materials: This experiment select five classical paintings to extract the main color, respectively is Van Gogh’s “star”, Katsushika Hokusai “Kana- gawaoki Namiura”, Edvard Munch’s “scream”, Van Gogh’s “sunflower”, “Shippo Fugakuzugaku” (Figure 1). These images have their own unique color perception, and was known by the public, the participants can accu- rately express the feelings of the color or picture. In order to generate the same color palette with the image color perception as much as possible, the value of K is set to 7, and the image color clustering is 7.
The influence of color on the painting style is not only the number of colors, the key is the proportion of each color. Therefore, after getting the 7 colors after clustering, the proportion of each color in the picture is calcu- lated. Based on the results calculated, a pixel map with randomly arranged pixels is generated, as shown in Figure 2. The color ratio of each color in the figure is the same as the color ratio of the picture after clustering.
Procedure: The perceptual vocabulary of the experimental scale is set to 7, and each perceptual vocabulary has 7 levels. The subjects are asked to score on the 7 dimensions of perceptual vocabulary according to the pixel image. The perceptual vocabulary includes the cold and warm, light and heavy, soft and hard, in addition, color also has depression and passion, dynamic and tranquility, hopeful and despair, gorgeous and simple feelings, etc.
RESULTS
The results show that the original image and its corresponding pixel image have a correlation in the cold and warm perception, light and heavy perce- ption, soft and hard perception. The cold and warm perception, light and
heavy perception, soft and hard perception, the soft and hard perception has the strongest correlation in the two images. The second is the sense of cold and warmth, and the last is the sense of weight.
There is no obvious correlation between the original image and the pixel image in terms of depression and passion, dynamic and quiet, hope and despair, gorgeous and plain and so on. Most images could not reflect the style of dynamic and quiet, gorgeous and plain, and the p value of subjects’ evaluation is far greater than 0.05 / 0.1, so the data are not relevant.
Some images have medium correlation in words such as depression and passion and hope and despair. “Starry Sky” has a certain correlation in depression and passion and hope and despair. “Kanagawaoki Namiura” and “Sunflower” have a certain correlation in depression and passion.
CONCLUSION
In general, the colors of the original image and the pixel image are related to the color perceptions such as cold and warm, light and heavy, soft and hard. The possible reason is that these feelings are closely related to the lightness, purity and hue of color. The reason for the highest correlation in soft and hard perception may be high purity and saturation of the color of the selected image.
There is not much relation in color perceptions such as depression and passion, dynamic and tranquility, hope and despair, gorgeous and plain. The reason may be that these words have more emotional factors than cold, warm and light. In addition, the color perception will be affected not only by the color of the picture, but also by the specific things presented in the image. The specific things presented in the image will influence the judgment.
The style of the palette generated by k-means clustering algorithm is related to the original paintings, which can be used as a color reference for designers. However, the color extracted through the K value will lose some details of the picture, resulting in influencing color perception of the original paintings.
However, there are still many deficiencies in this experiment. Most of the paintings selected are world-famous pictures. Previous cognitive experience may have some influence on the judgment. It also influences the standard of the experiment. The results of this experiment may only have some reference significance. The value of K in K-means clustering method has a great impact on the extracted color. It is a wise idea try other different color clustering methods, such as K + +, ISODATA algorithm and so on.
REFERENCES
Bahng, H., Yoo, S., Cho, W., Park, D.K., Wu, Z., Ma, X. and Choo, J., 2018. Coloring with words: Guiding image colorization through text-based palette generation. In Proceedings of the european conference on computer vision (eccv) (pp. 431–447). Delon, J., Desolneux, A., Lisani, J.L. and Petro, A.B., 2005, September. Automatic
color palette. In IEEE international conference on image processing 2005 (Vol. 2, pp. II-706). IEEE. Kita, N. and Miyata, K. (2016) ‘Aesthetic Rating and Color Suggestion for Color Palettes’, Computer Graphics Forum, 35(7), pp. 127–136.
The Style Correlation Between Color Palette Generated 357
Peng, Y.F. and Chou, T.R., 2019, April. Automatic color palette design using color image and sentiment analysis. In 2019 IEEE 4th International Conference on Cloud Computing and Big Data Analysis (ICCCBDA) (pp. 389–392). IEEE. Petrenko, V. and Mitina, O., 2020. The Fairytale Semantic Differential Technique: A
Cross-Cultural Application. Behavioral Sciences, 10(7), p.112. Pulzella, D.J., 2000. Differences in reactions to paintings by male and female college students. Perceptual and Motor Skills, 91(1), pp. 251–258. Sinaga, K.P. and Yang, M.S., 2020. Unsupervised K-means clustering algori-
thm. IEEE access, 8, pp. 80716–80727. Wijffelaars, M. et al. (2008) ‘Generating Color Palettes using Intuitive Parameters’, Computer Graphics Forum, 27(3), pp. 743–750.
LISTED IN THE AHFE DIGITAL BOOKSTORE CATALOGUE
Explore the complete digital volume
Ergonomics In Design
Read this individual research paper free through the original publisher, or explore the full digital proceedings book.
ISBN 978-1-958651-23-0
Explore this ISBN in the AHFE Bookstore ↗Listed in the July 2026 bookstore catalogue; search by ISBN to confirm current availability · Digital book purchase optional