1 Introduction

Since Qin dynasty, Chinese color culture has been continuously improved. Under the influence of Confucianism, Taoism, Buddhism, Chinese color view reflects the idea of the unity of nature and human, which is intuitive, experiential and subjective [1]. On the contrary, the Western have understood, studied and analyzed color in a scientific and rational manner all the time, and they formed scientific color systems by the end of 19th century. Combined with the contents of sociology, imagology and psychology, a series of theories and research methods of color science have been formed.

It is essential to select and apply color in architecture design, landscape design, traffic design, product design, digital design, display design and even personal image design, which indeed should be the fore process of Design. This paper aims to extract color schemes full of Chinese meaning from Chinese local natural and human environment, combining western color theory with the subjective perception from the public. In specific, a complete set of method of color extraction, collocation and application is proposed and applied to the extraction of color schemes from the Grain Rain in northern China, which is one of the 24 solar terms in Chinese traditional calendar.

The object of color extraction, the 24 solar terms in China, is one kind of supplementary calendar which was established in the pre-Qin dynasty and completed in Han dynasty to guide agricultural events [2]. It is a knowledge system formed by observing the anniversary of the apparent motion and getting to know more about the regulation of changes in time, climate, phenology and so on. A large number of custom culture and ritual faith were formed according to the solar terms, which consist of sincere blessing and wishes of Chinese people. Different periods of natural environment and cultural customs will present different colors and feelings. The color schemes extracted form 24 solar terms can be used in package design of related solar terms, physical product design and Internet product design, etc. In addition, they will help to gain the cultural identity of audience and effectively disseminate and promote Chinese culture.

2 Methodology

This method is divided into three steps. The first step aims to obtain materials for color extraction: finding the typical objects by literature review, field research and user research, which can represent the Grain Rain in some perspective. In other words, by which people can intuitively associate with the Grain Rain. Then field research was carried out to take pictures pretty close to the true images. The second step aims to extract colors and match them: colors in the pictures and the count of each color were preliminary gained through octree method, then after matching with the given standard color palette, the standard colors from the picture and their count were obtained through LSD method. According to the count of each color and color distribution in the picture, about 3 to 5 kinds of colors were selected and confirmed that its degree of beauty was qualified through the M•Spenser’s aesthetic measurement. Finally, the area ratio of each color could be calculated through Munsell Color Harmony Theory. The third step aims at confirming the emotion words of color schemes: the emotion of color schemes could be measured through the Semantic Difference method in Kansei engineering.

3 Procedure and Results

3.1 Stage One (Obtaining the Materials of Color Extraction)

Literature Review.

According to “Huainanzi”, the origin of the Grain Rain can date back to Cang Jie creating characters, which was a quite big event [3]. The Yellow Emperor issued a decree at the end of spring and the start of summer, announced that Cang Jie had successfully created characters and called on the world to learn. On that day, it rained unusually and countless grains and rice dropped, therefore, descendants named the day as the Grain Rain, as one of the 24 solar terms. The Grain Rain is the sixth solar term of the 24 ones, which is the last solar term in the spring. As the saying goes, “The snow stops in Qingming, and the frost stops in Grain Rain.” It is beneficial for corn crops that the temperature has risen markedly while the rainfall is seasonable during the late spring months, when it is a good time to sow seedlings and grafting. It has been said since ancient times that “rain gives life to all grains” [4].

The ancients have divided Grain Rain into three periods: in the first period, the duckweed starts to grow, for the increasing rainfall. When the second period comes, cuckoos begin to move about frequently to remind people to sow. In the third period, the hoopoes begin to appear on the mulberry. In addition to the typical three periods, it is also time for peony blossoming around Grain Rain, so peony is also known as “Grain Rain Flower” and there is a saying that “Grain Rain is the perfect timing to watch peony” [2].

After reviewing literature and interviewing experts, over 20 kinds of images related to Grain Rain were identified initially, such as duckweed, peony, cedar and so on. They were divided into four types: natural views, farming activities, food culture and folk customs. In addition, the relevant stories, time and location information of each image were collected at the same time.

Questionnaire and Interview.

In order to understand the real appearance of images in the modern life, and to understand how the representative images of nature, food, custom of Grain Rain look like in people’s views and how do people feel about Grain Rain, questionnaire and interview were designed and carried out.

Questionnaire of Divided Images.

There are five parts of the questionnaire: demographic information, images of natural views, foods, customs and overall feeling. Demographics mainly include the participants’ gender, age, location information and so on. The images collected in the previous stage were listed separately in the three image categories. Participants were invited to choose one or more images that can represent Grain Rain (they can also add images by themselves). In natural images, participants were asked to select the image and then rank them. Investigation about crops was not included in the questionnaire due to the fact that the general population may know less about it. But there was an open-ended question at the end of the questionnaire in case some participants know crops. In the last part for investigating people’s overall feeling, participants were invited to choose representative verse, describe the color of environment and their feeling in Grain Rain.

Interview.

In order to investigate the feeling of people whose group was not covered by the questionnaire, such as people aged over 50, and to know how representative people feel about corps in Grain Rain which is not surveyed clearly in the questionnaire, we organized interviews after the questionnaire was completed.

Results.

The first part of questionnaire was distributed through the Internet, and 100 valid questionnaires were returned, of which 88 participants were from northern China. A total of 5 participants also from northern China were interviewed. After doing descriptive statistics of the questionnaire and interview data, nine kinds of images that people think can represent Grain Rain were obtained, including rape flower, catkin, cedar, peony, wheat and so on. The analysis summary are as follows (Fig. 1 and Table 1):

Fig. 1.
figure 1

Rank result of natural views

Table 1. Summary of the first questionnaire and interview

Questionnaire of Images Summary.

In the questionnaire and interview described above, representative images were obtained dividedly and there is not a whole representative ranking of them. So another questionnaire was carried out to invite participants to rank the whole images obtained before, then the representativeness and importance of each image will be gained.

The questionnaire was set to ask participants to choose the representative images first and then rank them (Fig. 2).

Fig. 2.
figure 2

Questionnaire of images summary

Results.

After distributing it on the Internet, 53 valid questionnaires were returned. The following figure shows the original result (Fig. 3):

Fig. 3.
figure 3

The result of images ranking

Table 2. Representative images of Grain Rain

From the original data, it is easy to find that the representativeness lists from top to bottom like this: rape flower, catkin, cedar, wheat, cuckoo, tulip, locust tree flower, peony, hoopoe. Considering that most of the participants are ungraduated students, who may know little about peony, and the results of the first questionnaire, interview and the ideas from literature and experts, peony was promoted to the level of more representative (Table 2).

Fig. 4.
figure 4

Collection of materials (the first row from left to right: cloves, begonia, tulip, peony, the second row from left to right: Chinese rose, rape flower, wheat, cedar)

Materials Collection and Arrangement.

Field study was carried out during the Grain Rain, after observing the natural views, farm events, foods and customs, lots of pictures of representative images were taken (Fig. 4). Due to the limitation of equipment and environment, a few pictures from professional photographers and Internet were collected as supplements. Then, materials were screened by considering whether its exposure parameter was reasonable, and whether it is close to the real image. About 5 pictures were chosen to be used in the color extraction.

3.2 Stage Two (Color Extraction and Coordination)

The most widely and often used color extraction approaches, such as K-means clustering, cannot generate color with high level of chroma or extract color that can be a great match to the standard color palette, whose results cannot be used in realistic design [5]. Colors extracted from several pictures of one certain image cannot be merged through these approaches.

The color extraction algorithm can be divided into two steps: initially extracting color (octree algorithm part) and comparing initial colors with the standard color palette (least-significant difference method part). The gray color will be revised as standard color, while the count of each color will come out with each picture so that colors can be merged in the end.

Octree Algorithm.

Octree algorithm was created in 1988 at first [6]. Octree is suitable for representing color space, all the colors can be distributed in a cube. In the cube, RGB colors are made as the axes, each of which has numbers from 0 to 255. In this way, each color can be mapped to a certain position in the cube [7]. The structure is suitable for quantifying colors from images, and there are huge advantages of the time complexity and the spatial complexity, as well as the fidelity compared with other methods.

The R, G, B value of color of each pixel form pictures will be obtained, changed to binary numbers and written line by line. The sub-node number of one node will be obtained after arranging RGB channels column by column. Doing this for every pixel in a picture will result in an octree with complete information. For the bottom adjacent leaves, the first seven places of them are same and only the last place is different, in other words, colors represented by these brother nodes will be similar in a certain range. When number of these leaves reaches one certain value, they can be merged to the upper level while preserving the quantity information. After repeating this process, colors will be obtained whose quantity is in a certain range. Due to the uncertainty of color quantity, the range of quantity is specified that no more than 256 colors will be extracted. In this study, the first 64 species of color will be picked for further study.

But there are still some problems of colors extracted by octree algorithm:

  1. a.

    the quantity of colors cannot be certain

  2. b.

    it is possible that there are similar colors

  3. c.

    the colors cannot be used immediately which need to be chosen according to certain situation.

The least-significant difference algorithm will solve these problems.

Least-Significant Difference Algorithm (LSD).

By the octree algorithm, the color contained in the picture can be extracted. The color group is not up to any standard palette, although the fidelity of these colors is pretty high, the extracting colors cannot be used directly in the production environment because the colors used in design and production should be based on design guideline and standard palette. The least-significant difference method which will be expressed next, is used to solve such problems.

The color set extracted from the original image by octree algorithm is called the original color group. The color set specified by the design guideline in the production environment is called the standard color group (the Material Design palette was used in this paper, shown in Fig. 5). The aim of the algorithm is to find the extraction color group from the standard color group, which is the most similar to the original color group. The extraction of color groups can ensure that the color of the original picture is similar to the color of the original picture, and it can also ensure that it is standardized. It can ensure the similarity between the extracted color group and the color style of the original image. The extraction color group is also standardized and normalized).

Fig. 5.
figure 5

Material design palette

The LSD algorithm can be divided into three steps: first, calculating the hue of each color in the original color group; second, getting the standard color set which is close to the hue in the standard color group; third, finding out the most similar color between the standard color set and the original color in value and chroma [8].

There are several difficult problems to be dealt with in this method: the first one is how to judge the closest difference of value and chroma in the third step. The usual method, Euclidean distance method will neutralize the difference between two dimensions of color, and the result of color extraction is close to the theoretical distance, but the visual effect shows it is not reasonable. In order to find the color with the smallest difference, we decided to calculate the distance on every dimension, and judge it with the largest distance instead of Euclidean distance. The second is how to deal with the gray color group in the phase of finding the similar color set. Because there is no gray hue, so a guideline has been issued that if the BRG values of a kind of color are too close (the distance between the three values is less than 8), the color is judged to be gray. The third is the classification of standard color groups. Most of the standard color palettes are grouped according to hue attributes (such as material design palette), but it performs bad if using this classification directly. There are many colors that are too bright or too low in chroma, though they are quite different from each other in hue, people will consider them very close to white or black. They need to be processed separately. These colors will be filtered out and placed in special high value sets and low chroma sets.

The function of the algorithm was developed based on Web technology. After uploading the picture to the web server, the color extraction results of the picture will be returned. As shown in the Fig. 6:

Fig. 6.
figure 6

The example of extracting colors from single picture

After extracting colors of all the pictures of each image, the number of the same color was merged to get the result of color extraction, as shown in the Fig. 7:

Fig. 7.
figure 7

The example of colors extracted from several pictures of pink peony

In this study, octree combined with least-significant difference method was carried out. This method can generate a great representative of the theme color of the picture as it can ensure the similarity between the extracted color group and the color style of the original image. Also, the color is obtained after matching the given standard colors, so that it can be directly used in the design and development links. Moreover, this method also provides the quantity information of colors in the original materials, which can be acting as the reference for coordinating colors.

Color Selection and Aesthetics Calculation.

After preliminarily extracting certain kinds of color, considering the design application, 3–4 colors were selected for color matching from the original result of color extraction (Fig. 8). During the selection process, the quantity information based on the color extraction was taken into consideration, comparative analysis of the image was done, and the most appropriate colors of the image itself would be chosen. Besides, the differences of value, hue, etc. were taken into account.

Fig. 8.
figure 8

The example of chosen colors of pink peony

After screening, to make sure these several colors in harness comply with the requirements of aesthetics, M•Spenser’s aesthetic measurement was carried out [9]. The aesthetic value should be greater than 0.5. If not, filter the representative color again.

$$ {\text{M}} = {\text{O}}/{\text{C}} $$
(1)

In formula (1), M is the value of aesthetic, O is the order factor, C is the complexity factor.

This is in agreement with the qualitative opinion that “beauty lies in the unity of diversity”, the fundamental principle of beauty in form. But what he has put forward is a quantitative and operable standard of evaluation. The complex factor here means diversity, and the order factor corresponds to unity.

Mencius and Spencer introduced the quantitative formula into the evaluation of color scheme. After experiments, they think that the order factor O has different values whether there is colored hue in color scheme, that is,

$$ {\text{O}} = \sum {\text{Og}} \, \left( {{\text{when}}\,{\text{consisting}}\,{\text{of}}\,{\text{only}}\,{\text{colorless}}\,{\text{composition}}} \right) $$
(2)
$$ {\text{O}} = \sum {{\text{Oh}} + {\text{Ov}} + {\text{Oc}}\left( {{\text{when}}\,{\text{consisting}}\,{\text{of}}\,{\text{color}}} \right)} \, $$
(3)

In the formula, Og is an order factor only in a colorless grey combination. Oh, Ov and Oc are all order factors determined by hue difference, value difference or chroma difference when there is any kind of color in color matching. Their values depend on the difference between each color attribute, and all order factors are shown in Figs. 9, 10 and Table 3.

Fig. 9.
figure 9

The hue classification map in M•Spenser’s aesthetic measurement

Fig. 10.
figure 10

The value and chroma classification map in M•Spenser’s aesthetic measurement

Table 3. The order factors

In formula (1), the complex factor C is composed of:

$$ {\text{C}} = {\text{Cm}} + {\text{Ch}} + {\text{Cv}} + {\text{Cc}} $$
(4)

In formula (4), Cm is the total number of colors in color scheme; Ch the number of color pairs with hue difference; Cv the number of color pairs with value difference; Cc the number of color pairs with chroma difference.

Color Matching.

Munsell Color Harmony Theory was carried out to determine the area ratio of each color and gain the color scheme of one certain image [10]. Munsell color system use the value of hue, value and chroma to specify a specific color. In this color system, the same contrast relationship must be shown between the same intervals of color. Color with the same value of value or chroma will perform the same lightness or chroma in the visual sense regardless of any hue. Specifically, the varieties of value and chroma are relevant to the area ratio when matching several colors. The ratio of products of value and chroma of a pair of colors are inversely proportional to their area ratio. There are other key points of Munsell Color Harmony Theory such as: the matching and reconciliation performs the best between colors with the same hue in hue-blending; when doing the chroma-blending in the same hue as the premise, the color number should be controlled and so on. The above points are to provide a theoretical basis for the color collocation.

As an example, change the RGB of 4 colors extracting and screening from pink peony into the value of hue, value and chroma in Munsell color system, they all meet the following formulas:

$$ \left( {{\text{The}}\,{\text{value}}\,{\text{of}}\,{\text{A}} \times {\text{the}}\,{\text{chroma}}\,{\text{of}}\,{\text{A}}} \right)/\left( {{\text{The}}\,{\text{value}}\,{\text{of}}\,{\text{B}} \times {\text{the}}\,{\text{chroma}}\,{\text{of}}\,{\text{B}}} \right) = {\text{The}}\,{\text{area}}\,{\text{of}}\,{\text{B}}/{\text{the}}\,{\text{area}}\,{\text{of}}\,{\text{A}} $$
(5)
$$ \left( {{\text{The}}\,{\text{value}}\,{\text{of}}\,{\text{A}} \times {\text{the}}\,{\text{chroma}}\,{\text{of}}\,{\text{A}}} \right)/\left( {{\text{The}}\,{\text{value}}\,{\text{of}}\,{\text{C}} \times {\text{the}}\,{\text{chroma}}\,{\text{of}}\,{\text{C}}} \right) = {\text{The}}\,{\text{area}}\,{\text{of}}\,{\text{C}}/{\text{the}}\,{\text{area}}\,{\text{of}}\,{\text{A}} $$
(6)
$$ \left( {{\text{The}}\,{\text{value}}\,{\text{of}}\,{\text{A}} \times {\text{the}}\,{\text{chroma}}\,{\text{of}}\,{\text{A}}} \right)/\left( {{\text{The}}\,{\text{value}}\,{\text{of}}\,{\text{B}} \times {\text{the}}\,{\text{chroma}}\,{\text{of}}\,{\text{B}}} \right) = {\text{The}}\,{\text{area}}\,{\text{of}}\,{\text{D}}/{\text{the}}\,{\text{area}}\,{\text{of}}\,{\text{A}} $$
(7)

that is:

$$ \begin{aligned} & \left( {{\text{The}}\,{\text{value}}\,{\text{of}}\,{\text{A}} \times {\text{the}}\,{\text{chroma}}\,{\text{of}}\,{\text{A}}} \right) \times {\text{the}}\,{\text{area}}\,{\text{of}}\,{\text{A}} \\ & \quad = \left( {{\text{The}}\,{\text{value}}\,{\text{of}}\,{\text{B}} \times {\text{the}}\,{\text{chroma}}\,{\text{of}}\,{\text{B}}} \right) \times {\text{the}}\,{\text{area}}\,{\text{of}}\,{\text{B}} \\ & \quad = \left( {{\text{The}}\,{\text{value}}\,{\text{of}}\,{\text{C}} \times {\text{the}}\,{\text{chroma}}\,{\text{of}}\,{\text{C}}} \right) \times {\text{the}}\,{\text{area}}\,{\text{of}}\,{\text{C}} \\ & \quad = \left( {{\text{The}}\,{\text{value}}\,{\text{of}}\,{\text{D}} \times {\text{the}}\,{\text{chroma}}\,{\text{of}}\,{\text{D}}} \right) \times {\text{the}}\,{\text{area}}\,{\text{of}}\,{\text{D}} \\ \end{aligned} $$
(8)

According to the formulas above, the area ratio of 4 colors can be calculated (Fig. 11):

Fig. 11.
figure 11

The example of color scheme of pink peony obtained by Munsell Color Harmony Theory

$$ \begin{aligned} {\text{S}}_{\text{A:}} {\text{S}}_{\text{B:}} {\text{S}}_{\text{C:}} {\text{S}}_{\text{D }} & = \,84 \times 70 \times 48 :96 \times 70 \times 48 :96 \times 84 \times 48 :96 \times 84 \times 70 \\ & = \,70 :48 :40 :35 \\ \end{aligned} $$

3.3 Stage Three (Color Scheme Application)

Based on the color image vocabulary from Nippon Color & Design Research Institute, the Semantic Difference method in Kansei engineering was carried out to measure the color emotion of each color scheme [11,12,13]. 14 emotion adjectives were chosen from the color image coordinates. They are romantic, pretty, casual, dynamic, clear, modern, natural, elegant, chic, old-fashioned, dapper, luxurious, wild and formal (Fig. 12).

Fig. 12.
figure 12

The color emotion coordinates from Nippon Color & Design Research Institute

The Semantic Difference method in Kansei engineering is divided into several steps. The first step is to find the corresponding antonyms for the existing color emotion words, and form pairs of positive and antonym words (a pair of words is composed of two words in the exist color image coordinates) (Table 4).

Table 4. Pairs of emotion words (original)

The second step is to use color emotion semantic difference scale consisting of the pairs of emotion words to evaluate color schemes. Participants were asked to select one word in the pair and degree that could describe their subjective feelings on a color scheme. For example, one color scheme allows the participants to feel somewhat romantic, in “romantic-rational” pair the score should be “−1”; if making the participants feel very romantic, in “romantic-rational” pair the score should be “−2”; if there is no difference in feeling, “0” should be selected.

53 participants were asked to evaluate all of the color schemes using 5-point scale on the Internet, then their responses were analyzed by carrying out item analysis and Pearson correlation test, two pairs of emotion words not significant were eliminated. The color image semantic difference scale was optimized.

From this table, it is obvious that significant values of the pair “wild and elaborate & delicate” are more than 0.01, proving that it is not significant and should be removed.

The result of Pearson correlation test shown in Table 5 concurred with the result of item analysis shown in Table 6, the pair “wild and elaborate & delicate” should be removed. The modified pairs of color emotion are shown in Table 7, which were used to evaluate color schemes finally.

Table 5. The result of item analysis
Table 6. The result of Pearson correlation test
Table 7. Pairs of emotion words (modified)

Then calculating the score of every color scheme, the emotion words suitable to describe the color scheme would be determined. In addition, it is possible to discovery more situation relevant to use the color scheme. For example, the color scheme extracted from pink peony is relatively lovely and luxurious, kind of romantic, natural and leisurely according the scores, which can be used in packing design of luxurious food or clothing design (Fig. 13).

Fig. 13.
figure 13

The scores of the color scheme of pink peony

Putting color schemes of all representative images of Grain Rain into the color image coordinates, it can be found that color schemes are mainly distributed in pretty, romantic, natural, clear and casual, some of them are distributed in luxurious, chic, dapper (Fig. 14).

Fig. 14.
figure 14

The color emotion of representative color schemes of Grain Rain

As for designing in related fields of Grain Rain, clear and romantic color schemes can be used, such as color schemes from wheat, white peony and white locust tree flower and color scheme, or from purple tulip, rape flower etc.

4 Conclusion

The views in this paper are different from China’s past subjective and experiential color views and research ideas, but combining western scientific color system, and a scientific method system to extract color schemes from real environment and real things was proposed which includes the acquisition of picture materials, color extraction, harmonization and evaluation. It can be used in even every field to extract the theme color or color matching scheme from any picture material. Especially in the step of carrying out least-significant difference method, the standard palette can be defined as any palette in any industry, which ensures the color schemes extracted can be used in actual production and processing, or meet the display specification in Internet industry etc.

In this paper, M•Spenser’s aesthetic measurement and Munsell Color Harmony Theory may be relatively old, but still be able to meet the demand of the method. In the future, it is necessary to explore new aesthetic evaluation methods and new color harmony theory. Then the color schemes obtained by the new theories can be contrasted with the schemes obtained in this paper to see the difference and the quality.

In addition, in the following research participants can be asked to assess whether the color scheme can represent the image or Grain Rain. The research of inviting participants to evaluate the representation of color schemes in graphic design or product design using the color schemes extracted by the method system can also be carried out (using semantic differential method), which will verify the rationality of the extraction and application of color schemes.