Visual element generation method and device, electronic equipment and storage medium

By obtaining and adjusting the main color values ​​of visual elements and generating harmonious colors that match them, the problem of insufficient color matching regularity in the existing technology is solved, and efficient generation of visual elements is achieved.

CN118626744APending Publication Date: 2024-09-10BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202410789643.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

When the existing technology generates visual elements, the color matching regularity is weak and cannot meet the needs of skin and theme changes in scenarios such as websites and component libraries.

Method used

By obtaining the color value of the main color of the visual element to be generated, performing color mode conversion, obtaining the first color parameter, and performing color adjustment on it to generate second color parameters of multiple target colors that are adapted to the main color. Generate visual elements.

Benefits of technology

It realizes the rapid and automatic generation of harmonious colors that match the main colors, reduces the designer's color matching workload, and improves the efficiency of generating visual elements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118626744A
    Figure CN118626744A
Patent Text Reader

Abstract

The invention provides a visual element generation method and device, electronic equipment and a storage medium, and relates to the field of artificial intelligence, in particular to the technical field of computer vision and the like. According to the specific implementation scheme, a color value of a main color of a to-be-generated visual element is obtained; performing color mode conversion on the color value of the main color to obtain a first color parameter of the main color; performing color adjustment on the first color parameter of the main color to obtain second color parameters of a plurality of target colors matched with the main color; and generating a visual element according to the first color parameter of the main color and the second color parameters of the plurality of target colors so as to present the visual element on the target object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of AI (Artificial Intelligence), specifically to technical fields such as computer vision, and in particular to methods, devices, electronic devices and storage media for generating visual elements. Background Art

[0002] When users browse or use applications (APPs), websites, components or component libraries, they can see visual elements such as skins and themes. These visual elements can convey brand information, provide users with a more user-friendly interface, enhance the overall experience of users when using the object, and improve user satisfaction and loyalty. Therefore, how to generate the above visual elements is very important. Summary of the invention

[0003] The present disclosure provides a method, device, electronic device and storage medium for generating visual elements.

[0004] According to one aspect of the present disclosure, a method for generating a visual element is provided, comprising:

[0005] Get the color value of the main color of the visual element to be generated;

[0006] Convert the color value of the primary color into a color mode to obtain a first color parameter of the primary color;

[0007] Performing color adjustment on the first color parameter of the primary color to obtain second color parameters of a plurality of target colors that match the primary color;

[0008] The visual element is generated according to the first color parameter of the main color and the second color parameters of the plurality of target colors, so as to present the visual element to the target object.

[0009] According to another aspect of the present disclosure, there is provided a device for generating a visual element, comprising:

[0010] An acquisition unit, used to acquire a color value of a main color of a visual element to be generated;

[0011] A conversion unit, used for performing color mode conversion on the color value of the primary color to obtain a first color parameter of the primary color;

[0012] an adjustment unit, configured to perform color adjustment on the first color parameter of the primary color to obtain second color parameters of a plurality of target colors that match the primary color;

[0013] A generating unit is used to generate the visual element according to the first color parameter of the main color and the second color parameters of the plurality of target colors, so as to present the visual element to the target object.

[0014] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0015] at least one processor; and

[0016] a memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for generating visual elements proposed in the above aspect of the present disclosure.

[0018] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium of computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method for generating visual elements proposed in the above aspect of the present disclosure.

[0019] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the method for generating visual elements proposed in the above aspect of the present disclosure.

[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0022] Figure 1 A flowchart of a method for generating visual elements provided in the first embodiment of the present disclosure;

[0023] Figure 2 A schematic diagram of a flow chart of a method for generating visual elements provided in the second embodiment of the present disclosure;

[0024] Figure 3 A schematic diagram of the generation principle of derivative colors belonging to cool colors provided by an embodiment of the present disclosure;

[0025] Figure 4 A schematic diagram of the generation principle of derivative colors belonging to warm colors provided by an embodiment of the present disclosure;

[0026] Figure 5 A schematic diagram of a flow chart of a method for generating visual elements provided in Embodiment 3 of the present disclosure;

[0027] Figure 6 A flowchart of a method for generating visual elements provided in Embodiment 4 of the present disclosure;

[0028] Figure 7 A flowchart of a method for generating visual elements provided in Embodiment 5 of the present disclosure;

[0029] Figure 8 This is a schematic diagram of the structure of a device for generating visual elements provided in Embodiment 6 of the present disclosure;

[0030] Fig. 9 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0031] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0032] At present, some websites provide color matching functions. When the user inputs a color, a series of adjacent colors, contrasting colors and other colors are generated based on the color input by the user. The generated colors can be applied to color matching scenarios such as paintings and illustrations. The regularity between colors is weak and does not conform to the color matching principles of commonly used components. It cannot be applied to scenarios such as changing skins and themes for websites and component libraries.

[0033] Therefore, in order to address at least one of the above problems, the present disclosure provides a method, device, electronic device and storage medium for generating visual elements.

[0034] The following describes a method, device, electronic device, and storage medium for generating visual elements according to embodiments of the present disclosure with reference to the accompanying drawings.

[0035] Figure 1 A flowchart of a method for generating visual elements provided in Embodiment 1 of the present disclosure.

[0036] The embodiment of the present disclosure takes the method for generating a visual element configured in a device for generating a visual element as an example. The device for generating a visual element can be applied to any electronic device so that the electronic device can perform the function of generating a visual element.

[0037] Among them, the electronic device can be any device with computing capabilities, such as a personal computer, a mobile terminal, a server, etc. The mobile terminal can be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, and other hardware devices with various operating systems, touch screens and / or display screens.

[0038] like Figure 1 As shown, the method for generating the visual element may include the following steps S101 to S104:

[0039] Step S101, obtaining the color value of the main color of the visual element to be generated.

[0040] In the embodiment of the present disclosure, the visual elements to be generated include but are not limited to: skin, theme and other elements.

[0041] In the embodiments of the present disclosure, there is no restriction on the method for obtaining the color value of the main color of the generated visual element. For example, the color value of the main color may be manually input, or the color value of the main color may be randomly generated, or the color value of the main color may be collected online, etc. The embodiments of the present disclosure do not impose any restriction on this.

[0042] The input method of the color value of the primary color may include but is not limited to touch input (such as sliding, clicking, etc.), keyboard input, voice input, etc.

[0043] Step S102, converting the color value of the primary color into a color mode to obtain a first color parameter of the primary color.

[0044] In the embodiment of the present disclosure, the color value of the primary color may be converted into a color mode to obtain a first color parameter of the primary color.

[0045] As an example, the color value of the primary color can be converted to HSV (Hue (hue, abbreviated as H), Saturation (saturation, abbreviated as S), Value (brightness, abbreviated as V)) color mode, that is, the color value of the primary color is converted to HSV color space to obtain the first color parameter of the primary color, where the first color parameter includes a first hue value, a first saturation and a first brightness value.

[0046] Step S103: perform color adjustment on the first color parameter of the primary color to obtain second color parameters of a plurality of target colors that match the primary color.

[0047] In the embodiments of the present disclosure, the target color includes, but is not limited to, derived colors, neutral colors, and functional colors that match the primary color.

[0048] In the embodiment of the present disclosure, the first color parameter of the primary color may be color-adjusted to obtain second color parameters of a plurality of target colors that match the primary color.

[0049] Taking the example that the second color parameter includes a first hue value, a first saturation, and a first lightness value, the second color parameter of each target color may include a second hue value, a second saturation, and a second lightness value.

[0050] Step S104 , generating a visual element according to the first color parameter of the main color and the second color parameters of the plurality of target colors, so as to present the visual element to the target object.

[0051] In the embodiments of the present disclosure, target objects include but are not limited to: web pages, components, component libraries, applications and other objects.

[0052] In the embodiment of the present disclosure, a first color parameter of a primary color and second color parameters of multiple target colors can be combined to generate a visual element to present the visual element to a target object, that is, the visual element is applied to or displayed on the target object so that a user can see the visual element when using or browsing the target object.

[0053] As an example, a visual element may be manually generated based on a first color parameter of a primary color and second color parameters of multiple target colors. For example, a visual element may be drawn based on the first color parameter of the primary color and second color parameters of multiple target colors in response to a configuration operation or a drawing operation triggered by a user.

[0054] As another example, a related algorithm may be used to automatically generate visual elements according to the first color parameter of the main color and the second color parameters of multiple target colors, which is not limited in the embodiments of the present disclosure.

[0055] As an application scenario, taking visual elements as the theme and the target object as the application as an example, one or more themes of the application can be generated based on the color value of the main color input by the user, thereby improving the efficiency of theme generation.

[0056] The method for generating visual elements of the disclosed embodiments can realize automatic and rapid generation of color parameters of multiple target colors (such as derived colors, neutral colors, functional colors, etc.) that match and are harmonious with the primary color based on the color value of the primary color. On the one hand, there is no need for manual color matching by the designer, which can reduce the designer's color matching workload and improve color matching efficiency. On the other hand, visual elements are generated based on the color parameters of multiple target colors obtained by rapid color matching and the color parameters of the primary color, which can improve the generation efficiency of visual elements.

[0057] It should be noted that in the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are all carried out with the user's consent, and are in compliance with relevant laws and regulations and do not violate public order and good morals.

[0058] In order to clearly explain how to perform color adjustment on the first color parameter of the primary color in any embodiment of the present disclosure to obtain second color parameters of multiple target colors that match the primary color, the present disclosure also proposes a method for generating a visual element.

[0059] Figure 2 A flowchart of a method for generating visual elements provided in the second embodiment of the present disclosure.

[0060] like Figure 2 As shown, in the case where the target color includes a derivative color that matches the primary color, the method for generating the visual element may include the following steps S201 to S205:

[0061] Step S201, obtaining the color value of the main color of the visual element to be generated.

[0062] Step S202, converting the color value of the primary color into a color mode to obtain a first color parameter of the primary color; wherein the first color parameter includes a first hue value, a first saturation, and a first lightness value.

[0063] For explanations of steps S201 to S202, reference may be made to the relevant descriptions in any embodiment of the present disclosure and will not be repeated here.

[0064] Step S203, based on the first hue value, determine a target adjustment rule from color adjustment rules adapted to multiple hue intervals; wherein the first hue value is within the hue interval adapted to the target adjustment rule.

[0065] Among them, multiple hue intervals (or hue value intervals) are pre-configured. For example, the hue interval may include a hue interval corresponding to cool colors and a hue interval corresponding to warm colors. For example, the value range of the hue interval corresponding to cool colors may be [60, 300], and the value range of the hue interval corresponding to warm colors may be [0, 60) and (300~360].

[0066] Each hue interval has its own adaptive color adjustment rule, and the adaptive color adjustment rule for each hue interval is pre-configured.

[0067] In the embodiment of the present disclosure, a target adjustment rule can be determined from color adjustment rules adapted to multiple hue intervals according to a first hue value in a first color parameter; wherein the first hue value is within the hue interval adapted to the target adjustment rule.

[0068] Taking the first hue value as 220 as an example, the target adjustment rule may be: a color adjustment rule adapted to the hue interval corresponding to the cool color.

[0069] Step S204: perform color adjustment on the first color parameter using a target adjustment rule to obtain second color parameters of a plurality of derived colors that match the primary color.

[0070] In the embodiment of the present disclosure, a target adjustment rule can be used to adjust the first color parameter to obtain a second color parameter of multiple derivative colors that match the primary color, wherein the second color parameter includes a second hue value, a second saturation, and a second brightness value.

[0071] In any one of the embodiments of the present disclosure, when the hue value within the hue interval adapted to the target adjustment rule belongs to a cool color, the first adjustment process can be performed multiple times on the first color parameter according to the first hue adjustment step, the first saturation adjustment step and the first brightness adjustment step adapted to the cool color to obtain the second color parameters of multiple derived colors adapted to the primary color.

[0072] Each time or each round of the first adjustment process is used to adjust and obtain a second color parameter of a derived color that matches the primary color.

[0073] Among them, the first hue adjustment step is set, the first saturation adjustment step is determined according to the ratio of the first saturation to the first set value, the first set value is greater than the first hue adjustment step, the first brightness adjustment step is determined according to the ratio of the first difference to the first set value, the first difference is the difference between the second set value and the first brightness value, and the second set value is greater than the first set value.

[0074] As an example, the first adjustment process may include: using a first hue adjustment step to lower the first hue value in the first color parameter, and using a first saturation adjustment step to lower the first saturation in the first color parameter, and using a first brightness adjustment step to increase the first brightness value in the first color parameter, so as to obtain the second color parameter of the derived color adjusted by the first adjustment process.

[0075] The non-first first adjustment process may include: using the first hue adjustment step to lower the second hue value of the second color parameter obtained by the previous first adjustment process, and using the first saturation adjustment step to lower the second saturation of the second color parameter obtained by the previous first adjustment process, and using the first brightness adjustment step to increase the second brightness value of the second color parameter obtained by the previous first adjustment process, so as to obtain the second color parameter of the derived color adjusted by this first adjustment process.

[0076] For example, the first hue adjustment step is 1, the first setting value is 5, and the second setting value is 100. Assuming that the first hue parameter is Figure 3In the example, the first hue value H is 220, the first saturation S is 85, and the first lightness value B is 95. Then, the first saturation adjustment step can be: 85 / 5=17, and the first lightness adjustment step can be: (100-95) / 5=1. At this time, the first adjustment process is performed multiple times on the first color parameter, and the second color parameters of the multiple derived colors can be respectively as follows: Figure 3 As shown in C5 (the second hue value H is 219, the second saturation S is 68, and the second lightness value B is 96), C4 (the second hue value H is 218, the second saturation S is 51, and the second lightness value B is 97), C3 (the second hue value H is 217, the second saturation S is 34, and the second lightness value B is 98), C2 (the second hue value H is 216, the second saturation S is 17, and the second lightness value B is 99) and C1 (the second hue value H is 215, the second saturation S is 10, and the second lightness value B is 100).

[0077] Among them, the minimum value of the second saturation is 10. When the second saturation value is lower than 10, the second saturation can be assigned to the minimum value 10; the maximum value of the second brightness value is 100. When the second brightness value is greater than 100, the second brightness value can be assigned to the maximum value 100.

[0078] In summary, the first adjustment process is the adjustment process of the light-colored part of the cold color. By performing multiple iterative and regular first adjustment processes on the first color parameters, the second color parameters of multiple light-colored derivative colors that are adapted to the main color are obtained. This can not only improve the effectiveness and timeliness of color adjustment, but also improve the color adjustment effect, thereby improving the generation effect of subsequent visual elements.

[0079] In any one of the embodiments of the present disclosure, when the hue value within the hue interval adapted to the target adjustment rule belongs to a cool color, the second adjustment process can be performed multiple times on the first color parameter according to the second hue adjustment step, the second saturation adjustment step, and the second brightness adjustment step adapted to the cool color to obtain the second color parameters of multiple derived colors adapted to the primary color.

[0080] Among them, the second hue adjustment step, the second saturation adjustment step and the second brightness adjustment step are all set, and the second hue adjustment step is greater than the first hue adjustment step, the second saturation adjustment step is greater than the second hue adjustment step, and the second brightness adjustment step is greater than the second saturation adjustment step.

[0081] As an example, the first second adjustment process may include: using the second hue adjustment step to increase the first hue value in the first color parameter, and using the second saturation adjustment step to increase the first saturation in the first color parameter, and using the second brightness adjustment step to lower the first brightness value in the first color parameter, so as to obtain the second color parameter of the derived color adjusted by the first second adjustment process.

[0082] The non-first second adjustment process may include: using a second hue adjustment step to increase the second hue value of the second color parameter obtained by the previous second adjustment process, and using a second saturation adjustment step to increase the second saturation of the second color parameter obtained by the previous second adjustment process, and using a second brightness adjustment step to lower the second brightness value of the second color parameter obtained by the previous second adjustment process, so as to obtain the second color parameter of the derived color adjusted by this second adjustment process.

[0083] For example, the first hue adjustment step is 1, the second hue adjustment step is 2, the second saturation adjustment step is 5, and the second brightness adjustment step is 15. Assuming that the first hue parameter is Figure 3 In the example, if the first hue value H is 220, the first saturation S is 85, and the first lightness value B is 95, the second color parameters of the derived colors obtained by performing the second adjustment process multiple times on the first color parameter can be respectively as follows: Figure 3 As shown in C7 (the second hue value H is 222, the second saturation S is 90, and the second lightness value B is 80), C8 (the second hue value H is 224, the second saturation S is 95, and the second lightness value B is 65), C9 (the second hue value H is 226, the second saturation S is 100, and the second lightness value B is 50), and C10 (the second hue value H is 228, the second saturation S is 100, and the second lightness value B is 35).

[0084] The maximum value of the second brightness value is 100. When the second brightness value is greater than 100, the second brightness value may be assigned the maximum value of 100.

[0085] In summary, the second adjustment process is the adjustment process of the dark part of the cold color. By performing multiple iterative and regular second adjustment processes on the first color parameters, the second color parameters of multiple dark derivative colors that are adapted to the main color are obtained. This can not only improve the effectiveness and timeliness of color adjustment, but also improve the color adjustment effect, thereby improving the generation effect of subsequent visual elements.

[0086] In any one of the embodiments of the present disclosure, when the hue value within the hue interval adapted to the target adjustment rule belongs to a warm color, the third adjustment process can be performed multiple times on the first color parameter according to a third hue adjustment step, a third saturation adjustment step, and a third brightness adjustment step adapted to the warm color to obtain a second color parameter of a plurality of derived colors adapted to the primary color.

[0087] Among them, the third hue adjustment step is set, the third saturation adjustment step is determined according to the ratio of the first saturation to the third set value, the third set value is greater than the third hue adjustment step, and the third brightness adjustment step is determined according to the ratio of the second difference to the third set value, the second difference is the difference between the fourth set value and the first brightness value, and the fourth set value is greater than the third set value.

[0088] It should be noted that the present disclosure does not impose any restriction on the size relationship between the third setting value and the first setting value, that is, the third setting value may be equal to the first setting value, or the third setting value may be equal to the first setting value. Similarly, the present disclosure does not impose any restriction on the size relationship between the fourth setting value and the second setting value.

[0089] As an example, the first third adjustment process may include: using a third hue adjustment step to increase the first hue value in the first color parameter, and using a third saturation adjustment step to decrease the first saturation in the first color parameter, and using a third brightness adjustment step to increase the first brightness value in the first color parameter, so as to obtain the second color parameter of the derived color adjusted by the first third adjustment process.

[0090] The non-first third adjustment process may include: using a third hue adjustment step to increase the second hue value of the second color parameter obtained by the previous third adjustment process, and using a third saturation adjustment step to lower the second saturation of the second color parameter obtained by the previous third adjustment process, and using a third brightness adjustment step to increase the second brightness value of the second color parameter obtained by the previous third adjustment process, so as to obtain the second color parameter of the derived color adjusted by this third adjustment process.

[0091] For example, the third hue adjustment step is 1, the third setting value is 5, and the fourth setting value is 100. Assuming that the first hue parameter is Figure 4 In the example, the first hue value H is 360, the first saturation S is 75, and the first lightness value B is 95. Then, the third saturation adjustment step can be: 75 / 5=15, and the third lightness adjustment step can be: (100-95) / 5=1. At this time, the third adjustment process is performed multiple times on the first color parameter, and the second color parameters of the multiple derived colors obtained can be respectively as follows: Figure 5As shown in C5 (the second hue value H is 1, the second saturation S is 60, and the second lightness value B is 96), C4 (the second hue value H is 2, the second saturation S is 45, and the second lightness value B is 97), C3 (the second hue value H is 3, the second saturation S is 30, and the second lightness value B is 98), C2 (the second hue value H is 4, the second saturation S is 15, and the second lightness value B is 99) and C1 (the second hue value H is 5, the second saturation S is 10, and the second lightness value B is 100).

[0092] Among them, the minimum value of the second saturation is 10. When the second saturation value is lower than 10, the second saturation can be assigned to the minimum value 10; the maximum value of the second brightness value is 100. When the second brightness value is greater than 100, the second brightness value can be assigned to the maximum value 100.

[0093] In summary, the third adjustment process is the adjustment process of the light-colored part of the warm color. By performing multiple iterative and regular third adjustment processes on the first color parameters, the second color parameters of multiple light-colored derivative colors that are adapted to the main color are obtained. This can not only improve the effectiveness and timeliness of color adjustment, but also improve the color adjustment effect, thereby improving the generation effect of subsequent visual elements.

[0094] In any embodiment of the present disclosure, when the hue value within the hue interval adapted to the target adjustment rule belongs to a warm color, the fourth adjustment process can be performed multiple times on the first color parameter according to the fourth hue adjustment step, the fourth saturation adjustment step and the fourth brightness adjustment step adapted to the warm color to obtain the second color parameter of multiple derived colors adapted to the primary color.

[0095] Among them, the fourth hue adjustment step, the fourth saturation adjustment step and the fourth brightness adjustment step are all set, and the fourth hue adjustment step is greater than the third hue adjustment step, the fourth saturation adjustment step is greater than the fourth hue adjustment step, and the fourth brightness adjustment step is greater than the fourth saturation adjustment step.

[0096] As an example, the first fourth adjustment process may include: using the fourth hue adjustment step to lower the first hue value in the first color parameter, and using the fourth saturation adjustment step to increase the first saturation in the first color parameter, and using the fourth brightness adjustment step to lower the first brightness value in the first color parameter, so as to obtain the second color parameter of the derived color adjusted by the first fourth adjustment process.

[0097] The non-first fourth adjustment process may include: using the fourth hue adjustment step to lower the second hue value of the second color parameter obtained by the previous fourth adjustment process, and using the fourth saturation adjustment step to increase the second saturation of the second color parameter obtained by the previous fourth adjustment process, and using the fourth brightness adjustment step to lower the second brightness value of the second color parameter obtained by the previous fourth adjustment process, so as to obtain the second color parameter of the derived color adjusted by this fourth adjustment process.

[0098] For example, the third hue adjustment step is 1, the fourth hue adjustment step is 2, the fourth saturation adjustment step is 5, and the fourth brightness adjustment step is 15. Assuming that the first hue parameter is Figure 4 In the example, if the first hue value H is 360, the first saturation S is 75, and the first lightness value B is 95, the fourth adjustment process is performed multiple times on the first color parameter, and the second color parameters of the multiple derived colors obtained can be respectively as follows: Figure 3 As shown in C7 (the second hue value H is 358, the second saturation S is 80, and the second lightness value B is 80), C8 (the second hue value H is 356, the second saturation S is 85, and the second lightness value B is 65), C9 (the second hue value H is 354, the second saturation S is 90, and the second lightness value B is 50), and C10 (the second hue value H is 352, the second saturation S is 95, and the second lightness value B is 35).

[0099] In summary, the fourth adjustment process is an adjustment process for the dark part of the warm color. By performing multiple iterative and regular fourth adjustment processes on the first color parameters, second color parameters of multiple dark derivative colors that are adapted to the main color are obtained. This can not only improve the effectiveness and timeliness of color adjustment, but also improve the color adjustment effect, thereby improving the generation effect of subsequent visual elements.

[0100] Step S205, generating a visual element according to the first color parameter of the primary color and the second color parameters of a plurality of target colors adapted to the primary color, so as to present the visual element to the target object; wherein the target color includes a derived color.

[0101] The target color includes but is not limited to the derived colors in the above steps. For example, the target color may also include neutral colors and functional colors that match the primary color.

[0102] For the explanation of step S205, reference may be made to the relevant description in the above embodiment, which will not be elaborated here.

[0103] The method for generating visual elements of the disclosed embodiment determines the required target adjustment rule from multiple color adjustment rules based on the first hue value in the first color parameter of the primary color, and performs color adjustment on the first color parameter based on the target adjustment rule to obtain second color parameters of multiple derived colors that match the primary color, thereby improving the color matching effect of the derived colors.

[0104] In order to clearly explain how to perform color adjustment on the first color parameter of the primary color in any embodiment of the present disclosure to obtain second color parameters of multiple target colors that match the primary color, the present disclosure also proposes a method for generating a visual element.

[0105] Figure 5 A flowchart of a method for generating visual elements provided in Embodiment 3 of the present disclosure.

[0106] like Figure 5 As shown, in the case where the target color includes a neutral color that matches the primary color, the method for generating the visual element may include the following steps S501 to S506:

[0107] Step S501, obtaining the color value of the main color of the visual element to be generated.

[0108] For the explanation of step S501, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.

[0109] In any embodiment of the present disclosure, the color value of the primary color may be manually input by a user, that is, the color value of the primary color is acquired in response to an input operation triggered by the user on the visual element to be generated.

[0110] In any embodiment of the present disclosure, the color value of the main color may also be automatically read from the configuration file, that is, the color value of the main color of the visual element to be generated may be read from the configuration file associated with the target object.

[0111] Therefore, it is possible to obtain the color value of the main color of the visual element based on different methods, which can improve the flexibility and applicability of the method.

[0112] Step S502, converting the color value of the primary color into a color mode to obtain a first color parameter of the primary color; wherein the first color parameter includes a first hue value, a first saturation, and a first lightness value.

[0113] For the explanation of step S502, reference may be made to the relevant description in any embodiment of the present disclosure, and no further details will be given here.

[0114] Step S503: Using the first hue value in the first color parameter as the second hue value in the second color parameters of a plurality of neutral colors that match the primary color.

[0115] In the embodiment of the present disclosure, the hue value of the neutral color can be consistent with the hue value of the primary color, that is, the first hue value in the first color parameter can be used as the second hue value in the second color parameter of multiple neutral colors adapted to the primary color.

[0116] Step S504, using a set saturation generation rule to generate a second saturation in a second color parameter of a plurality of neutral colors.

[0117] In the embodiment of the present disclosure, a saturation generation rule may be set to generate the second saturation of the second color parameters of multiple neutral colors. For example, taking the number of neutral colors as 11 as an example, the second saturations of the generated 11 neutral colors may be: [65, 45, 25, 10, 6, 4, 2, 1, 1, 1, 0].

[0118] Step S505 , using a set brightness generation rule to generate second brightness values ​​in second color parameters of a plurality of neutral colors.

[0119] In the embodiment of the present disclosure, a brightness generation rule may be set to generate second brightness values ​​in the second color parameters of multiple neutral colors. For example, taking the number of neutral colors as 11 as an example, the second brightness values ​​of the generated 11 neutral colors may be: [8, 15, 25, 40, 55, 75, 85, 92, 96, 98, 100].

[0120] For example, assuming that the first hue value is 220, the second color parameters of the 11 neutral colors are: H220 (hue value) / S65 (saturation) / B8 (brightness value), H220 / S45 / B15, H220 / S25 / B25, H220 / S10 / B40, H220 / S6 / B55, H220 / S4 / B75, H220 / S2 / B85, H220 / S1 / B92, H220 / S1 / B96, H220 / S1 / B98, and H220 / S0 / B100.

[0121] Step S506, generating a visual element according to the first color parameter of the primary color and the second color parameters of a plurality of target colors adapted to the primary color, so as to present the visual element to the target object; wherein the target color includes a neutral color.

[0122] The target color includes but is not limited to the neutral color in the above steps. For example, the target color may also include derivative colors and functional colors that match the primary color.

[0123] The explanation of step S506 can be found in the relevant description of the above embodiment, which will not be repeated here.

[0124] The method for generating visual elements in the embodiment of the present disclosure is that the hue value of the neutral color is the same as the hue value of the primary color, the saturation of the neutral color is different from the saturation of the primary color, and the brightness value of the neutral color is different from the brightness value of the primary color. This can create a rich sense of hierarchy while maintaining color uniformity, highlight the primary color, enhance the readability of the visual elements of the design, and create a specific emotion and atmosphere.

[0125] In order to clearly explain how to perform color adjustment on the first color parameter of the primary color in any embodiment of the present disclosure to obtain second color parameters of multiple target colors that match the primary color, the present disclosure also proposes a method for generating a visual element.

[0126] Figure 6 A flowchart of a method for generating visual elements provided in Embodiment 4 of the present disclosure.

[0127] like Figure 6 As shown, in the case where the target color includes a functional color that matches the primary color, the method for generating the visual element may include the following steps S601 to S605:

[0128] Step S601, obtaining the color value of the main color of the visual element to be generated.

[0129] Step S602: convert the color mode of the primary color value to obtain the first color parameter of the primary color.

[0130] For explanations of steps S601 to S602, reference may be made to the relevant descriptions in any embodiment of the present disclosure and will not be repeated here.

[0131] Step S603: for any functional color among the multiple functional colors matched with the main color, query a plurality of empirical coefficient sets associated with any functional color.

[0132] The functional colors include, but are not limited to, error color, warning color, success color, etc.

[0133] Among them, a plurality of empirical coefficient sets associated with each functional color are preset.

[0134] In the embodiment of the present disclosure, for any functional color among multiple functional colors adapted to the primary color, multiple empirical coefficient sets associated with the functional color may be queried.

[0135] As an example, multiple sets of empirical coefficients associated with the error color include:

[0136] The hue coefficient set used to calculate the hue value: errorH = {a:375.06, b:0.6, c:134.93, d:353.95};

[0137] The set of saturation coefficients used to calculate saturation: errorS = {a:95.12,b:2.34,c:72.07,d:69.59};

[0138] The set of brightness coefficients used to calculate the brightness value: errorV = {a:100.21,b:-16.63,c:89.6,d:83}.

[0139] As another example, a plurality of empirical coefficient sets associated with a warning color include:

[0140] The hue coefficient set used to calculate the hue value: warnH = {a: 217.7, b: -0.02, c: 514460.59, d: -118.56};

[0141] The set of saturation coefficients used to calculate saturation: warnS = {a:95.1,b:0.53,c:74.9,d:66.82};

[0142] The set of brightness coefficients used to calculate brightness values: warnV = {a:270.03,b:-0.1,c:1.18,d:-103.6}.

[0143] As yet another example, a plurality of empirical coefficient sets associated with success colors include:

[0144] The hue coefficient set used to calculate the hue value: successH = {a: 130.48, b: -0.24, c: 0.00066};

[0145] The saturation coefficient set used to calculate saturation: successS = {a:100.5,b:-6.41,c:80.99,d:65.5};

[0146] The set of brightness coefficients used to calculate the brightness value: successV = {a:81.5,b:-6.31,c:91.2,d:64.5}.

[0147] Step S604: Perform color adjustment on the first color parameter based on a plurality of empirical coefficient sets to obtain a second color parameter of any functional color.

[0148] In the embodiment of the present disclosure, the first color parameter may be color-adjusted based on a plurality of empirical coefficient sets to obtain the second color parameter of the functional color.

[0149] Step S605, generating a visual element according to the first color parameter of the primary color and the second color parameters of a plurality of target colors adapted to the primary color, so as to present the visual element to the target object; wherein the target color includes a functional color.

[0150] The target color includes but is not limited to the functional color in the above steps. For example, the target color may also include a neutral color and a derivative color that matches the primary color.

[0151] The explanation of step S605 can refer to the relevant description in the above embodiment, which will not be repeated here.

[0152] The method for generating visual elements in the disclosed embodiment adjusts the first color parameter based on a set of empirical coefficients associated with each functional color to obtain the second color parameter of the functional color, which can improve the color matching effect of the functional color.

[0153] In order to clearly explain how to perform color adjustment on the first color parameter based on multiple sets of empirical coefficients in any embodiment of the present disclosure to obtain the second color parameter of any functional color, the present disclosure also proposes a method for generating a visual element.

[0154] Figure 7 This is a flowchart of the method for generating visual elements provided in Embodiment 5 of the present disclosure.

[0155] like Figure 7 As shown, the method for generating the visual element may include the following steps S701 to S707:

[0156] Step S701, obtaining the color value of the main color of the visual element to be generated.

[0157] Step S702, converting the color value of the primary color into a color mode to obtain a first color parameter of the primary color; wherein the first color parameter includes a first hue value, a first saturation, and a first lightness value.

[0158] Step S703, for any functional color among the multiple functional colors adapted to the primary color, query multiple empirical coefficient sets associated with any functional color; wherein the multiple empirical coefficient sets include a hue coefficient set, a saturation coefficient set and a brightness coefficient set.

[0159] For explanations of steps S701 to S703, reference may be made to the relevant descriptions in any embodiment of the present disclosure, and will not be repeated here.

[0160] Step S704: Use multiple hue coefficients in the hue coefficient set to adjust the first hue value to obtain a second hue value in a second color parameter of any functional color.

[0161] In the embodiment of the present disclosure, a plurality of hue coefficients in the hue coefficient set may be used to adjust the first hue value to obtain the second hue value in the second color parameter of any of the above functional colors.

[0162] As an example, for the error color, the hue coefficient set associated with it is: errorH = {a: 375.06, b: 0.6, c: 134.93, d: 353.95}. The four hue coefficients (a, b, c, d) and the first hue coefficient in errorH = {a: 375.06, b: 0.6, c: 134.93, d: 353.95} can be substituted into the model y = (ad) / (1 + (x / c) ^ b) + d, or, substituted into the model y = a + b*x + c*x ^ 2, to obtain the second hue value, that is, the first hue value is used as the x in the model, and the calculated y is the second hue value in the second color parameter of the error color.

[0163] Similarly, for the warning color, the hue coefficient set associated with it is: warnH={a:217.7,b:-0.02,c:514460.59,d:-118.56}. The four hue coefficients (a, b, c, d) and the first hue coefficient in warnH={a:217.7,b:-0.02,c:514460.59,d:-118.56} can be substituted into the model y=(ad) / (1+(x / c)^b)+d, or, substituted into the model y=a+b*x+c*x^2, to obtain the second hue value, that is, the first hue value is used as x in the model, and the calculated y is the second hue value in the second color parameter of the warning color.

[0164] Similarly, for the success color, the hue coefficient set associated with it is: successH={a:130.48,b:-0.24,c:0.00066}. The three hue coefficients (a, b, c) and the first hue coefficient in successH={a:130.48,b:-0.24,c:0.00066} can be substituted into the model y=a+b*x+c*x^2 to obtain the second hue value. That is, the first hue value is used as the x in the model, and the calculated y is the second hue value in the second color parameter of the success color.

[0165] Step S705 , using a plurality of saturation coefficients in the saturation coefficient set to adjust the first saturation to obtain a second saturation in a second color parameter of any functional color.

[0166] In the embodiment of the present disclosure, a plurality of saturation coefficients in the saturation coefficient set may be used to adjust the first saturation to obtain the second saturation in the second color parameter of any of the above functional colors.

[0167] As an example, for the error color, the saturation coefficient set associated with it is: errorS = {a:95.12, b:2.34, c:72.07, d:69.59}. The four hue coefficients (a, b, c, d) and the first hue coefficient in errorS = {a:95.12, b:2.34, c:72.07, d:69.59} can be substituted into the model y = (ad) / (1+(x / c)^b)+d, or, substituted into the model y = a+b*x+c*x^2, to obtain the second saturation, that is, the first saturation is used as the x in the model, and the calculated y is the second saturation in the second color parameter of the error color.

[0168] Similarly, the second saturation in the second color parameter of the warning color and the second saturation in the second color parameter of the success color can be calculated.

[0169] Step S706: Use multiple brightness coefficients in the brightness coefficient set to adjust the first brightness value to obtain a second brightness value in a second color parameter of any functional color.

[0170] In the embodiment of the present disclosure, a plurality of brightness coefficients in the brightness coefficient set may be used to adjust the first brightness value to obtain the second brightness value in the second color parameter of any of the above functional colors.

[0171] As an example, for the error color, the set of brightness coefficients associated with it is: errorV = {a:100.21, b:-16.63, c:89.6, d:83}. The four hue coefficients (a, b, c, d) and the first brightness value in errorV = {a:100.21, b:-16.63, c:89.6, d:83} can be substituted into the model y = (ad) / (1+(x / c)^b)+d, or, substituted into the model y = a+b*x+c*x^2, to obtain the second brightness value, that is, the first brightness value is used as the x in the model, and the calculated y is the second brightness value in the second color parameter of the error color.

[0172] Similarly, the second brightness value in the second color parameter of the warning color and the second brightness value in the second color parameter of the success color can be calculated.

[0173] Step S707, generating a visual element according to the first color parameter of the primary color and the second color parameters of a plurality of target colors adapted to the primary color, so as to present the visual element to the target object; wherein the target color includes a functional color.

[0174] The target color includes but is not limited to the functional color in the above steps. For example, the target color may also include a neutral color and a derivative color that matches the primary color.

[0175] The explanation of step S707 can be found in the relevant description of the above embodiment, which will not be repeated here.

[0176] The method for generating visual elements in the disclosed embodiment makes targeted adjustments to the color parameters of the primary color based on a set of empirical coefficients adapted to each functional color to obtain the color parameters of the functional color, which can further improve the color matching effect of the functional color, thereby improving the generation effect of the visual elements and improving the user experience.

[0177] In any one of the embodiments of the present disclosure, the present disclosure provides a scheme for generating a series of colors through a primary color, that is, a user inputs the color value of the primary color, and the program automatically generates a scheme of color values ​​of derivative colors, neutral colors, functional colors, etc. that match and are harmonious with the primary color through certain algorithm rules. This scheme allows the designer to obtain a corresponding series of colors more quickly through the primary color, greatly reducing the designer's workload in color matching and improving the design efficiency of visual elements.

[0178] As an example, after the user inputs a hexadecimal color value of a primary color, it will be converted into the HSV color representation, and then the color parameters of the primary color (including hue value, saturation, and lightness value) will be calculated according to certain rules to obtain the corresponding derived color, neutral color, and functional color. The generation rules are as follows:

[0179] 1. Generation of derivative colors.

[0180] A series of derived colors are generated according to certain rules based on the color parameters of the main color. The specific rules are as follows:

[0181] 1. Cool colors (hue values ​​between 60 and 300):

[0182] Light color part: Take the first hue adjustment step as 1, the first setting value as 5, and the second setting value as 100 as an example, the hue value decreases by 1; the saturation decreases (the saturation value of the original main color divided by 5), and the minimum saturation value is greater than or equal to 10; the lightness value increases (100 minus the lightness value of the original main color divided by 5);

[0183] Dark part: Take the second hue adjustment step as 2, the second saturation adjustment step as 5, and the second lightness adjustment step as 15 as an example. The hue value increases by 2, the saturation increases by 5, and the lightness value decreases by 15.

[0184] 2. Warm colors (hue values ​​between 0-60 and 300-360):

[0185] Light color part: Take the third hue adjustment step as 1, the third setting value as 5, and the fourth setting value as 100 as an example, the hue value increases by 1; the saturation decreases (the saturation value of the original main color divided by 5), and the minimum saturation value is greater than or equal to 10; the lightness value increases (100 minus the lightness value of the original main color divided by 5);

[0186] Dark part: Taking the fourth hue adjustment step as 2, the fourth saturation adjustment step as 5, and the fourth lightness adjustment step as 15 as an example, the hue value decreases by 2; the saturation increases by 5; and the lightness value decreases by 15.

[0187] 2. Generation of neutral colors.

[0188] The hue value of the neutral color is consistent with the hue value of the primary color. The saturation and lightness values ​​of the neutral color are generated according to the following rules:

[0189] Saturation: [65,45,25,10,6,4,2,1,1,1,0];

[0190] Brightness: [8,15,25,40,55,75,85,92,96,98,100].

[0191] 3. Generation of functional colors.

[0192] The standard hue for error color is red, the standard hue for warning color is yellow and orange, and the standard hue for success color is green.

[0193] Taking visual elements as an example, according to a group of theme colors provided by the designer, a set of empirical coefficients can be obtained by curve fitting of their hue value, saturation and lightness values ​​as shown in step S603, so as to adjust the color parameters of the main color input by the user based on the set of empirical coefficients to obtain the color parameters of the functional color that meets the visual specifications.

[0194] In summary, this solution allows designers to obtain a corresponding series of colors more quickly based on the color value of the main color, greatly reducing the designer's color matching workload and improving the design efficiency of visual elements.

[0195] With the above Figures 1 to 7Corresponding to the method for generating visual elements provided in the embodiment, the present disclosure further provides a device for generating visual elements. Figures 1 to 7 The method for generating visual elements provided in the embodiment corresponds to the method, so the implementation of the method for generating visual elements is also applicable to the device for generating visual elements provided in the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.

[0196] Figure 8 This is a structural diagram of a device for generating visual elements provided in Embodiment 6 of the present disclosure.

[0197] like Figure 8 As shown, the visual element generation device 800 may include: an acquisition unit 810 , a conversion unit 820 , an adjustment unit 830 and a generation unit 840 .

[0198] The acquisition unit 810 is used to acquire the color value of the main color of the visual element to be generated;

[0199] A conversion unit 820, configured to convert the color value of the primary color into a color mode to obtain a first color parameter of the primary color;

[0200] An adjustment unit 830, configured to perform color adjustment on a first color parameter of a primary color to obtain second color parameters of a plurality of target colors that match the primary color;

[0201] The generating unit 840 is used to generate a visual element according to the first color parameter of the main color and the second color parameters of the plurality of target colors, so as to present the visual element to the target object.

[0202] In a possible implementation of the embodiments of the present disclosure, the target color includes a derivative color that matches the primary color; the adjustment unit 830 is used to: determine a target adjustment rule from color adjustment rules that match multiple hue intervals based on a first hue value in a first color parameter; wherein the first hue value is within the hue interval that is matched by the target adjustment rule; and use the target adjustment rule to perform color adjustment on the first color parameter to obtain second color parameters of multiple derivative colors that match the primary color.

[0203] In a possible implementation of the embodiment of the present disclosure, the hue value in the hue interval adapted to the target adjustment rule belongs to a cold color, the first color parameter further includes a first saturation and a first lightness value, and the second color parameter includes a second hue value, a second saturation and a second lightness value;

[0204] The adjustment unit 830 is used to: perform multiple first adjustment processes on the first color parameter according to the first hue adjustment step, the first saturation adjustment step and the first brightness adjustment step adapted to the cold color, to obtain the second color parameter of multiple derived colors adapted to the primary color; wherein the first hue adjustment step is set, the first saturation adjustment step is determined according to the ratio of the first saturation to the first set value, the first set value is greater than the first hue adjustment step, the first brightness adjustment step is determined according to the ratio of the first difference to the first set value, the first difference is the difference between the second set value and the first brightness value, and the second set value is greater than the first set value.

[0205] In a possible implementation of the embodiment of the present disclosure, the first adjustment process includes: using a first hue adjustment step to lower a first hue value in a first color parameter, using a first saturation adjustment step to lower a first saturation in the first color parameter, and using a first brightness adjustment step to increase a first brightness value in the first color parameter, so as to obtain a second color parameter of a derived color obtained by adjustment in the first adjustment process;

[0206] The non-first first adjustment process includes: using the first hue adjustment step to lower the second hue value of the second color parameter obtained by the previous first adjustment process, and using the first saturation adjustment step to lower the second saturation of the second color parameter obtained by the previous first adjustment process, and using the first brightness adjustment step to increase the second brightness value of the second color parameter obtained by the previous first adjustment process, so as to obtain the second color parameter of the derived color adjusted by this first adjustment process.

[0207] In a possible implementation of the embodiment of the present disclosure, the adjustment unit 830 is further used to: perform multiple second adjustment processes on the first color parameters according to the second hue adjustment step, the second saturation adjustment step, and the second brightness adjustment step that are adapted to the cold color, to obtain second color parameters of multiple derivative colors that are adapted to the primary color; wherein the second hue adjustment step, the second saturation adjustment step, and the second brightness adjustment step are all set, and the second hue adjustment step is greater than the first hue adjustment step, the second saturation adjustment step is greater than the second hue adjustment step, and the second brightness adjustment step is greater than the second saturation adjustment step.

[0208] In a possible implementation of the embodiment of the present disclosure, the first second adjustment process includes: using a second hue adjustment step to increase a first hue value in the first color parameter, using a second saturation adjustment step to increase a first saturation in the first color parameter, and using a second brightness adjustment step to decrease a first brightness value in the first color parameter, so as to obtain a second color parameter of the derived color obtained by the first second adjustment process;

[0209] The non-first second adjustment process includes: using a second hue adjustment step to increase the second hue value of the second color parameter obtained by the previous second adjustment process, and using a second saturation adjustment step to increase the second saturation of the second color parameter obtained by the previous second adjustment process, and using a second brightness adjustment step to lower the second brightness value of the second color parameter obtained by the previous second adjustment process, so as to obtain the second color parameter of the derived color adjusted by this second adjustment process.

[0210] In a possible implementation of the embodiment of the present disclosure, the hue value within the hue interval adapted to the target adjustment rule belongs to warm colors, the first color parameter also includes a first saturation and a first lightness value, and the second color parameter includes a second hue value, a second saturation and a second lightness value; the adjustment unit 830 is used to: perform multiple third adjustment processes on the first color parameter according to a third hue adjustment step, a third saturation adjustment step and a third lightness adjustment step adapted to warm colors, to obtain second color parameters of multiple derived colors adapted to the primary color; wherein the third hue adjustment step is set, the third saturation adjustment step is determined based on the ratio of the first saturation to the third set value, the third set value is greater than the third hue adjustment step, the third lightness adjustment step is determined based on the ratio of the second difference to the third set value, the second difference is the difference between the fourth set value and the first lightness value, and the fourth set value is greater than the third set value.

[0211] In a possible implementation of the embodiment of the present disclosure, the first third adjustment process includes: using a third hue adjustment step to increase the first hue value in the first color parameter, using a third saturation adjustment step to decrease the first saturation in the first color parameter, and using a third brightness adjustment step to increase the first brightness value in the first color parameter, so as to obtain a second color parameter of the derived color adjusted by the first third adjustment process;

[0212] The non-first third adjustment process includes: using a third hue adjustment step to increase the second hue value of the second color parameter obtained by the previous third adjustment process, and using a third saturation adjustment step to lower the second saturation of the second color parameter obtained by the previous third adjustment process, and using a third brightness adjustment step to increase the second brightness value of the second color parameter obtained by the previous third adjustment process, so as to obtain the second color parameter of the derived color adjusted by this third adjustment process.

[0213] In a possible implementation of the embodiment of the present disclosure, the adjustment unit 830 is further used to: perform multiple fourth adjustment processes on the first color parameters according to a fourth hue adjustment step, a fourth saturation adjustment step, and a fourth brightness adjustment step that are adapted to warm colors, to obtain second color parameters of multiple derivative colors that are adapted to the primary color; wherein the fourth hue adjustment step, the fourth saturation adjustment step, and the fourth brightness adjustment step are all set, and the fourth hue adjustment step is greater than the third hue adjustment step, the fourth saturation adjustment step is greater than the fourth hue adjustment step, and the fourth brightness adjustment step is greater than the fourth saturation adjustment step.

[0214] In a possible implementation of the embodiment of the present disclosure, the first fourth adjustment process includes: using a fourth hue adjustment step to lower a first hue value in the first color parameter, using a fourth saturation adjustment step to increase a first saturation in the first color parameter, and using a fourth brightness adjustment step to lower a first brightness value in the first color parameter, so as to obtain a second color parameter of the derived color obtained by the first fourth adjustment process;

[0215] The non-first fourth adjustment process includes: using the fourth hue adjustment step to lower the second hue value of the second color parameter obtained by the previous fourth adjustment process, and using the fourth saturation adjustment step to increase the second saturation of the second color parameter obtained by the previous fourth adjustment process, and using the fourth brightness adjustment step to lower the second brightness value of the second color parameter obtained by the previous fourth adjustment process, so as to obtain the second color parameter of the derived color adjusted by this fourth adjustment process.

[0216] In a possible implementation of the embodiment of the present disclosure, the target color includes a neutral color that matches the primary color, the first color parameter includes a first hue value, a first saturation, and a first lightness value, and the second color parameter includes a second hue value, a second saturation, and a second lightness value; the adjustment unit 830 is used to: use the first hue value in the first color parameter as the second hue value in the second color parameters of multiple neutral colors; use a set saturation generation rule to generate a second saturation in the second color parameters of multiple neutral colors; use a set brightness generation rule to generate a second brightness value in the second color parameters of multiple neutral colors.

[0217] In a possible implementation of the embodiments of the present disclosure, the target color includes a functional color that matches the primary color; the adjustment unit 830 is used to: for any functional color among the multiple functional colors that match the primary color, query multiple sets of empirical coefficients associated with any functional color; perform color adjustment on the first color parameter based on the multiple sets of empirical coefficients to obtain a second color parameter of any functional color.

[0218] In a possible implementation of the embodiments of the present disclosure, multiple empirical coefficient sets include a hue coefficient set, a saturation coefficient set and a brightness coefficient set, the first color parameter includes a first hue value, a first saturation and a first brightness value, and the second color parameter includes a second hue value, a second saturation and a second brightness value; the adjustment unit 830 is used to: use multiple hue coefficients in the hue coefficient set to adjust the first hue value to obtain the second hue value in the second color parameter of any functional color; use multiple saturation coefficients in the saturation coefficient set to adjust the first saturation to obtain the second saturation in the second color parameter of any functional color; use multiple brightness coefficients in the brightness coefficient set to adjust the first brightness value to obtain the second brightness value in the second color parameter of any functional color.

[0219] In a possible implementation of the embodiment of the present disclosure, the acquisition unit 810 is used to: acquire the color value of the primary color in response to an input operation triggered by the visual element to be generated; or read the color value of the primary color of the visual element to be generated from a configuration file associated with the target object.

[0220] The device for generating visual elements of the disclosed embodiment can realize automatic and rapid generation of color parameters of multiple target colors (such as derived colors, neutral colors, functional colors, etc.) that match and are harmonious with the primary color based on the color value of the primary color. On the one hand, there is no need for manual color matching by the designer, which can reduce the designer's color matching workload and improve the color matching efficiency. On the other hand, visual elements are generated based on the color parameters of multiple target colors obtained by rapid color matching and the color parameters of the primary color, which can improve the generation efficiency of visual elements.

[0221] In order to implement the above embodiments, the present disclosure also provides an electronic device, which may include at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for generating visual elements proposed in any of the above embodiments of the present disclosure.

[0222] In order to implement the above embodiments, the present disclosure further provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable a computer to execute the method for generating visual elements proposed in any of the above embodiments of the present disclosure.

[0223] In order to implement the above embodiments, the present disclosure further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the method for generating a visual element proposed in any of the above embodiments of the present disclosure.

[0224] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0225] Fig. 9 A schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure is shown.

[0226] Among them, the electronic device may include the server and the client in the above-mentioned embodiment. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0227] like Fig. 9 As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 902 or a computer program loaded from a storage unit 907 to a RAM (Random Access Memory) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An I / O (Input / Output) interface 905 is also connected to the bus 904.

[0228] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0229] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, a DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 901 performs the various methods and processes described above, such as the above-described method for generating visual elements. For example, in some embodiments, the above-described method for generating visual elements may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the method for generating visual elements described above may be executed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute the above-mentioned method for generating visual elements in any other appropriate manner (for example, by means of firmware).

[0230] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0231] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0232] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, portable computer disks, hard disks, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory) or flash memory, optical fiber, CD-ROM (Compact Disc Read-Only Memory), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0233] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0234] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

[0235] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services (Virtual Private Server). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0236] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0237] Cloud computing refers to a technology system that uses network access to elastically scalable shared physical or virtual resource pools, including servers, operating systems, networks, software, applications, and storage devices, and can deploy and manage resources in an on-demand, self-service manner. Cloud computing technology can provide efficient and powerful data processing capabilities for the application of technologies such as artificial intelligence and blockchain, as well as model training.

[0238] According to the technical solution of the embodiments of the present disclosure, it is possible to automatically and quickly generate color parameters of multiple target colors (such as derived colors, neutral colors, functional colors, etc.) that match and are harmonious with the primary color based on the color value of the primary color. On the one hand, there is no need for designers to manually match colors, which can reduce the workload of designers in color matching and improve color matching efficiency. On the other hand, visual elements can be generated based on the color parameters of multiple target colors obtained by fast color matching and the color parameters of the primary color, which can improve the generation efficiency of visual elements.

[0239] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0240] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A method for generating visual elements, include: Get the color value of the main color of the visual element to be generated; Convert the color value of the primary color into a color mode to obtain a first color parameter of the primary color; Performing color adjustment on the first color parameter of the primary color to obtain second color parameters of a plurality of target colors that match the primary color; The visual element is generated according to the first color parameter of the main color and the second color parameters of the plurality of target colors, so as to present the visual element to the target object.

2. The method according to claim 1, in, The target color includes a derivative color that matches the primary color; The color adjustment of the first color parameter of the primary color to obtain second color parameters of a plurality of target colors matching the primary color includes: Based on the first hue value in the first color parameter, determining a target adjustment rule from color adjustment rules adapted to a plurality of hue intervals; wherein the first hue value is within the hue interval adapted to the target adjustment rule; The target adjustment rule is adopted to perform color adjustment on the first color parameter to obtain second color parameters of a plurality of derivative colors that match the primary color.

3. The method according to claim 2, in, The hue value within the hue interval adapted to the target adjustment rule belongs to a cold color, the first color parameter further includes a first saturation and a first lightness value, and the second color parameter includes a second hue value, a second saturation and a second lightness value; The step of using the target adjustment rule to adjust the first color parameter to obtain second color parameters of multiple derivative colors that match the primary color includes: According to a first hue adjustment step, a first saturation adjustment step, and a first lightness adjustment step that are adapted to the cool color, a first adjustment process is performed multiple times on the first color parameter to obtain second color parameters of multiple derived colors that are adapted to the primary color; Among them, the first hue adjustment step is set, the first saturation adjustment step is determined according to the ratio of the first saturation to a first set value, the first set value is greater than the first hue adjustment step, and the first brightness adjustment step is determined according to the ratio of a first difference to the first set value, the first difference is the difference between a second set value and the first brightness value, and the second set value is greater than the first set value.

4. The method according to claim 3, in, The first adjustment process for the first time includes: using the first hue adjustment step to lower the first hue value in the first color parameter, using the first saturation adjustment step to lower the first saturation in the first color parameter, and using the first brightness adjustment step to increase the first brightness value in the first color parameter, so as to obtain a second color parameter of the derived color obtained by the first adjustment process for the first time; The non-first first adjustment process includes: using the first hue adjustment step to lower the second hue value of the second color parameter obtained by the previous first adjustment process, and using the first saturation adjustment step to lower the second saturation of the second color parameter obtained by the previous first adjustment process, and using the first brightness adjustment step to increase the second brightness value of the second color parameter obtained by the previous first adjustment process, so as to obtain the second color parameter of the derived color adjusted by the first adjustment process this time.

5. The method according to claim 3, in, The step of adjusting the first color parameter by using the target adjustment rule to obtain second color parameters of multiple derivative colors matching the primary color also includes: According to a second hue adjustment step, a second saturation adjustment step, and a second lightness adjustment step that are adapted to the cool color, a second adjustment process is performed multiple times on the first color parameter to obtain second color parameters of multiple derived colors that are adapted to the primary color; Among them, the second hue adjustment step, the second saturation adjustment step and the second brightness adjustment step are all set, and the second hue adjustment step is larger than the first hue adjustment step, the second saturation adjustment step is larger than the second hue adjustment step, and the second brightness adjustment step is larger than the second saturation adjustment step.

6. The method according to claim 5, in, The first second adjustment process includes: increasing the first hue value in the first color parameter by using the second hue adjustment step, increasing the first saturation in the first color parameter by using the second saturation adjustment step, and decreasing the first lightness value in the first color parameter by using the second lightness adjustment step, so as to obtain the second color parameter of the derived color obtained by the first second adjustment process; The non-first second adjustment process includes: using the second hue adjustment step to increase the second hue value of the second color parameter obtained by the previous second adjustment process, and using the second saturation adjustment step to increase the second saturation of the second color parameter obtained by the previous second adjustment process, and using the second brightness adjustment step to lower the second brightness value of the second color parameter obtained by the previous second adjustment process, so as to obtain the second color parameter of the derived color adjusted by the second adjustment process this time.

7. The method according to claim 2, in, The hue value within the hue interval adapted to the target adjustment rule belongs to warm colors, the first color parameter further includes a first saturation and a first lightness value, and the second color parameter includes a second hue value, a second saturation and a second lightness value; The step of using the target adjustment rule to adjust the first color parameter to obtain second color parameters of multiple derivative colors that match the primary color includes: According to a third hue adjustment step, a third saturation adjustment step, and a third lightness adjustment step that are adapted to the warm color, a third adjustment process is performed multiple times on the first color parameter to obtain second color parameters of multiple derived colors that are adapted to the primary color; Among them, the third hue adjustment step is set, the third saturation adjustment step is determined according to the ratio of the first saturation to the third set value, the third set value is greater than the third hue adjustment step, and the third brightness adjustment step is determined according to the ratio of the second difference to the third set value, the second difference is the difference between the fourth set value and the first brightness value, and the fourth set value is greater than the third set value.

8. The method according to claim 7, in, The first third adjustment process includes: increasing the first hue value in the first color parameter by using the third hue adjustment step, decreasing the first saturation in the first color parameter by using the third saturation adjustment step, and increasing the first brightness value in the first color parameter by using the third brightness adjustment step, so as to obtain the second color parameter of the derived color adjusted by the first third adjustment process; The non-first third adjustment process includes: using the third hue adjustment step to increase the second hue value of the second color parameter obtained by the previous third adjustment process, and using the third saturation adjustment step to lower the second saturation of the second color parameter obtained by the previous third adjustment process, and using the third brightness adjustment step to increase the second brightness value of the second color parameter obtained by the previous third adjustment process, so as to obtain the second color parameter of the derived color adjusted by the third adjustment process this time.

9. The method according to claim 7, in, The step of adjusting the first color parameter by using the target color adjustment rule to obtain second color parameters of multiple derivative colors matching the primary color also includes: performing a fourth adjustment process multiple times on the first color parameter according to a fourth hue adjustment step, a fourth saturation adjustment step, and a fourth lightness adjustment step that are adapted to the warm color, to obtain second color parameters of a plurality of derived colors that are adapted to the primary color; Among them, the fourth hue adjustment step, the fourth saturation adjustment step and the fourth brightness adjustment step are all set, and the fourth hue adjustment step is greater than the third hue adjustment step, the fourth saturation adjustment step is greater than the fourth hue adjustment step, and the fourth brightness adjustment step is greater than the fourth saturation adjustment step.

10. The method according to claim 9, in, The first fourth adjustment process includes: using the fourth hue adjustment step to lower the first hue value in the first color parameter, using the fourth saturation adjustment step to increase the first saturation in the first color parameter, and using the fourth brightness adjustment step to lower the first brightness value in the first color parameter, so as to obtain the second color parameter of the derived color adjusted by the first fourth adjustment process; The non-first fourth adjustment process includes: using the fourth hue adjustment step to lower the second hue value of the second color parameter obtained by the previous fourth adjustment process, and using the fourth saturation adjustment step to increase the second saturation of the second color parameter obtained by the previous fourth adjustment process, and using the fourth brightness adjustment step to lower the second brightness value of the second color parameter obtained by the previous fourth adjustment process, so as to obtain the second color parameter of the derived color adjusted by the fourth adjustment process this time.

11. The method according to claim 1, in, The target color includes a neutral color that matches the primary color, the first color parameter includes a first hue value, a first saturation, and a first lightness value, and the second color parameter includes a second hue value, a second saturation, and a second lightness value; The color adjustment of the first color parameter of the primary color to obtain second color parameters of a plurality of target colors matching the primary color includes: Using the first hue value in the first color parameter as the second hue value in the second color parameters of the plurality of neutral colors; Using a set saturation generation rule to generate a second saturation in the second color parameters of the plurality of neutral colors; The second brightness value in the second color parameters of the plurality of neutral colors is generated by adopting a set brightness generation rule.

12. The method according to claim 1, in, The target color includes a functional color that matches the primary color; The color adjustment of the first color parameter of the primary color to obtain second color parameters of a plurality of target colors matching the primary color includes: For any functional color among a plurality of functional colors adapted to the primary color, query a plurality of empirical coefficient sets associated with the any functional color; The first color parameter is color-adjusted based on the multiple empirical coefficient sets to obtain a second color parameter of any functional color.

13. The method according to claim 12, in, The multiple empirical coefficient sets include a hue coefficient set, a saturation coefficient set and a brightness coefficient set, the first color parameter includes a first hue value, a first saturation and a first brightness value, and the second color parameter includes a second hue value, a second saturation and a second brightness value; The step of performing color adjustment on the first color parameter based on the plurality of empirical coefficient sets to obtain the second color parameter of any functional color includes: The first hue value is adjusted by using a plurality of hue coefficients in the hue coefficient set to obtain a second hue value in a second color parameter of any functional color; Using a plurality of saturation coefficients in the saturation coefficient set to adjust the first saturation to obtain a second saturation in a second color parameter of any functional color; The first brightness value is adjusted using a plurality of brightness coefficients in the brightness coefficient set to obtain a second brightness value in a second color parameter of any functional color.

14. The method according to any one of claims 1 to 13, in, The step of obtaining the color value of the main color of the visual element to be generated includes: In response to an input operation triggered by the visual element to be generated, obtaining a color value of the primary color; or, The color value of the main color of the visual element to be generated is read from a configuration file associated with the target object.

15. A device for generating visual elements, include: An acquisition unit, used to acquire a color value of a main color of a visual element to be generated; A conversion unit, used for performing color mode conversion on the color value of the primary color to obtain a first color parameter of the primary color; an adjustment unit, configured to perform color adjustment on the first color parameter of the primary color to obtain second color parameters of a plurality of target colors that match the primary color; A generating unit is used to generate the visual element according to the first color parameter of the main color and the second color parameters of the plurality of target colors, so as to present the visual element to the target object.

16. The device according to claim 15, in, The target color includes a derivative color that matches the primary color; The adjustment unit is used for: Based on the first hue value in the first color parameter, determining a target adjustment rule from color adjustment rules adapted to a plurality of hue intervals; wherein the first hue value is within the hue interval adapted to the target adjustment rule; The target adjustment rule is adopted to perform color adjustment on the first color parameter to obtain second color parameters of a plurality of derivative colors that match the primary color.

17. The device according to claim 16, in, The hue value within the hue interval adapted to the target adjustment rule belongs to a cold color, the first color parameter further includes a first saturation and a first lightness value, and the second color parameter includes a second hue value, a second saturation and a second lightness value; The adjustment unit is used for: According to a first hue adjustment step, a first saturation adjustment step, and a first lightness adjustment step that are adapted to the cool color, a first adjustment process is performed multiple times on the first color parameter to obtain second color parameters of multiple derived colors that are adapted to the primary color; Among them, the first hue adjustment step is set, the first saturation adjustment step is determined according to the ratio of the first saturation to a first set value, the first set value is greater than the first hue adjustment step, and the first brightness adjustment step is determined according to the ratio of a first difference to the first set value, the first difference is the difference between a second set value and the first brightness value, and the second set value is greater than the first set value.

18. The device according to claim 17, in, The first adjustment process for the first time includes: using the first hue adjustment step to lower the first hue value in the first color parameter, using the first saturation adjustment step to lower the first saturation in the first color parameter, and using the first brightness adjustment step to increase the first brightness value in the first color parameter, so as to obtain a second color parameter of the derived color obtained by the first adjustment process for the first time; The non-first first adjustment process includes: using the first hue adjustment step to lower the second hue value of the second color parameter obtained by the previous first adjustment process, and using the first saturation adjustment step to lower the second saturation of the second color parameter obtained by the previous first adjustment process, and using the first brightness adjustment step to increase the second brightness value of the second color parameter obtained by the previous first adjustment process, so as to obtain the second color parameter of the derived color adjusted by the first adjustment process this time.

19. The device according to claim 17, in, The adjustment unit is further used for: According to a second hue adjustment step, a second saturation adjustment step, and a second lightness adjustment step that are adapted to the cool color, a second adjustment process is performed multiple times on the first color parameter to obtain second color parameters of multiple derived colors that are adapted to the primary color; Among them, the second hue adjustment step, the second saturation adjustment step and the second brightness adjustment step are all set, and the second hue adjustment step is larger than the first hue adjustment step, the second saturation adjustment step is larger than the second hue adjustment step, and the second brightness adjustment step is larger than the second saturation adjustment step.

20. The device according to claim 19, in, The first second adjustment process includes: increasing the first hue value in the first color parameter by using the second hue adjustment step, increasing the first saturation in the first color parameter by using the second saturation adjustment step, and decreasing the first lightness value in the first color parameter by using the second lightness adjustment step, so as to obtain the second color parameter of the derived color obtained by the first second adjustment process; The non-first second adjustment process includes: using the second hue adjustment step to increase the second hue value of the second color parameter obtained by the previous second adjustment process, and using the second saturation adjustment step to increase the second saturation of the second color parameter obtained by the previous second adjustment process, and using the second brightness adjustment step to lower the second brightness value of the second color parameter obtained by the previous second adjustment process, so as to obtain the second color parameter of the derived color adjusted by the second adjustment process this time.

21. The device according to claim 16, in, The hue value within the hue interval adapted to the target adjustment rule belongs to warm colors, the first color parameter further includes a first saturation and a first lightness value, and the second color parameter includes a second hue value, a second saturation and a second lightness value; The adjustment unit is used for: According to a third hue adjustment step, a third saturation adjustment step, and a third lightness adjustment step that are adapted to the warm color, a third adjustment process is performed multiple times on the first color parameter to obtain second color parameters of multiple derived colors that are adapted to the primary color; Among them, the third hue adjustment step is set, the third saturation adjustment step is determined according to the ratio of the first saturation to the third set value, the third set value is greater than the third hue adjustment step, and the third brightness adjustment step is determined according to the ratio of the second difference to the third set value, the second difference is the difference between the fourth set value and the first brightness value, and the fourth set value is greater than the third set value.

22. The device according to claim 21, in, The first third adjustment process includes: increasing the first hue value in the first color parameter by using the third hue adjustment step, decreasing the first saturation in the first color parameter by using the third saturation adjustment step, and increasing the first brightness value in the first color parameter by using the third brightness adjustment step, so as to obtain the second color parameter of the derived color adjusted by the first third adjustment process; The non-first third adjustment process includes: using the third hue adjustment step to increase the second hue value of the second color parameter obtained by the previous third adjustment process, and using the third saturation adjustment step to lower the second saturation of the second color parameter obtained by the previous third adjustment process, and using the third brightness adjustment step to increase the second brightness value of the second color parameter obtained by the previous third adjustment process, so as to obtain the second color parameter of the derived color adjusted by the third adjustment process this time.

23. The device according to claim 21, in, The adjustment unit is further used for: performing a fourth adjustment process multiple times on the first color parameter according to a fourth hue adjustment step, a fourth saturation adjustment step, and a fourth lightness adjustment step that are adapted to the warm color, to obtain second color parameters of a plurality of derived colors that are adapted to the primary color; Among them, the fourth hue adjustment step, the fourth saturation adjustment step and the fourth brightness adjustment step are all set, and the fourth hue adjustment step is greater than the third hue adjustment step, the fourth saturation adjustment step is greater than the fourth hue adjustment step, and the fourth brightness adjustment step is greater than the fourth saturation adjustment step.

24. The device according to claim 23, in, The first fourth adjustment process includes: using the fourth hue adjustment step to lower the first hue value in the first color parameter, using the fourth saturation adjustment step to increase the first saturation in the first color parameter, and using the fourth brightness adjustment step to lower the first brightness value in the first color parameter, so as to obtain the second color parameter of the derived color adjusted by the first fourth adjustment process; The non-first fourth adjustment process includes: using the fourth hue adjustment step to lower the second hue value of the second color parameter obtained by the previous fourth adjustment process, and using the fourth saturation adjustment step to increase the second saturation of the second color parameter obtained by the previous fourth adjustment process, and using the fourth brightness adjustment step to lower the second brightness value of the second color parameter obtained by the previous fourth adjustment process, so as to obtain the second color parameter of the derived color adjusted by the fourth adjustment process this time.

25. The device according to claim 15, in, The target color includes a neutral color that matches the primary color, the first color parameter includes a first hue value, a first saturation, and a first lightness value, and the second color parameter includes a second hue value, a second saturation, and a second lightness value; The adjustment unit is used for: Using the first hue value in the first color parameter as the second hue value in the second color parameters of the plurality of neutral colors; Using a set saturation generation rule to generate a second saturation in the second color parameters of the plurality of neutral colors; The second brightness value in the second color parameters of the plurality of neutral colors is generated by adopting a set brightness generation rule.

26. The device according to claim 15, in, The target color includes a functional color that matches the primary color; The adjustment unit is used for: For any functional color among a plurality of functional colors adapted to the primary color, query a plurality of empirical coefficient sets associated with the any functional color; The first color parameter is color-adjusted based on the multiple empirical coefficient sets to obtain a second color parameter of any functional color.

27. The device according to claim 26, in, The multiple empirical coefficient sets include a hue coefficient set, a saturation coefficient set and a brightness coefficient set, the first color parameter includes a first hue value, a first saturation and a first brightness value, and the second color parameter includes a second hue value, a second saturation and a second brightness value; The adjustment unit is used for: The first hue value is adjusted by using a plurality of hue coefficients in the hue coefficient set to obtain a second hue value in a second color parameter of any functional color; Using a plurality of saturation coefficients in the saturation coefficient set to adjust the first saturation to obtain a second saturation in a second color parameter of any functional color; The first brightness value is adjusted using a plurality of brightness coefficients in the brightness coefficient set to obtain a second brightness value in a second color parameter of any functional color.

28. The device according to any one of claims 15 to 27, in, The acquisition unit is used to: In response to an input operation triggered by the visual element to be generated, obtaining a color value of the primary color; or, The color value of the main color of the visual element to be generated is read from a configuration file associated with the target object.

29. An electronic device, include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for generating a visual element according to any one of claims 1 to 14.

30. A non-transitory computer-readable storage medium storing computer instructions, in, The computer instructions are used to enable the computer to execute the method for generating a visual element according to any one of claims 1-14.

31. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the steps of the method for generating a visual element according to any one of claims 1 to 14.

Citation Information

Patent Citations

  • Industrial camera color adjustment method

    CN110933386A

  • Interface color setting method, device and equipment and storage medium

    CN112148288A

  • Page display method and device, mobile terminal and storage medium

    CN114416089A

  • Interface color control method and device and storage medium

    CN115248710A

  • Color system construction method and device, equipment and medium

    CN116051664A