Page color matching generation method and device, electronic equipment and computer readable medium
By receiving the attribute information of the preset color, determining its hue and color level, and generating rich color level matching and color matching hue, the problem of single page color design in the existing technology is solved, and diverse and efficient page color matching generation is achieved.
Patent Information
- Application Number
- CN202310781040.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-28
- Publication Date
- 2024-12-31
AI Technical Summary
The existing page color matching model cannot meet the rich and diverse page color design needs in the network environment, and the lack of relevant rules for color level matching, resulting in a single color tone and cannot meet the current diverse needs of page color design.
By receiving the attribute information of the preset color, determine its hue and color level, generate color level matching data and color matching hue, including selecting candidate color level matching templates, determining the color level values of each area in the page, and dividing it into solid color levels according to the hue , light-color, dark-color and gray-color, expand the color matching to similar colors, adjacent colors, medium-difference colors, contrasting colors and complementary colors, generate preview color pages, and perform color balance detection.
Added color level matching and color matching options, improves the diversity of page color design, reduces the generation of single-tone pages, meets the usage needs of different users, expands the scope of application of the method, and improves the efficiency of page color matching design .
Smart Images

Figure CN119228947A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the technical field of page optimization, and in particular to a page color matching generation method, device, electronic device, and computer-readable medium. Background Art
[0002] In the production of online marketing advertisements, the marketing advertisement pages are generally generated through the intelligent design of the platform. The platform is usually equipped with an intelligent color matching model. This color matching model can support 19 hues and 5 tones through basic color system division, hue and discrete fission, and generate color matching schemes with the same hue and different color levels.
[0003] However, the inventors have found that this color matching model still has some shortcomings and cannot meet the requirements of rich and diverse page color design in a network environment.
[0004] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0005] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0006] Some embodiments of the present disclosure propose a page color generation method, device, electronic device, computer-readable medium, and computer program product to solve one or more of the technical problems mentioned in the above background technology section.
[0007] In a first aspect, some embodiments of the present disclosure provide a method for generating a page color scheme, comprising: in response to receiving attribute information of a preset color, determining the hue and color scale of the preset color; determining the color scale range of each area in the page according to the color scale of the preset color, and obtaining color scale matching data; determining a color scheme hue that matches the preset color according to the hue of the preset color; and generating a preview color page of the page based on the preset color, the color scale matching data and the color scheme hue.
[0008] In some embodiments, the color scale range of each area in the page is determined according to the color scale of the preset color, including: selecting a candidate color scale matching template corresponding to the color scale of the preset color from the preset color scale matching template; determining the color scale value of each area in the page according to the color scale range of each level in the candidate color scale matching template, wherein the page includes multiple display modules, and each display module includes at least one display pit.
[0009] In some embodiments, a color matching hue that matches the preset color is determined based on the hue of the preset color, including: in response to determining that the hue of the preset color is not the set hue, determining a hue range of similar colors of the preset color; based on the hue range of similar colors, determining hue ranges of at least two other color matchings as the color matching hue of the preset color, wherein the at least two other color matchings include at least two of the following: similar colors, adjacent colors, medium-difference colors, contrasting colors, and complementary colors.
[0010] In some embodiments, the method further includes: performing standardized measurement division on the hue range and color scale range of each color.
[0011] In some embodiments, the hue range and color scale range of each color are divided by standardized measurement, including: dividing a preset number of hues according to a hue wheel, and determining the angle interval of each hue in the preset number of hues; determining the average angle interval of each hue according to the number of the preset number of hues; determining the unit angle of each hue in the preset number of hues according to the angle interval of each hue and the average angle interval.
[0012] In some embodiments, the hue range and color scale range of each color are divided by standardized measurement, and also include: for each hue among a preset number of hues, according to the brightness and saturation of the hue, dividing it into at least color scale areas of pure color scale, light color scale, dark color scale and gray scale; and for the same color scale area, further dividing it into at least one sub-area according to the depth of the color.
[0013] In some embodiments, determining the hue range of similar colors to a preset color includes: determining the unit angle of the preset color in the hue wheel according to the hue of the preset color; determining the actual rotation angle range based on the set rotation angle range of the similar colors in the hue wheel and the unit angle of the preset color; determining the hue range of similar colors to the preset color according to the hue value of the preset color and the actual rotation angle range.
[0014] In some embodiments, the method further includes: performing a color balance detection on the generated preview color page, wherein the color balance includes at least one of the following: primary and secondary color balance, contrast balance, cool and warm color balance, and color presence or absence balance.
[0015] In some embodiments, a color balance detection is performed on the generated preview color page, including: determining the color scale of the background color in the preview color page; determining the background depth of the preview color page and the hue range of the adapted auxiliary color according to the color scale of the background color; and performing a primary and secondary color balance detection on the preview color page based on the hue range of the auxiliary color.
[0016] In some embodiments, a color balance detection is performed on the generated preview color page, including: determining the relative brightness of each level according to the values of the three optical primary colors of each level; determining the contrast between the levels according to the relative brightness of each level and the positional relationship in the preview color page, and determining whether the determined contrast is within a set range.
[0017] In some embodiments, color balance detection is performed on the generated preview color page, further comprising: determining the hue of the preset color according to the hue of the preset color; adjusting the proportion of other different hues in the preview color page based on the hue of the preset color; and / or in response to the contrast between the background color of the display module and the background color of the display pit being less than or equal to a target value, leaving a white area for the background of the object in the display pit, wherein the proportion of the white area in the total background of the display pit is not less than a set value.
[0018] In a second aspect, some embodiments of the present disclosure provide a page color matching generation device, comprising: a color determination unit, configured to determine the hue and color scale of a preset color in response to receiving attribute information of a preset color; a color scale matching determination unit, configured to determine the color scale range of each area in the page according to the color scale of the preset color, and obtain color scale matching data; a color matching hue determination unit, configured to determine the color matching hue that matches the preset color according to the hue of the preset color; and a page generation unit, configured to generate a preview color page of the page based on the preset color, color scale matching data and color matching hue.
[0019] In some embodiments, the color scale matching determination unit is further configured to select a candidate color scale matching template corresponding to the color scale of a preset color from the preset color scale matching template; determine the color scale value of each area in the page according to the color scale range of each level in the candidate color scale matching template, wherein the page includes multiple display modules, and each display module includes at least one display pit.
[0020] In some embodiments, the color matching hue determination unit is further configured to determine the hue range of similar colors of the preset color in response to determining that the hue of the preset color is not the set hue; based on the hue range of similar colors, determine the hue ranges of at least two other color matchings as the color matching hue of the preset color, wherein the at least two other color matchings include at least two of the following: similar colors, adjacent colors, medium difference colors, contrasting colors, and complementary colors.
[0021] In some embodiments, the page color matching generating device further includes a division unit configured to perform standardized measurement division on the hue range and the color scale range of each color.
[0022] In some embodiments, the division unit is further configured to divide a preset number of hues according to the hue wheel, and determine the angle interval of each hue in the preset number of hues; determine the average angle interval of each hue according to the number of the preset number of hues; determine the unit angle of each hue in the preset number of hues according to the angle interval of each hue and the average angle interval.
[0023] In some embodiments, the division unit is further configured to divide each hue among a preset number of hues into at least pure color scale, light color scale, dark color scale and gray color scale area according to the brightness and saturation of the hue; and for the same color scale area, further divide it into at least one sub-area according to the depth of the color.
[0024] In some embodiments, the color matching hue determination unit is further configured to determine the unit angle of the preset color in the hue wheel according to the hue of the preset color; determine the actual rotation angle range based on the set rotation angle range of similar colors in the hue wheel and the unit angle of the preset color; determine the hue range of similar colors of the preset color according to the hue value of the preset color and the actual rotation angle range.
[0025] In some embodiments, the page color matching generation device also includes a balance detection unit, which is configured to perform color balance detection on the generated preview color page, wherein the color balance includes at least one of the following: primary and secondary color balance, contrast balance, cool and warm color balance, and color presence or absence balance.
[0026] In some embodiments, the balance detection unit is further configured to determine the color scale of the background color in the preview color page; determine the background depth of the preview color page and the hue range of the adapted auxiliary color based on the color scale of the background color; and perform primary and secondary color balance detection on the preview color page based on the hue range of the auxiliary color.
[0027] In some embodiments, the balance detection unit is further configured to determine the relative brightness of each level based on the values of the three optical primary colors of each level; determine the contrast between the levels based on the relative brightness of each level and the positional relationship in the preview color page; and determine whether the determined contrast is within a set range.
[0028] In some embodiments, the balance detection unit is further configured to determine the hue of a preset color based on the hue of the preset color; adjust the proportion of other different hues in the preview color page based on the hue of the preset color; and / or in response to the contrast between the background color of the display module and the background color of the display pit being less than or equal to a target value, leave a white area for the background of the object in the display pit, wherein the proportion of the white area in the total background of the display pit is not less than a set value.
[0029] In a third aspect, some embodiments of the present disclosure provide an electronic device, comprising: one or more processors; a storage device on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the page color generation method described in any implementation method in the above-mentioned first aspect.
[0030] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the page color generation method described in any implementation manner in the first aspect above is implemented.
[0031] In a fifth aspect, some embodiments of the present disclosure provide a computer program product, including a computer program, which, when executed by a processor, implements the page color generation method described in any implementation manner in the first aspect above.
[0032] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: the page color generation method of some embodiments of the present disclosure can improve the technical deficiencies in the relevant color matching model and enhance the richness of the page color. Specifically, the relevant color matching model usually lacks relevant rules for color scale matching. The depth and lightness of the color matching generally change in the order of getting darker or lighter from the foreground to the background, which makes the color tonality relatively single. Therefore, it is impossible to meet the current demand for the diversity of page color design. Based on this, the page color generation method of some embodiments of the present disclosure can determine the color scale matching data and the color matching hue respectively according to the hue and color scale of the specified preset color. This can increase the selectivity of color scale matching and color matching, and enhance the diversity of page color design. In addition, it can reduce the generation of single-tone pages, meet the usage needs of different users, and expand the scope of application of the method. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0034] Figure 1 is a flow chart of some embodiments of the page color matching generation method disclosed in the present invention;
[0035] Figure 2A is a schematic diagram of some embodiments of hue division of the present disclosure;
[0036] Figure 2B is a schematic diagram of some embodiments of color scale division of the present disclosure;
[0037] Figure 2Cis a comparative schematic diagram of some embodiments of color scale matching disclosed in the present invention;
[0038] Figure 3 are flow charts of other embodiments of the page color matching generation method disclosed in the present invention;
[0039] Figure 4 It is a schematic diagram of the structure of some embodiments of the page color matching generation device disclosed in the present invention;
[0040] Figure 5 It is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0041] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0042] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0043] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0044] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0045] Figure 1 The process 100 of some embodiments of the page color generation method according to the present disclosure is shown. The method comprises the following steps:
[0046] Step 101, in response to receiving attribute information of a preset color, determining the hue and color scale of the preset color.
[0047] In some embodiments, the execution subject of the page color matching generation method disclosed herein (such as an electronic device such as a page editing server) can communicate with other electronic devices through a wired connection or a wireless connection. When the execution subject receives the attribute information of the preset color, it can determine the hue and color scale of the preset color according to the attribute information.
[0048] It is understandable that when matching the color of a page, the user is usually required to input a color. The color can be a theme color selected by the user, or it can be the background color of the page or the main color of the page. In this way, the overall color matching of the page can be designed according to the color. Here, the user can input the attribute information of the color (i.e., the preset color) through the terminal. Among them, the attribute information is usually information used to describe the color, such as hue (H), saturation (S), lightness (L), position information in the page (such as background color), etc.
[0049] In some embodiments, the execution subject can determine the hue interval range according to the hue value in the attribute information (such as the angle value in the hue circle), thereby determining the hue of the preset color (such as the hue number or name, etc.). In addition, the execution subject can determine the color level of the preset color according to the saturation and brightness in the attribute information.
[0050] It should be noted that before color matching of a page, it is usually necessary to first define and divide the colors for easy color differentiation. In some embodiments, the execution subject may differentiate colors according to a traditional hue division method, such as dividing colors into 12 or 24 hues according to a 360-degree hue wheel.
[0051] Optionally, the execution subject may standardize and measure the hue range and color scale range of each color. Since different colors usually have uneven spans in terms of hue and color scale, in order to ensure uniform spans of hue and color scale changes under the same parameter changes, the color span measurement needs to be standardized in this embodiment.
[0052] Specifically, for the standardized division of hue, first, a preset number of hues are divided according to the hue ring, and the angle interval of each hue in the preset number of hues is determined. Then, according to the number of the preset number of hues, the average value of the angle interval of each hue can be determined. After that, according to the angle interval of each hue and the average value of the angle interval, the unit angle of each hue in the preset number of hues can be determined. The preset number here can be set according to actual conditions.
[0053] As an example, in a 360-degree hue circle, each color span is defined from a visual perspective. For example, red and orange have obvious hue changes within 15 degrees, while green has the same color span as other colors within 60 degrees. After division, a total of 16 hue intervals are obtained, such as Figure 2A As shown, the hue 1 angle range is 0-15; the hue 2 angle range is 15-30, and so on, the hue 16 angle range is 330-360 (0).
[0054] Next, the execution entity can standardize the above 16 hues by unit angle. Each hue average interval is divided into 22.5 degrees (i.e. 360 degrees divided by 16). Figure 2A The angle span range of each hue in the image is calculated by dividing it by the average interval to obtain the unit angle of each hue, as shown in the following table. Among them, the red and orange hues have a small span, and their unit angles are also small; while the green hue has a large span, and its unit angle is also large.
[0055] 0-21 22-44 45-66 67-89 90-111 112-134 135-156 157-179 Hue 1 Hue 2 Hue 3 Hue 4 Hue 5 Hue 6 Hue 7 Hue 8 0.667 degrees 0.667 degrees 0.889 degrees 0.578 degrees 1.2 degrees 2.67 degrees 0.889 degrees 0.889 degrees 180-202 203-225 226-247 248-270 271-292 293-315 316-337 338-360 Hue 9 Hue 10 Hue 11 Hue 12 Hue 13 Hue 14 Hue 15 Hue 16 0.889 degrees 0.889 degrees 1.11 degrees 0.667 degrees 0.889 degrees 0.889 degrees 0.889 degrees 1.334 degrees
[0056] Furthermore, for each hue in the preset number of hues, the execution subject can divide it into at least a pure color level, a light color level, a dark color level and a gray level color level area according to the lightness and saturation of the hue. And for the same color level area, it can be further divided into at least one sub-area according to the depth of the color.
[0057] Specifically, the lightness and saturation of each hue can be divided into four major areas from A to D. Among them, A represents pure color scale; B represents light color scale; C represents dark color scale; and D represents gray scale. Each area can be divided into 1 to 3 sub-areas to further divide the depth of the color scale. Similarly, in order to ensure that the change span of the same color scale of different hues is the same, the color scale division area of different hues is also different. For example Figure 2B As shown, the red area above is smaller than the green area below, while the C3 area is larger. As an example, the red color scale area division can be shown in the following table:
[0058]
[0059]
[0060] Here, the inventors refer to the PCCS (Practical Color coordinate System) color system. Starting from the concept of hue, the lightness relationship and purity relationship of each hue are demonstrated, and the position of each color in the hue is determined. All colors are divided into four tonality (bright and clear, dark and clear, pure, and gray and turbid hues). Therefore, in the embodiment of the present disclosure, the entire color scale is also divided into four categories according to the reference hue, and the A to D areas are used as hue (color scale) representatives. Under each hue (color scale) representative, the color scales with similar lightness and purity values are merged into sub-intervals.
[0061] Step 102, according to the color scale of the preset color, determine the color scale range of each area in the page to obtain color scale matching data.
[0062] In some embodiments, according to the color scale of the preset color determined in step 101, the execution entity can determine the color scale range of each area in the page, thereby obtaining color scale matching data. As an example, the execution entity can determine the color scale area to which the color scale of the preset color belongs. Then, the color scale range of each area in the page can be determined within the color scale area. For example, a sub-area can be selected from each sub-area in the color scale area as the color scale range of different areas in the page. Afterwards, the execution entity can select a color scale value from the color scale range to obtain color scale matching data that matches the preset color.
[0063] In some embodiments, in order to ensure that the color scales between different levels in a floor can be matched more harmoniously, the above-mentioned divided color scales can be classified and summarized into a color scale matching template (or model) to ensure the final generated effect. The color scale matching template can be pre-stored on the execution subject, or it can be pre-stored on other electronic devices connected thereto. Here, the color scale matching template can be a result that is summarized as a more suitable result after the designer conducts manual test runs of the elements of each layer.
[0064] It should be noted that floors generally refer to individual shopping guide modules in e-commerce scenarios. There are often multiple shopping guide modules in an e-commerce page. These shopping guide modules can be marketing types such as products, brands, coupons, etc. A floor usually contains marketing sub-units (usually called pits). For example, a product is displayed one by one, and clicking it will enter the product details page.
[0065] At this time, the execution subject can select a candidate color scale matching template corresponding to the color scale of the preset color from the preset color scale matching template. Then, according to the color scale range of each level in the candidate color scale matching template, the color scale value of each area in the page can be determined. Among them, the page generally includes multiple display modules (i.e., the above-mentioned floors). And each display module usually includes at least one display pit (i.e., the above-mentioned pit).
[0066] As an example, if the color scale of the preset color is determined to be in the B3 area, the execution subject can select a suitable color scale value from each level of the B3 color scale matching template. Thus, the matching results of the two different color scale value selections are obtained as shown in the following table. The final effect can be seen in Figure 2C The B3-1 and B3-2 color scale examples shown in the figure are not repeated here.
[0067]
[0068]
[0069] Color brightness generally refers to the brightness and depth of a color, indicating the changes in the brightness and depth of a color. In layman's terms, adding white to any color in the color system will increase the brightness of the color, while adding black will reduce the brightness of the color. Therefore, in daily life, when we say a color is dark, it means that the color has low brightness. Black and white belong to the achromatic system in color, and are very special in the color system. They only have brightness characteristics but no hue and purity properties.
[0070] It should be noted that the final effect of the atmosphere of a floor usually requires the superposition of different layers. In related color matching models (such as the Linglong color matching model), there is usually a lack of rules related to color scale matching. The depth of color matching generally changes in the order of getting darker or lighter from the foreground to the background, which often makes the color tonality relatively single. In the disclosed embodiment, different levels of color scales can be matched, which can not only ensure that each level is visible, but also enrich the color tone.
[0071] Step 103, according to the hue of the preset color, determine a color matching hue that matches the preset color.
[0072] In some embodiments, according to the hue of the preset color determined in step 101, the execution subject may determine a color matching hue that matches the preset color. As an example, the execution subject may determine the same color, similar color, and complementary color of the preset color according to the hue value of the preset color according to the definition of the color matching theory related knowledge, thereby obtaining the color matching hue of the preset color.
[0073] It should be noted that according to the definition of color matching theory, in the 360-degree color wheel, it is usually divided into similar colors, analogous colors, adjacent colors, medium-difference colors, contrasting colors, complementary colors, etc. Generally, similar colors are -15<H<+15; similar colors are ±15<H<±30; adjacent colors are ±30<H<±60; medium-difference colors are ±60<H<±90; contrasting colors are ±90<H<±120; complementary colors are ±120<H<±180.
[0074] Optionally, when it is determined that the hue of the preset color is not the set hue, the execution subject may first determine the hue range of the similar color of the preset color. Then, based on the hue range of the similar color, the hue range of at least two other color combinations may be determined as the color combination hue of the preset color. The at least two other color combinations may include at least two of the following: similar colors, adjacent colors, medium-difference colors, contrasting colors, and complementary colors.
[0075] It can be understood that in actual applications, it is not simply a certain type of color, but a composite color matching of 2 to 3 superimposed colors. First, it can be determined whether color matching is needed based on the H value of the input color (i.e., the preset color). If the hue of the input color is not the above-mentioned hue No. 1 (red) or hue No. 16, the similar color of the input color can be determined. Then, taking the similar color as the starting point, 2 similar colors and 2 complementary colors on the left and right sides are obtained. This process can also be implemented through a color matching model. At this time, the input of the color matching model is the similar color of the preset color (i.e., the H value at both ends), and the output can be a similar color and a complementary color (the same H value at both ends), forming a composite dual-segmentation complementary color model. In addition, in order to generate more abundant color matching results, the division of the above-mentioned color matching hues can change a certain range before and after. For example, complementary colors can be -150<H<-165, 150<H<165.
[0076] In some embodiments, when determining similar colors and other color combinations, in order to improve the accuracy of the determination result, the execution entity can search according to the above-mentioned standardized 360-degree hue circle. Specifically, first, the unit angle of the preset color in the hue circle can be determined according to the hue of the preset color. Then, based on the set rotation angle range of the similar color in the hue circle and the unit angle of the preset color, the actual rotation angle range can be determined. After that, the hue range of the similar color of the preset color is determined according to the hue value of the preset color and the actual rotation angle range.
[0077] As an example, if the hue of the preset color belongs to hue 3, its unit angle can be determined to be 0.889 degrees. According to the above-mentioned setting rotation angle range of similar colors as -15<H<+15, the actual rotation angle range of similar colors can be determined to be -13.335<H<+13.335. By analogy, other color matching hues can also be determined by this method.
[0078] It should be pointed out that in the relevant color matching model, only 18 recommended hues are usually given as color matching templates for different hues, and the color matching results generally only have a single color matching scheme of similar colors. This method will seriously affect the richness of the color generation results and cannot meet the rich and diverse color matching needs in the e-commerce environment. In the disclosed embodiment, it is possible to generate color results based on any value in the 360-degree hue wheel, so that the richness of hue generation is improved. Secondly, at the color matching level, in addition to similar colors, dozens of composite color matchings including similar colors, adjacent colors, medium-difference colors, contrasting and complementary colors have also been expanded. It can greatly enrich the page color, meet various color matching needs, and improve page design.
[0079] Step 104, generating a preview color page of the page based on the preset color, color level matching data and color matching hue.
[0080] In some embodiments, based on the preset colors, color scale matching data and color matching hue in the above steps, the execution subject can generate a preview color page of the page. As an example, the execution subject can set the background color in the page to the preset color and set other areas in the page to the color matching hue. And according to the color scale matching data, the color scale of each area is set to generate a preview color page.
[0081] It can be seen from the above description that the page color generation method of some embodiments of the present disclosure can improve some technical deficiencies in the relevant color matching model and enhance the richness of the page color. Specifically, the color level matching data and the color matching hue can be determined respectively according to the hue and color level of the specified preset color, so as to generate a preview color page. This can increase the selectivity of color level matching and color matching, and enhance the diversity of page color design. In addition, it can reduce the generation of single-tone pages, meet the usage needs of different users, and expand the scope of application of the method.
[0082] In addition, it should be noted that the relevant color matching models usually lack some rules for reviewing the generated effects, and the generated quality is difficult to guarantee. In other words, the relevant technologies often only have the page color matching function, but lack the review function for the overall effect of the final generated page. In this way, it is often necessary to generate the page first, and then the developer will manually review it. If there are problems or the effect is not as expected, manual adjustments or re-color matching are required. This will greatly increase the time required for page color matching design, affecting the efficiency and timeliness of page generation.
[0083] In some application scenarios, the page color matching generation method in the embodiment of the present disclosure can also perform color balance detection on the generated preview color page. Among them, color balance can include at least one of the following: main and auxiliary color balance, contrast balance, cold and warm color balance, and color balance. These are the main judgment bases that affect the color balance of the floor atmosphere.
[0084] See also Figure 3 As shown, it shows a process 300 of some embodiments of color balance detection in the page color matching generation method of the present disclosure.
[0085] In color theory, the main and secondary colors of the picture usually need different hues to achieve a rich and balanced state. Among them, the depth of the background has a great influence on the selection range of the main and secondary colors. Through research, it is found that when the background is light, users can accept a wider range of hues for secondary color matching, from similar colors to complementary colors. When the background color is dark, users can only accept secondary color matching from similar colors to adjacent colors. Therefore, the main and secondary color matching needs to be divided according to the depth of the background.
[0086] Based on this, in some embodiments, for the primary and secondary color balance detection, first, the execution subject can determine the color scale of the background color in the preview color page. Then, according to the color scale of the background color, the background depth of the preview color page and the hue range of the adapted secondary color can be determined. Then, based on the hue range of the secondary color, the primary and secondary color balance detection is performed on the preview color page.
[0087] As an example, if the background color is B0 to B2, it can be determined as a light color page. If the background color is B3 to B6, D1 to D2, A or C1, it can be determined as a medium-depth page. Then define the auxiliary color range according to different background depths.
[0088] Furthermore, for contrast balance detection, the execution subject can also determine the relative brightness of each level according to the value of the three primary colors (RGB, red-green-blue) of each level. Then, according to the relative brightness of each level and the position relationship in the preview color page, the contrast between the levels can be determined. Then, it can be determined whether the determined contrast is within the set range.
[0089] As an example, the formula for determining contrast is: P = (L1 + 0.05) / (L2 + 0.05). Among them, L1 and L2 represent the relative brightness of the color. The calculation formula for relative brightness is: L = 0.2126 × R + 0.7152 × G + 0.0722 × B. Here, the setting range of the contrast between the above-mentioned levels can be shown in the following table. In this way, the contrast of each layer can be ensured to be within the normal recognizable range compared to the superimposed colors of the lower layer.
[0090]
[0091] The lower layer superimposed color generally refers to the sum of the lower layer superimposed colors of the adjacent layer. For example, the floor texture is superimposed on the floor background color and the floor light perception, so for the floor texture, its lower layer superimposed color is the sum of the floor background color and the floor light perception.
[0092] In some embodiments, for the presence or absence of color balance detection, the execution subject may, according to the contrast detection standard in the previous step, if it is determined that the contrast between the background color of the display module (floor) and the background color of the display pit (pit) is less than or equal to the target value, a white area may be left for the background of the items in the display pit. That is, white space is left in the background of the display pit. Among them, the proportion of the white area in the total background of the display pit is not less than the set value.
[0093] As an example, when the contrast ratio between the floor background color and the pit background color is ≤1.8, a certain white area must be left in the product pit background, accounting for about 60% to 100% of the total pit background. When the contrast ratio between the floor background color and the pit background color is >1.8, the white area of the product pit background is optional and can account for 0% to 100% of the total pit background.
[0094] Optionally, for the cold and warm color balance detection, the execution subject can first determine the hue of the preset color according to the hue of the preset color. Then, based on the hue of the preset color, the proportion of other different hues in the preview color page can be adjusted.
[0095] As an example, in the disclosed embodiment, hues 1 to 4 and 15 to 16 can be determined as warm tones; hues 5 to 6 and 13 to 14 can be determined as neutral tones; and hues 7 to 12 can be determined as cool tones. At this time, if the execution subject determines that the preset color is a warm color, the area of neutral tones or cool tones in the page can be increased by 0% to 10%. In addition, when the preset color is a neutral tone or a cool tone, the area of warm tones in the page can be increased by 5% to 25%. As an example, the execution subject can adjust the operation control identifier (such as a button) in the page to the color of the desired tone. The hues of the cool and warm tones here can be obtained in the above process of determining the color matching hue.
[0096] It is understandable that the above-mentioned color balance detection process can also be implemented by a color balance model. The above-mentioned detection means and training samples can be used to train the model. The model can adopt a commonly used artificial intelligence network model structure. The page color matching production method of the disclosed embodiment can also perform color balance detection on the generated preview color page. This allows designers to quickly find the problem and shorten the page color matching design time. In addition, corresponding measures can be taken to improve the detected problems, thereby improving the overall color matching design effect of the page and ensuring the generation quality of the color scheme.
[0097] Further references Figure 4 , as a response to the above Figures 1 to 3 The present disclosure provides some embodiments of a page color matching generation device. Figures 1 to 3 The page color matching generating device can be specifically applied to various electronic devices.
[0098] like Figure 4As shown, the page color matching generation device 400 of some embodiments may include: a color determination unit 401, configured to determine the hue and color scale of the preset color in response to receiving the attribute information of the preset color; a color scale matching determination unit 402, configured to determine the color scale range of each area in the page according to the color scale of the preset color, and obtain color scale matching data; a color matching hue determination unit 403, configured to determine the color matching hue that matches the preset color according to the hue of the preset color; a page generation unit 404, configured to generate a preview color page of the page based on the preset color, color scale matching data and color matching hue.
[0099] In some embodiments, the color scale matching determination unit 402 can be further configured to select a candidate color scale matching template corresponding to the color scale of a preset color from the preset color scale matching template; determine the color scale value of each area in the page according to the color scale range of each level in the candidate color scale matching template, wherein the page includes multiple display modules, and each display module includes at least one display pit.
[0100] In some embodiments, the color matching hue determination unit 403 can be further configured to determine the hue range of similar colors of the preset color in response to determining that the hue of the preset color is not the set hue; based on the hue range of similar colors, determine the hue ranges of at least two other color matchings as the color matching hue of the preset color, wherein the at least two other color matchings include at least two of the following: similar colors, adjacent colors, medium difference colors, contrasting colors, and complementary colors.
[0101] In some embodiments, the page color matching generating device 400 may further include a division unit (not shown in the figure), which is configured to perform standardized measurement division on the hue range and color scale range of each color.
[0102] In some embodiments, the division unit can be further configured to divide a preset number of hues according to the hue wheel, and determine the angle interval of each hue in the preset number of hues; determine the average angle interval of each hue according to the number of the preset number of hues; determine the unit angle of each hue in the preset number of hues according to the angle interval of each hue and the average angle interval.
[0103] In some embodiments, the division unit can be further configured to divide each hue among a preset number of hues into at least pure color scale, light color scale, dark color scale and gray color scale area according to the brightness and saturation of the hue; and for the same color scale area, further divide it into at least one sub-area according to the depth of the color.
[0104] In some embodiments, the color matching hue determination unit 403 can be further configured to determine the unit angle of the preset color in the hue wheel according to the hue of the preset color; determine the actual rotation angle range based on the set rotation angle range of similar colors in the hue wheel and the unit angle of the preset color; determine the hue range of similar colors of the preset color according to the hue value of the preset color and the actual rotation angle range.
[0105] In some embodiments, the page color generation device 400 may also include a balance detection unit (not shown in the figure), which is configured to perform color balance detection on the generated preview color page, wherein the color balance includes at least one of the following: primary and secondary color balance, contrast balance, warm and cold color balance, and color presence or absence balance.
[0106] In some embodiments, the balance detection unit can be further configured to determine the color scale of the background color in the preview color page; determine the background depth of the preview color page and the hue range of the adapted auxiliary color based on the color scale of the background color; and perform primary and secondary color balance detection on the preview color page based on the hue range of the auxiliary color.
[0107] In some embodiments, the balance detection unit can be further configured to determine the relative brightness of each level based on the values of the three optical primary colors of each level; determine the contrast between the levels based on the relative brightness of each level and the positional relationship in the preview color page; and determine whether the determined contrast is within a set range.
[0108] In some embodiments, the balance detection unit can be further configured to determine the hue of a preset color based on the hue of the preset color; adjust the proportion of other different hues in the preview color page based on the hue of the preset color; and / or leave a white area for the background of the object in the display pit in response to the contrast between the background color of the display module and the background color of the display pit being less than or equal to the target value, wherein the proportion of the white area in the total background of the display pit is not less than a set value.
[0109] It is understandable that the units recorded in the page color matching generating device 400 are similar to the reference Figures 1 to 3 Therefore, the operations, features and beneficial effects described above for the method are also applicable to the page color matching generation device 400 and the units included therein, and will not be described in detail here.
[0110] Reference below Figure 5 , which shows a structural schematic diagram of an electronic device 500 suitable for implementing some embodiments of the present disclosure. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0111] like Figure 5 As shown, the terminal device 500 may include a processing device 501 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0112] Typically, the following devices may be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a speaker, a vibrator, etc.; storage devices 508 including, for example, a disk, a hard disk, etc.; and communication devices 509. The communication devices 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead. Figure 5 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0113] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0114] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0115] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0116] The computer-readable medium may be included in the electronic device; or it may exist independently without being installed in the electronic device. The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: in response to receiving the attribute information of the preset color, determines the hue and color scale of the preset color; according to the color scale of the preset color, determines the color scale range of each area in the page, and obtains the color scale matching data; according to the hue of the preset color, determines the color matching hue that matches the preset color; based on the preset color, the color scale matching data and the color matching hue, generates a preview color page of the page.
[0117] In addition, computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0118] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0119] The units described in some embodiments of the present disclosure may be implemented by software or hardware. The units described may also be provided in a processor, for example, may be described as: a processor including a color determination unit, a color scale matching determination unit, a color matching hue determination unit, and a page generation unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the color determination unit may also be described as a "unit for determining the hue and color scale to which a preset color belongs".
[0120] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0121] Some embodiments of the present disclosure further provide a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned page color matching generation methods.
[0122] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A method for generating a page color scheme, comprising: In response to receiving the attribute information of the preset color, determining the hue and color scale to which the preset color belongs; According to the color scale of the preset color, determine the color scale range of each area in the page to obtain color scale matching data; According to the hue of the preset color, determining a color matching hue that matches the preset color; A preview color page of the page is generated based on the preset color, the color scale matching data and the color matching hue.
2. The page color matching generation method according to claim 1, wherein: Determining the color scale range of each area in the page according to the color scale of the preset color includes: Selecting a candidate color scale matching template corresponding to the color scale of the preset color from the preset color scale matching templates; According to the color scale range of each level in the candidate color scale matching template, the color scale value of each area in the page is determined, wherein the page includes multiple display modules, and each display module includes at least one display pit.
3. The page color matching generation method according to claim 1, wherein: The step of determining a color matching hue that matches the preset color according to the hue of the preset color includes: In response to determining that the hue of the preset color is not the set hue, determining a hue range of a similar color to the preset color; According to the hue range of the similar color, the hue ranges of at least two other color combinations are determined as the color combination hue of the preset color, wherein the at least two other color combinations include at least two of the following: similar colors, adjacent colors, medium-difference colors, contrasting colors, and complementary colors.
4. The page color matching generation method according to claim 3, wherein: The method further comprises: Standardize and measure the hue range and color scale range of each color.
5. The page color matching generation method according to claim 4, wherein: The standardized measurement division of the hue range and the color scale range of each color includes: Dividing a preset number of hues according to a hue circle, and determining an angle interval of each hue in the preset number of hues; According to the number of the preset number of hues, determining the average value of the angle interval of each hue; The unit angle of each hue in the preset number of hues is determined according to the angle interval of each hue and the average value of the angle interval.
6. The page color matching generation method according to claim 5, wherein: The standardized measurement division of the hue range and the color scale range of each color also includes: For each hue of the preset number of hues, according to the lightness and saturation of the hue, the hue is divided into at least a pure color level, a light color level, a dark color level and a gray level; and For the same color scale area, it is further divided into at least one sub-area according to the depth of the color.
7. The page color matching generation method according to claim 5, wherein: Determining the hue range of similar colors of the preset color includes: Determining a unit angle of the preset color in a hue circle according to the hue of the preset color; Determining an actual rotation angle range based on a set rotation angle range of similar colors in a hue wheel and a unit angle of the preset color; The hue range of the same color as the preset color is determined according to the hue value of the preset color and the actual rotation angle range.
8. The page color matching generation method according to any one of claims 1 to 7, wherein: The method further comprises: A color balance test is performed on the generated preview color page, wherein the color balance includes at least one of the following: primary and secondary color balance, contrast balance, cold and warm color balance, and color-free balance.
9. The page color matching generation method according to claim 8, wherein: The color balance detection of the generated preview color page includes: Determining the color scale of the background color in the preview color page; Determine the background depth of the preview color page and the hue range of the matching auxiliary color according to the color scale of the background color; Based on the hue range of the auxiliary color, a primary and secondary color balance detection is performed on the preview color page.
10. The page color matching generation method according to claim 8, wherein: The color balance detection of the generated preview color page includes: Determine the relative brightness of each level according to the values of the three optical primary colors of each level; The contrast between the levels is determined according to the relative brightness of each level and the positional relationship in the preview color page, and it is determined whether the determined contrast is within a set range.
11. The page color matching generation method according to claim 8, wherein: The color balance detection of the generated preview color page also includes: Determining the hue of the preset color according to the hue of the preset color; Based on the hue of the preset color, adjusting the proportion of other different hues in the preview color page; and / or In response to the contrast between the background color of the display module and the background color of the display pit being less than or equal to the target value, a white area is left for the background of the object in the display pit, wherein the proportion of the white area in the total background of the display pit is not less than a set value.
12. A page color matching generating device, comprising: A color determination unit, configured to determine the hue and color scale to which the preset color belongs in response to receiving the attribute information of the preset color; A color scale matching determination unit is configured to determine the color scale range of each area in the page according to the color scale of the preset color, and obtain color scale matching data; A color matching hue determination unit is configured to determine a color matching hue that matches the preset color according to the hue of the preset color; The page generating unit is configured to generate a preview color page of the page based on the preset color, the color scale matching data and the color matching hue.
13. An electronic device comprising: one or more processors; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the page color generation method as described in any one of claims 1-11.
14. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the page color matching generation method as described in any one of claims 1 to 11 is implemented.
15. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for generating a page color scheme as claimed in any one of claims 1 to 11 is implemented.
