Sequence color generation method, related device and medium
By determining the brightness value sequence and two-dimensional plane projection results, dynamic search for colors to generate sequence colors with consistent brightness, solving the problems of uneven brightness changes and inflexible adjustment in the prior art, and achieving more efficient sequence color generation.
Patent Information
- Application Number
- CN202410168568.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-04
- Publication Date
- 2025-08-05
AI Technical Summary
When setting sequence colors in the prior art, the uniformity of brightness changes between adjacent colors cannot be guaranteed, and the adjustment is inflexible and cannot be controlled manually.
By determining the brightness value sequence of the first topic color and the projection results of the two-dimensional plane, combining the chromaticity following parameters, dynamically searching for colors that meet the requirements to generate a sequence color with consistent brightness.
The brightness difference uniformity and adjustment flexibility of each color in the sequence color are improved, and better brightness consistency and color determination efficiency are achieved.
Smart Images

Figure CN120428972A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a sequential color generation method, related devices, and media. Background Art
[0002] Currently, in object interface design, an object interface often contains many components. To ensure the most uniform color style possible, components are often displayed in multiple colors with the same theme color but varying brightness. Furthermore, in data visualization, to clearly distinguish between data items or amounts in a chart, sequential colors with the same theme color but varying brightness are often used. Therefore, sequential colors need to be set in object interface design. Sequential colors include multiple colors with the same theme color but varying brightness. When displaying the object interface, for each component, the color corresponding to that component in the sequential color is selected for display.
[0003] Currently, sequential color settings are typically performed in the background using algorithms or models. Algorithmic sequential color settings typically involve blending a predetermined theme color with a predetermined grayscale value sequence with varying grayscale values. This method operates in the background and cannot be manually controlled. Furthermore, blending grayscale values with the main color doesn't guarantee uniform brightness variations between adjacent colors in the sequence color, resulting in inconsistent sequential color settings and a lack of flexibility. Model-based sequential color settings typically involve providing multiple theme colors and interpolating between them using the model to generate the sequence color. However, the brightness variations between adjacent colors in the sequence color are still uneven. Summary of the Invention
[0004] The embodiments of the present disclosure provide a sequential color generation method, related devices, and medium, which can improve the uniformity of brightness differences among various colors in an interface sequential color.
[0005] According to one aspect of the present disclosure, a method for generating sequential colors is provided, the method comprising:
[0006] In response to a sequential color generation request for a first theme color, determining a first theme color value of the first theme color;
[0007] Determining a brightness value sequence corresponding to a sequential color of the first theme color based on the received brightness extreme value and the first theme color value, wherein the brightness value sequence is used to indicate a brightness value of each first color in the sequential color;
[0008] Determining, based on the first theme color value, a projection result of the first theme color on a preset two-dimensional plane, and determining, based on the projection result and the received chromaticity following parameter, a brightness sequence extension line corresponding to the sequential colors in the two-dimensional plane, where the two-dimensional plane is used to indicate a relationship between the chromaticity and brightness of each of the first colors;
[0009] Based on the brightness value sequence and the brightness sequence extension line, performing a color search in the two-dimensional plane to obtain the first color corresponding to each brightness value in the brightness value sequence;
[0010] The sequence color of the first theme color is determined based on the plurality of first colors, wherein the first colors in the sequence color are consistent with the color of the first theme color, and the brightness difference between every two adjacent first colors is the same.
[0011] According to one aspect of the present disclosure, a sequential color generation device is provided, the device comprising:
[0012] a first determining unit, configured to determine a first theme color value of the first theme color in response to a sequential color generation request for the first theme color;
[0013] a second determining unit, configured to determine a brightness value sequence corresponding to a sequential color of the first theme color based on the received brightness extreme value and the first theme color value, wherein the brightness value sequence is used to indicate a brightness value of each first color in the sequential color;
[0014] a third determining unit, configured to determine, based on the first theme color value, a projection result of the first theme color on a preset two-dimensional plane, and determine, based on the projection result and the received chromaticity following parameter, a brightness sequence extension line corresponding to the sequential colors in the two-dimensional plane, wherein the two-dimensional plane is used to indicate a relationship between the chromaticity and brightness of each of the first colors;
[0015] a color search unit, configured to perform a color search in the two-dimensional plane based on the brightness value sequence and an extension line of the brightness sequence, to obtain the first color corresponding to each brightness value in the brightness value sequence;
[0016] The fourth determining unit is configured to determine the sequence color of the first theme color based on the plurality of the first colors, wherein the first colors in the sequence color are consistent with the color of the first theme color, and the brightness difference between every two adjacent first colors is the same.
[0017] Optionally, the brightness extremes include a maximum brightness value and a minimum brightness value;
[0018] The second determining unit is configured to:
[0019] determining a first brightness difference between adjacent first colors in the sequential color based on the maximum brightness value, the minimum brightness value, and the received first number, where the first number is used to indicate the number of the first colors in the sequential color;
[0020] calculating a plurality of luminance values based on the minimum luminance value, the first luminance difference, and the first number;
[0021] Arrange the plurality of brightness values into the brightness value sequence.
[0022] Optionally, the brightness extremes include a maximum brightness value and a minimum brightness value;
[0023] The second determining unit is configured to:
[0024] Determining a first brightness value of the first theme color based on the first theme color value;
[0025] determining a second brightness difference between adjacent first colors in the sequential color based on the maximum brightness value, the minimum brightness value, and the received first number, wherein the first number is used to indicate the number of the first colors in the sequential color;
[0026] dividing a brightness range determined by the maximum brightness value and the minimum brightness value into a plurality of candidate brightness intervals based on the second brightness difference and the first number;
[0027] determining a brightness offset based on the first brightness value and the candidate brightness interval in which the first brightness value is located;
[0028] calculating a plurality of luminance values based on the luminance offset, the minimum luminance value, and the first number;
[0029] Arrange the plurality of brightness values into the brightness value sequence.
[0030] Optionally, determining a first brightness value of the first theme color based on the first theme color value includes:
[0031] Performing a linear transformation on the first theme color value to obtain a first color component, a second color component, and a third color component of the first theme color;
[0032] Obtaining a relative brightness value of the first theme color based on a weighted sum of the first color component, the second color component, and the third color component;
[0033] Performing a first grayscale conversion on the relative brightness value to obtain a preliminary brightness value of the first theme color;
[0034] A second grayscale conversion is performed on the preliminary brightness value based on the received grayscale adjustment coefficient to obtain the first brightness value.
[0035] Optionally, the third determining unit is configured to:
[0036] Based on the two-dimensional plane, a two-dimensional coordinate system is constructed, wherein the two-dimensional coordinate system is a coordinate system with chromaticity as the horizontal axis and brightness as the vertical axis;
[0037] Determining a first coordinate point corresponding to the projection result in the two-dimensional coordinate system;
[0038] determining a preliminary brightness extension line based on an intersection relationship between a connecting line between the first coordinate point and a predetermined coordinate point in the two-dimensional coordinate system and a predetermined straight line in the two-dimensional coordinate system;
[0039] Based on the chromaticity following parameter, the preliminary brightness extension line is corrected to obtain the brightness sequence extension line.
[0040] Optionally, the modifying the preliminary brightness extension line based on the chromaticity following parameter to obtain the brightness sequence extension line includes:
[0041] Based on the chromaticity following parameter, the preliminary brightness extension line is corrected to obtain a corrected preliminary brightness extension line;
[0042] Interpolation processing is performed on the corrected preliminary brightness extension line to obtain the brightness sequence extension line.
[0043] Optionally, the color search unit includes:
[0044] a search subunit, configured to perform a color search in the two-dimensional plane based on a predetermined color search rule, the brightness value sequence, and an extension line of the brightness sequence, to obtain a plurality of color search results corresponding to each brightness value in the brightness value sequence, wherein each color search result is used to indicate a candidate color region on the two-dimensional plane;
[0045] The determination subunit is configured to determine, for each brightness value, the first color corresponding to the brightness value based on a plurality of color search results corresponding to the brightness value.
[0046] Optionally, the search subunit is configured to:
[0047] Initialize the iteration number to 1;
[0048] Executing a first process, the first process comprising:
[0049] Based on the predetermined color search rule, spatially dividing the two-dimensional plane into four equal parts to obtain a first array, wherein the first array includes a plurality of preliminary search results, each of the preliminary search results corresponding to a square area on the two-dimensional plane;
[0050] For each of the preliminary search results, determining, in the two-dimensional plane, a candidate color corresponding to the preliminary search result based on vertex coordinates of a square area corresponding to the preliminary search result;
[0051] Based on a comparison between the second brightness value of each candidate color and each brightness value in the brightness value sequence, screening out an intermediate search result corresponding to each brightness value from the plurality of preliminary search results;
[0052] For each brightness value, based on the positional relationship between each intermediate search result and the brightness sequence extension line on the two-dimensional plane, determine the color search result corresponding to the brightness value from the plurality of intermediate search results;
[0053] The iteration number is incremented by 1, and the first process is repeatedly performed until the iteration number is consistent with the received iteration parameter, thereby obtaining a plurality of color search results corresponding to the respective brightness values.
[0054] Optionally, the determining subunit is configured to:
[0055] For each color search result of the brightness value, calculating a first distance between the center coordinates of the candidate color region corresponding to each color search result and the brightness sequence extension line;
[0056] Based on the first distance, filtering out a target search result from the plurality of color search results;
[0057] Determining the center coordinates of the candidate color area corresponding to the target search result on the two-dimensional plane;
[0058] The first color corresponding to the brightness value is determined based on the coordinate parameters of the center coordinates and the hue parameter of the first theme color.
[0059] Optionally, the fourth determining unit includes:
[0060] a sorting subunit, configured to sort the plurality of first colors to obtain a color sequence;
[0061] The adjustment subunit is configured to perform color adjustment on the color sequence to obtain the sequence color of the first theme color.
[0062] Optionally, the sorting subunit is used to:
[0063] receiving an operation for selecting a sorting mode for the sequence colors of the first theme color, the operation for selecting a sorting mode being used to arrange the first colors of the sequence colors in a first order from small to large brightness values, or to arrange the first colors of the sequence colors in a second order from large to small brightness values;
[0064] Based on the sorting mode selection operation, the plurality of first colors are sorted according to the first order or the second order to obtain the color sequence.
[0065] Optionally, the adjusting subunit is configured to:
[0066] If it is determined that the sequence of colors does not include the first theme color, and the trigger state of the built-in theme color activation control is not triggered, then replacing a first color in the sequence of colors having the same brightness value as the first theme color with the first theme color, wherein the trigger state of the built-in theme color activation control is used to indicate a method for determining the brightness value sequence;
[0067] If it is determined that the sequence color does not include the first theme color, and the trigger state of the theme color built-in enabling control is triggered, based on the color difference values between the first theme color and each of the first colors in the sequence color, the first color with the smallest color difference value is replaced with the first theme color.
[0068] Optionally, the first theme color value of the first theme color is determined by:
[0069] In response to the sequential color generation request, displaying a first setting page, the first setting page having a sequential color parameter setting area and a sequential color display area, the sequential color parameter setting area including a theme color setting sub-area, the theme color setting sub-area including a theme color format selection control and a theme color value input area;
[0070] receiving a selection operation on the theme color format selection control, wherein the selection operation is used to specify a selected target theme color format;
[0071] In the theme color value input area, a first theme color value input according to the target theme color format is received.
[0072] Optionally, the first theme color value of the first theme color is determined by:
[0073] In response to the sequential color generation request, displaying a first setting page, the first setting page having a sequential color parameter setting area and a sequential color display area, the sequential color parameter setting area including a theme color setting sub-area, and the theme color setting sub-area including a theme color block selection area;
[0074] In response to triggering the theme color block selection area, displaying a plurality of candidate theme color blocks in the theme color block selection area;
[0075] In response to selecting the candidate theme color block corresponding to the first theme color from among the plurality of candidate theme color blocks, the first theme color value is determined.
[0076] Optionally, the sequential color parameter setting area includes a plurality of color representation model selection controls;
[0077] After determining the first theme color value in response to selecting the candidate theme color block corresponding to the first theme color from the plurality of candidate theme color blocks, the method further includes:
[0078] In response to a triggering operation on the selection control of a target color representation model among the plurality of color representation models, displaying a color component parameter editing control corresponding to the triggered target color representation model in the sequential color parameter setting area;
[0079] In response to an editing operation on the color component parameter editing control, the first theme color value is updated.
[0080] Optionally, the sequential color parameter setting area includes a chroma following parameter adjustment sub-area and a luminance extreme value editing sub-area;
[0081] The luminance extreme value and the chromaticity following parameter are determined in the following manner:
[0082] determining the chroma following parameter in response to an editing operation on the chroma following parameter in the chroma following parameter adjustment subregion;
[0083] The luminance extreme value is determined in response to an editing operation on a luminance parameter in the luminance extreme value editing sub-area.
[0084] According to one aspect of the present disclosure, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the sequential color generation method as described above when executing the computer program.
[0085] According to one aspect of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the sequential color generating method as described above is implemented.
[0086] According to one aspect of the present disclosure, a computer program product is provided. The computer program product includes a computer program. The computer program is read and executed by a processor of a computer device, so that the computer device executes the sequential color generation method as described above.
[0087] In the embodiment of the present disclosure, a brightness value sequence is determined based on the brightness extreme value and the first theme color value of the first theme color, so that under different first theme colors, the multiple first colors of the obtained sequence color are characterized according to the brightness of the brightness value sequence, so that the sequence color can have good brightness consistency. Furthermore, for different first theme colors, a brightness sequence extension line that meets the requirements is determined on a two-dimensional plane based on chromaticity and brightness, and a color that meets the requirements is dynamically searched as the first color based on the brightness sequence extension line and the brightness value sequence, which can improve the efficiency and accuracy of determining each first color in the sequence color. Compared with the related art, this method is to set the relevant configuration parameters of the sequence color through the interface, and the sequence color is generated by the sequence color generation algorithm in the server. The sequence color generation algorithm has high configurability and flexibility, can improve the uniformity of the brightness difference of each color in the interface sequence color, and improve the flexibility of sequence color adjustment.
[0088] Other features and advantages of the present disclosure will be described in the following description, and in part will become apparent from the description, or will be understood by practicing the present disclosure. The purposes and other advantages of the present disclosure can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] The accompanying drawings are used to provide a further understanding of the technical solution of the present disclosure and constitute a part of the specification. Together with the embodiments of the present disclosure, they are used to explain the technical solution of the present disclosure and do not constitute a limitation to the technical solution of the present disclosure.
[0090] Figure 1 is a system architecture diagram of a system to which the sequential color generation method according to an embodiment of the present disclosure is applied;
[0091] Figure 2A-2C This is a schematic diagram of a sequential color generation method based on related technologies applied in an interface design scenario;
[0092] Figure 3A-3B This is a schematic diagram of another sequential color generation method based on related technologies applied in an interface design scenario;
[0093] Figure 4 This is a schematic diagram of another sequential color generation method based on related technologies applied in an interface design scenario;
[0094] Figure 5A-5B is a schematic diagram of the application of the sequential color generation method disclosed in the present invention in a sequential color generation scenario;
[0095] Figure 6 is a flow chart of a sequential color generation method according to one embodiment of the present disclosure;
[0096] Figure 7 is a flowchart of determining a first theme color value according to an embodiment of the present disclosure;
[0097] Figure 8 is a schematic diagram of an implementation process of determining a first theme color value according to an embodiment of the present disclosure;
[0098] Figure 9 is a flowchart of determining a first theme color value according to another embodiment of the present disclosure;
[0099] Figure 10 is a schematic diagram of an implementation process of determining a first theme color value according to another embodiment of the present disclosure;
[0100] Figure 11 is a flowchart of updating a first theme color value according to an embodiment of the present disclosure;
[0101] Figures 12A-12E is a schematic diagram comparing sequential colors generated based on different numbers of iterations according to an embodiment of the present disclosure;
[0102] Figure 13 is a flowchart of determining a sequence of brightness values according to one embodiment of the present disclosure;
[0103] Figure 14 is a schematic diagram of an implementation process of determining a brightness value sequence according to an embodiment of the present disclosure;
[0104] Figure 15 is a flowchart of determining a sequence of brightness values according to another embodiment of the present disclosure;
[0105] Figure 16 is a schematic diagram of an implementation process of determining a brightness value sequence according to another embodiment of the present disclosure;
[0106] Figure 17 is a flow chart of determining a first brightness value of a first theme color according to one embodiment of the present disclosure;
[0107] Figures 18A-18C is a schematic diagram of an implementation process of determining a first brightness value according to an embodiment of the present disclosure;
[0108] Figure 19 is a flowchart of determining a brightness sequence extension line according to an embodiment of the present disclosure;
[0109] Figures 20A-20G is a schematic diagram of an implementation process of determining a brightness sequence extension line according to an embodiment of the present disclosure;
[0110] Figure 21is a flow chart of correcting a preliminary brightness stretch line according to one embodiment of the present disclosure;
[0111] Figure 22 is a schematic diagram of an implementation process of correcting a preliminary brightness extension line according to an embodiment of the present disclosure;
[0112] Figure 23 is a flow chart for determining color search results for various brightness values according to one embodiment of the present disclosure;
[0113] Figures 24A-24H is a schematic diagram of an implementation process of determining color search results for each brightness value according to an embodiment of the present disclosure;
[0114] Figure 25 is a flow chart for determining a first color corresponding to a brightness value according to one embodiment of the present disclosure;
[0115] Figures 26A-26B This is a schematic diagram of an implementation process for generating sequential colors based on different trigger states of a sequential color built-in start control according to an embodiment of the present disclosure;
[0116] Figure 27 is a flowchart of performing color adjustment on a color sequence according to one embodiment of the present disclosure;
[0117] Figure 28 This is a schematic diagram of an implementation process of adjusting the color sequence when a built-in theme color start control is triggered according to an embodiment of the present disclosure;
[0118] Figure 29 is a flow chart of using sequential colors for object interface component design according to one embodiment of the present disclosure;
[0119] Figure 30 is a flow chart of using sequential colors for data charts according to one embodiment of the present disclosure;
[0120] Figure 31 is a schematic diagram of an implementation process of deriving sequential colors according to an embodiment of the present disclosure;
[0121] Figures 32A-32C is a schematic diagram of a practical application of a sequential color generation method according to an embodiment of the present disclosure;
[0122] Figure 33 is a module diagram of a sequential color generating device according to an embodiment of the present disclosure;
[0123] Figure 34 is a terminal structure diagram of a sequential color generation method according to an embodiment of the present disclosure;
[0124] Figure 354 is a server structure diagram of a sequential color generation method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0125] In order to make the purpose, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not intended to limit the present disclosure.
[0126] Before further explaining the embodiments of the present disclosure in detail, the nouns and terms involved in the embodiments of the present disclosure are explained. The nouns and terms involved in the embodiments of the present disclosure are subject to the following interpretations:
[0127] Artificial intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive field of computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making. AI technology is an interdisciplinary discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, pre-trained models, operating / interaction systems, and mechatronics. Pre-trained models, also known as large models or basic models, can be fine-tuned and widely applied to downstream tasks across various AI domains. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning. With the research and advancement of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, autonomous driving, drones, robots, smart medical care, smart customer service, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0128] Currently, in object interface design, an object interface often contains many components. To ensure the most uniform color style possible, components are often displayed in multiple colors with the same theme color but varying brightness. Furthermore, in data visualization, to clearly distinguish between data items or amounts in a chart, sequential colors with the same theme color but varying brightness are often used. Therefore, sequential colors need to be set in object interface design. Sequential colors include multiple colors with the same theme color but varying brightness. When displaying the object interface, for each component, the color corresponding to that component in the sequential color is selected for display.
[0129] Currently, setting sequential colors is generally done in the background through algorithms or models. Setting sequential colors through algorithms generally involves mixing a predetermined theme color with a predetermined grayscale value sequence with different grayscale values. This method is performed in the background and cannot be manually controlled. Furthermore, the method of mixing grayscale values with the main color cannot guarantee uniform brightness changes between adjacent colors in the sequence color, resulting in the sequence color setting results not meeting expectations and being unable to be flexibly adjusted. Setting sequential colors through models generally involves providing multiple theme colors, and interpolating between the theme colors through the model to obtain the sequence color. However, the brightness changes between adjacent colors in the sequence color are still uneven, and the model method still cannot be manually controlled, resulting in poor adjustment flexibility.
[0130] System architecture and scenario description of the application of the embodiments of the present disclosure
[0131] Figure 1 1 is a system architecture diagram of a sequential color generation method according to an embodiment of the present disclosure, which includes a target terminal 140, the Internet 130, a gateway 120, a sequential color generation server 110, and the like.
[0132] The target terminal 140 includes various forms, including desktop computers, laptops, PDAs (personal digital assistants), mobile phones, in-vehicle terminals, home theater terminals, and dedicated terminals. Furthermore, it can be a single device or a collection of multiple devices. The target terminal 140 can communicate with the Internet 130 via wired or wireless means to exchange data. The target terminal 140 includes a sequential color setting system, which is used by the target subject to input a theme color and set configuration parameters related to the sequence color. The system is also used to display sequential colors generated based on the theme color selected by the target subject.
[0133] The sequence color generation server 110 refers to a computer system that can provide certain services to the object terminal 140. Compared with the ordinary object terminal 140, the sequence color generation server 110 has higher requirements in terms of stability, security, performance, etc. The sequence color generation server 110 can be a high-performance computer in a network platform, a cluster of multiple high-performance computers, a part of a high-performance computer (such as a virtual machine), a combination of parts of multiple high-performance computers (such as virtual machines), etc. The sequence color generation server 110 includes various types of services, wherein the implementation of each service of the sequence color generation server is often associated with some intermediate databases or storage media, etc. The sequence color generation server is used to receive the theme color input by the target object and the configuration parameters related to the sequence color, and generate the sequence color according to the theme color and configuration parameters, and send the generated sequence color to the sequence color setting system for display.
[0134] Gateway 120 is also known as a network connector or protocol converter. A gateway implements network interconnection at the transport layer and is a computer system or device that acts as a converter. It acts as a translator between two systems using different communication protocols, data formats, or languages, or even completely different architectures. Gateways can also provide filtering and security functions. Messages sent by the object terminal 140 to the sequence color generation server 110 are sent to the corresponding server via gateway 120. Messages sent by the sequence color generation server 110 to the object terminal 140 are also sent to the corresponding object terminal 140 via gateway 120.
[0135] In the process of setting the sequential color for the interface, the target object inputs the theme color through the sequential color setting system of the object terminal 140 and sets the configuration parameters related to the sequential color. Furthermore, the sequential color generation server 110 generates the sequential color based on the received theme color and multiple configuration parameters using a preset sequential color generation algorithm to obtain the sequential color that best matches the theme color and configuration requirements. Furthermore, the sequential color generation server 110 sends the generated sequential color and detailed information about each color contained in the sequential color to the sequential color setting system, so that the target object can view the displayed sequential color on the sequential color setting system and select the color corresponding to each component on the interface to be set in the sequential color, so that each component of the interface is displayed according to the selected color.
[0136] In related technologies, sequential color generation is often achieved through algorithms or models.
[0137] The following will be combined Figure 2A-2C A detailed description is given of the application of an algorithm-based sequential color generation method in the related art in an interface design scenario.
[0138] like Figure 2A As shown in the figure, given a brightness sequence containing 10 different brightness values. When the theme color is a blue hue with a certain brightness and chroma, commonly used algorithm modes such as hard light mode, brightness mode, brighten mode, multiply mode, filter mode, and overlay mode are selected. In each selected algorithm mode, the given brightness sequence and the theme color are mixed to obtain sequence colors based on different algorithm modes. As can be seen from the figure, the brightness and chroma of the colors at the same position in the sequence color are different under different algorithm modes. In addition, the brightness changes of the sequence colors in the hard light mode and brightness mode are relatively uniform; the brightness changes of the sequence colors in the brighten mode and filter mode are difficult to distinguish; the saturation of each color in the sequence color in the overlay mode is high; and the overall color of the sequence color in the multiply mode is darker.
[0139] Furthermore, taking the color mixing of the brightness sequence and the theme color in strong light mode as an example, the color corresponding to the brightness of each position in the brightness sequence is recorded as a, where the value of a ranges from [0,1]. When the color corresponding to the brightness a=0, the color corresponding to the brightness is black, and when the color corresponding to the brightness a=1, the color corresponding to the brightness is white. The color value of the theme color is recorded as b, and the color obtained by mixing each brightness with the theme color is recorded as c. Based on this, when a is less than 0.5, the mixed color is c=2ab; when a is not less than 0.5, the mixed color is c=1-2(1-a)×(1-b).
[0140] like Figure 2B The following table shows the comparison results between each theme color and the theme color sequence. When the theme color's hue is blue, the theme color is not included in the sequence color generated in the brightness mode. That is, the brightness of each color in the sequence color is different from the brightness of the theme color. Similarly, when the theme color's hue is yellow, the theme color is not included in the sequence color generated in the brightness mode. That is, the brightness of each color in the sequence color is different from the brightness of the theme color.
[0141] like Figure 2CThe following figure shows a comparison of sequence colors of different theme colors under the same algorithm mode, and a comparison of sequence colors of the same theme color under different algorithm modes. Specifically, in the strong light mode, yellow, green, and red are selected as the theme colors, and a sequence color corresponding to the theme color is generated respectively, and the brightness value of each color of each sequence color is taken to form a brightness sequence. Upon comparison, when yellow, green, and red are selected as the theme colors, the brightness values of the brightness sequences corresponding to the sequence colors of the three colors are different. In addition, in the brightness mode, yellow, green, and red are selected as the theme colors, and a sequence color corresponding to the theme color is generated respectively, and the brightness value of each color of each sequence color is taken to form a brightness sequence, the brightness values of the brightness sequences corresponding to the sequence colors of the three colors are also different. At the same time, when yellow (or green, or red) is selected as the theme color, the brightness sequences corresponding to the sequence colors generated according to the strong light mode and the brightness mode are also different.
[0142] The above-described method can utilize various algorithm modes, such as strong light mode, brightness mode, and brightening mode, to mix a given brightness sequence with a selected theme color to generate the sequence color corresponding to each algorithm mode. However, most algorithm modes are not well-suited for sequential color generation scenarios, resulting in oversaturation and hue shift in the sequence colors. Furthermore, because each algorithm mode often does not include assumptions about the color mixing results, the generated sequence colors often do not contain the theme color. However, in most application scenarios, the theme color must be present in the sequence color. Directly setting a color at a certain level in the sequence color as the theme color often changes the brightness difference between the color at that level and the surrounding colors, making it difficult to distinguish the theme color from other colors and exacerbating uneven brightness changes. Furthermore, the above-described algorithm modes do not uniformly calculate and process brightness, nor do they take into account the inherent brightness of different theme colors. This can result in inconsistent brightness for sequence colors corresponding to the same theme color under different algorithm modes. Furthermore, for sequence colors of different theme colors under the same algorithm mode, the brightness of the same level of the sequence colors can also vary significantly, making it impossible to achieve brightness consistency for the same level of the sequence colors of different theme colors.
[0143] The following will be combined Figure 3A-3B A detailed description is given of the application of a model-based sequential color generation method in related technologies in interface design scenarios.
[0144] Model refers to a color representation model, which is a mathematical representation method of color. It is a way to represent a specific color with a numerical value. Common color representation models include but are not limited to the RGB model, HSL model, CMYK model, LCH model, and Lab model, etc.
[0145] The model-based interface sequential color setting method refers to a method of obtaining sequential colors by performing numerical interpolation on each channel under the color representation model and discretizing the interpolation results when no less than two color endpoints and a color representation model are provided.
[0146] like Figure 3A As shown, a comparison is made between unprocessed sequential colors, sequential colors based on the Lab model and Bezier interpolation, sequential colors based on the Lab model and brightness correction, and sequential colors based on the Lab model, Bezier interpolation, and brightness correction. Specifically, compared to unprocessed sequential colors and sequential colors based on the Lab model and brightness correction, the color transitions of sequential colors based on the Lab model and Bezier interpolation are visually smoother; and the brightness changes of each color of the sequential colors based on the Lab model, Bezier interpolation, and brightness correction are more uniform.
[0147] It should be noted that brightness correction refers to the process of performing linear fitting on the brightness component (L component value) of the generated sequential color in the Lab model.
[0148] like Figure 3B As shown, in the generated sequential colors, the theme color often needs to be located in the middle of the sequence color. Therefore, when setting the sequential colors based on the model, it is often necessary to specify two interpolation endpoints based on the maximum and minimum brightness (in addition to the theme color, two additional color endpoints are provided); based on this, in the sequential colors, the theme color is the color located in the fifth position (level 4) of the sequential colors. In the sequential colors, two interpolation areas are generated: the darkest color to the theme color (from left to right, the first position to the fifth position), and the theme color to the brightest color (from left to right, the fifth position to the ninth position). The sequential colors have a clear sense of separation before and after the theme color.
[0149] The above method can use the color representation model and color interpolation to set the sequence color corresponding to the theme color. However, in order to achieve color interpolation, the model-based sequence color setting method requires color input other than the theme color, and the entire sequence color cannot be determined by a single theme color. In addition, the model-based sequence color often has the problem of discontinuous color brightness changes or chromaticity changes (such as Figure 3B ), often after model-based processing, other nonlinear interpolation strategies are needed for correction. Furthermore, since there are many commonly used color representation models, when using different color representation models, the generated sequential colors will also have certain differences. Generating high-quality sequential colors often requires a specific color representation model.
[0150] The following will be combined Figure 4A detailed description is given of the application of another model-based sequential color generation method in the related art in the interface design scenario.
[0151] Another model-based method for setting sequential colors in an interface involves building a new color representation model based on multiple commonly used models. For example, a new color representation model, HCT (Hue-Chroma-Tone), is built using the Lab and CAM16 models. The T component is defined as the same as the lightness component L of the Lab model, and the H and C components are defined as the same as the hue and chroma components of the CAM16 model, respectively.
[0152] like Figure 4 The following figure shows five sequential colors generated based on the new color representation model HCT. The first of these five sequential colors is numbered A1. The HCT color representation model fixes the hue of sequential color A1 to 266 and the chroma to no less than 62. It then generates multiple colors using lightness T values of 10, 20, 30, 40, 50, 60, 70, 80, 90, 95, and 99, respectively. These multiple colors form sequential color A1. Similarly, sequential colors A2, A3, N1, and N2 are generated.
[0153] This approach combines the Lab model's stability in brightness perception with the CAM16 model's color space coordinate adjustment based on hue and chroma. This allows sequential colors to be generated by simply changing the brightness component, while maintaining fixed hue and chroma components. However, this new color representation model often suffers from poor compatibility and lacks the flexibility to switch between commonly used color representation models. Furthermore, new color representation models often rely on a combination of fixed color representation models, resulting in limited versatility.
[0154] Compared with related technologies, the embodiment of the present disclosure converts the sequential color setting into a visual form based on the interface, allowing objects to customize the theme color, the number of colors in the sequential color, and related configuration parameters of the sequential color, and can flexibly control the generation of sequential colors and adjust the generated sequential colors. The embodiment of the present disclosure can be applied in various scenarios, such as Figure 5A-5B The sequential color generation scene shown, etc.
[0155] like Figure 5AThe figure shows the sequential color setting interface of an embodiment of the present disclosure. The first settings page displays an area for setting a theme color, an area for setting the number of sequential color colors, an area for setting configuration parameters for generating sequential colors, and an area for displaying generated sequential colors. First, the user can enter the theme color value "#07C160" in the theme color setting area (the upper right corner of the first settings page). The first settings page will then display the theme color value, the specific color, and the component parameters of the theme color under a color representation model, "H: 56; S: 77; L: 83." The user can then enter "10" in the area for setting the number of sequential color colors to set the number of sequential color colors to 10. Furthermore, after the user has set the theme color, the number of colors, and the related configuration parameters, the left area of the first settings page will display the sequential colors corresponding to the theme color. If the user wishes to change the number of sequential color colors, they can simply edit the new value in the area for setting the number of sequential color colors to obtain a new sequential color with the desired number of colors.
[0156] like Figure 5B As shown, the sequence colors corresponding to the various theme colors set in the embodiment of the present disclosure, as well as the brightness sequence of the sequence colors of each theme color. Specifically, regardless of whether red, yellow, or green is selected as the theme color, the color brightness changes of the generated sequence colors have good uniformity and continuity. In addition, regardless of whether red, yellow, or green is selected as the theme color, the brightness values of the same positions in the brightness sequence of each sequence color are the same. Based on this, compared with the above-mentioned model-based or algorithm-based sequence color generation method, the brightness of the colors at the same position (same level) of the sequence color is consistent.
[0157] General description of the embodiments of the present disclosure
[0158] According to one embodiment of the present disclosure, a method for generating sequential colors is provided.
[0159] This sequential color generation method is generally used in business scenarios such as interface design, page layout, and chart processing, for example Figure 5A-5B The sequential color generation scene shown.
[0160] In order to make the method of generating the sequential color of the first theme color applicable to a variety of color spaces and a variety of application scenarios, the embodiment of the present disclosure provides a more general sequential color generation algorithm process, which does not rely on a specific color representation model and supports the use of any color representation model based on the three dimensions of "hue-brightness-chroma" for sequential color generation, which can improve the convenience and universality of sequential color generation.
[0161] like Figure 6 As shown, the sequential color generation method according to one embodiment of the present disclosure may include:
[0162] Step 610: In response to a sequential color generation request for a first theme color, determine a first theme color value of the first theme color;
[0163] Step 620: Determine a brightness value sequence corresponding to the sequential colors of the first theme color based on the received brightness extreme value and the first theme color value;
[0164] Step 630: Determine a projection result of the first theme color on a preset two-dimensional plane based on the first theme color value, and determine a brightness sequence extension line corresponding to the sequential color in the two-dimensional plane based on the projection result and the received chromaticity tracking parameter;
[0165] Step 640: Based on the brightness value sequence and the brightness sequence extension line, perform a color search in a two-dimensional plane to obtain a first color corresponding to each brightness value in the brightness value sequence;
[0166] Step 650: Determine a sequence color of the first theme color based on the multiple first colors.
[0167] Steps 610-650 are described in detail below.
[0168] In step 610 , in response to a sequential color generation request for a first theme color, a first theme color value of the first theme color is determined.
[0169] A sequential color generation request refers to a request generated by an object when it wants to generate sequential colors for needs such as interface component design or data chart processing.
[0170] The first theme color refers to the theme color to be set by the object through the theme color setting operation. The hue of the first theme color represents the hue of each color of the sequence color to be set.
[0171] The sequence color of the first theme color refers to a series of colors that have the same hue as the first theme color and exhibit uniform brightness changes. The uniform brightness change includes two forms: brightness changing from bright to dark, and brightness changing from dark to bright.
[0172] The first theme color value is used to indicate the result of the first theme color being represented by a numerical value under the currently selected color representation model.
[0173] In a specific implementation of this embodiment, when an object wants to generate a sequence color for the first theme color, the object edits the first theme color on the first settings page of the sequence color setting system on the object's terminal. Based on this, the server can determine the color value of the first theme color selected by the object based on the object's editing operation and use the color value of the first theme color as the first theme color value.
[0174] It should be noted that, in the embodiment of the present disclosure, the manner of editing the first theme color of an object includes but is not limited to input operation, color picking operation, or other operations.
[0175] In step 620 , based on the received extreme brightness value and the first theme color value, a brightness value sequence corresponding to the sequential colors of the first theme color is determined.
[0176] The received brightness extreme value is edited by the object in the first setting page. The first setting page refers to an interactive page provided for the object and related to setting the sequential color.
[0177] In the embodiment of the present disclosure, the brightness extremes include a maximum brightness value and a minimum brightness value.
[0178] The maximum brightness value is used to indicate the maximum brightness that the first color in the sequence color of the first theme color can reach.
[0179] The minimum brightness value is used to indicate the minimum brightness that the first color in the sequence color of the first theme color can achieve.
[0180] To save space, the method of determining the brightness extreme value in the embodiment of the present disclosure will be described in detail below and will not be repeated here.
[0181] The brightness value sequence includes a plurality of brightness values with different brightnesses, and the brightness value sequence is used to indicate the brightness value of each first color in the sequence color.
[0182] In the specific implementation of this embodiment, since the first settings page includes a built-in theme color activation control, the trigger state of the built-in theme color activation control includes two forms: triggered and untriggered. The triggered and untriggered states of the built-in theme color activation control each correspond to a method for determining the brightness value of the first color of the sequence color. Based on this, the server first determines the trigger state of the built-in theme color activation control. Then, based on the trigger state of the built-in theme color activation control, the brightness value sequence corresponding to the sequence color is determined according to the brightness extreme value, the first theme color value, and the determination method corresponding to the trigger state of the built-in theme color activation control.
[0183] In step 630, based on the first theme color value, a projection result of the first theme color on a preset two-dimensional plane is determined, and based on the projection result and the received chromaticity tracking parameter, a brightness sequence extension line corresponding to the sequential color is determined in the two-dimensional plane.
[0184] Since color spaces are often three-dimensional, fixing one of the three dimensions of color allows for two-dimensional analysis based on the other two dimensions. Therefore, in the disclosed embodiments, a two-dimensional plane is the color space formed by the various colors within a fixed hue. A two-dimensional plane is used to accommodate multiple colors with the same hue but different chroma and brightness.
[0185] Based on this, the two-dimensional plane in the embodiment of the present disclosure is used to indicate the relationship between the chromaticity and brightness of each first color.
[0186] The projection result is used to indicate the position of the first theme color in the corresponding two-dimensional plane.
[0187] The brightness sequence extension line is used to indicate the approximate position of the sequence color on the two-dimensional plane and the brightness change direction of the first color of the sequence color.
[0188] In this embodiment, first, based on the hue component of the first theme color value, a preset two-dimensional plane corresponding to the hue is called. Then, based on the chroma and luminance components of the first theme color value, a candidate color with the same chroma and luminance components is found in the two-dimensional plane. This candidate color is used as the projection result of the first theme color.
[0189] To save space, the process of determining the brightness sequence extension line corresponding to the sequential color in the two-dimensional plane in the embodiment of the present disclosure will be described in detail below and will not be repeated here.
[0190] In step 640 , a color search is performed in a two-dimensional plane based on the brightness value sequence and the brightness sequence extension line to obtain a first color corresponding to each brightness value in the brightness value sequence.
[0191] Color search refers to the process of searching for a candidate color whose brightness and chromaticity meet the requirements among multiple candidate colors on a two-dimensional plane.
[0192] To save space, the process of performing color search in a two-dimensional plane in the embodiment of the present disclosure will be described in detail below and will not be repeated here.
[0193] In step 650 , a sequence color of the first theme color is determined based on the plurality of first colors.
[0194] In the embodiment of the present disclosure, the first color in the sequence color is consistent with the color of the first theme color, and the brightness difference between every two adjacent first colors is the same.
[0195] To save space, the process of determining the sequential colors of the first theme color based on multiple first colors in the embodiment of the present disclosure will be described in detail below and will not be repeated here.
[0196] The benefit of this embodiment is that the brightness value sequence is determined based on the brightness extreme value and the first theme color value of the first theme color, so that under different first theme colors, the multiple first colors of the sequence color obtained are characterized according to the brightness of the brightness value sequence, so that the sequence color can have good brightness consistency. Furthermore, for different first theme colors, a brightness sequence extension line that meets the requirements is determined on a two-dimensional plane based on chromaticity and brightness, and a color that meets the requirements is dynamically searched as the first color based on the brightness sequence extension line and the brightness value sequence, which can improve the efficiency and accuracy of determining each first color in the sequence color. Compared with the related art, this method is to set the relevant configuration parameters of the sequence color through an interface, and the sequence color is generated by the sequence color generation algorithm in the server, and the sequence color generation algorithm has high configurability and flexibility. In addition, the above method does not rely on a specific color model and can achieve the effect of compatibility with different color spaces.
[0197] Detailed description of step 610
[0198] In step 610 , in response to a sequential color generation request for a first theme color, a first theme color value of the first theme color is determined.
[0199] In the embodiment of the present disclosure, an interface-based approach is adopted to implement the setting of the sequence color of the object for the first theme color.
[0200] In the specific implementation of this embodiment, after the object sends a sequential color generation request, the server will respond to the sequential color generation request and display a first setting page for setting various configuration parameters for the object, so that the object can set various parameters required to generate the sequential color of the first theme color.
[0201] Please refer to Figure 7 In one embodiment, the first theme color value of the first theme color is determined by:
[0202] Step 710: Display a first setting page in response to the sequence color generation request;
[0203] Step 720: Receive a selection operation on a theme color format selection control;
[0204] Step 730: In the theme color value input area, receive a first theme color value input according to a target theme color format.
[0205] Steps 710-730 are described in detail below.
[0206] In step 710 , in response to a sequential color generation request, a first setting page is displayed.
[0207] The first setting page has a sequential color parameter setting area and a sequential color display area.
[0208] The sequential color parameter setting area refers to an interactive area in the first setting page for setting various configuration parameters related to generating sequential colors for the object.
[0209] The sequential color display area refers to an area provided in the first setting page for displaying the sequential colors set for the object.
[0210] In the embodiment of the present disclosure, the sequence color parameter setting area includes a theme color setting sub-area and a single sequence color number setting sub-area.
[0211] The theme color setting sub-area is an area provided for setting a theme color that meets the requirements for an object.
[0212] The single sequence color number setting sub-area refers to an area for setting the total number of colors of a sequence color to be generated for the object.
[0213] The theme color setting subarea includes a theme color format selection control and a theme color value input area. The theme color format selection control is used to allow the object to select the input format of the theme color. The theme color value input area is used to allow the object to enter a specific color value.
[0214] Based on this, the theme color format selection control and the theme color value input area are used to provide the object with a numerical value input form to set the theme color.
[0215] In a specific implementation of this embodiment, when an object wishes to generate a sequential color, the object typically logs into the sequential color setting system and triggers the sequential color generation process by clicking an operation control related to setting the sequential color in the sequential color setting system. Based on this, the server receives the object's triggering of the operation control in the sequential color setting system, receives the object's sequential color generation request, and displays a first setting page in the sequential color setting system to execute the sequential color generation process.
[0216] In step 720 , a selection operation on a theme color format selection control is received.
[0217] The selection operation is used to specify the target theme color format. The target theme color format refers to the theme color format that meets the requirements of the object.
[0218] In the embodiment of the present disclosure, the theme color format corresponds to various color representation models, and the theme color format includes but is not limited to Hex corresponding to the HSL model, RGB corresponding to the RGB model, Lab corresponding to the Lab model, and the like.
[0219] In a specific implementation of this embodiment, when setting a theme color format, the subject clicks a theme color format selection control. After the theme color format selection control is triggered, the subject selects a theme color format from multiple available theme color formats. Based on this, the server receives the subject's selection operation of the theme color format selection control and determines the theme color format selected by the subject as the target theme color format.
[0220] like Figure 8 As shown in the following example, the theme color format selection control provides candidate theme color formats such as Hex, CMYK, RGB, HSL, HSV, Lab, and LCH. In this case, the subject selects "Hex" as the target theme color format from the multiple candidate theme color formats provided in the theme color format selection control.
[0221] In step 730 , a first theme color value input according to a target theme color format is received in the theme color value input area.
[0222] The first theme color value refers to the color value of the first theme color in the target theme color format.
[0223] In the specific implementation of this embodiment, after the object sets the input format for the theme color, the object will enter the color value of the color to be set as the theme color into the theme color value input area according to the determined target theme color format. Based on this, the server receives the input color value and uses the received color value as the first theme color value. For example, when the target theme color format is RGB format, the first theme color value is three numerical values. When the target theme color format is Hex format, the first theme color value is a hexadecimal number.
[0224] like Figure 8 As shown, after "Hex" is selected as the target theme color format, the subject enters "#07C160" in the theme color value input area, based on which the first theme color value of the first theme color is determined to be "#07C160".
[0225] Furthermore, after determining the first theme color value of the first theme color, the server first searches for a color that matches the first theme color value in the color representation model corresponding to the target theme color format, based on the target theme color format and the first theme color value. The server then uses the found color as the first theme color and displays the first theme color corresponding to the first theme color value in the sequential color display area.
[0226] like Figure 8 As shown, in the Hex format, the color with the first theme color value "#07C160" is green in the color representation model HSL. Based on this, a green square is displayed in the theme color display area.
[0227] Furthermore, in some embodiments, after an object sets a theme color, it may also set the number of colors in the Single Sequence Color Number Setting sub-area to determine the total number of colors to be included in the sequence color. Based on this, the server receives the color number setting operation, determines the total number of colors to be included in the sequence color of the first theme color based on the color number setting operation, and sets the number of colors in the sequence color of the first theme color to the first number. The first number is the value set by the object through the color number setting operation.
[0228] The advantage of this embodiment is that a theme color format selection control and a theme color value input area are provided for the object in the theme color editing sub-area, so that when the color format and color value of the theme color are known to the object, the theme color can be set in the first setting page in the form of numerical input, so that the server can determine the first theme color value according to the theme color set by the object, thereby improving the efficiency and accuracy of determining the first theme color value.
[0229] Please refer to Figure 9 In another embodiment, the process of determining the first theme color value of the first theme color may specifically include but is not limited to the following steps 910-930:
[0230] Step 910: In response to the sequence color generation request, display a first setting page;
[0231] Step 920: In response to triggering the theme color block selection area, display a plurality of candidate theme color blocks in the theme color block selection area;
[0232] Step 930 : Determine a first theme color value in response to selecting a candidate theme color block corresponding to the first theme color from among the plurality of candidate theme color blocks.
[0233] Steps 910-930 are described in detail below.
[0234] The specific implementation process of step 910 is similar to the specific implementation process of the above step 710, and will not be repeated here to save space.
[0235] In step 920 , in response to triggering the theme color block selection area, a plurality of candidate theme color blocks are displayed in the theme color block selection area.
[0236] The candidate theme color block refers to a color area that can be selected in the theme color block selection area. The color area indicated by each candidate theme color block represents a selectable color.
[0237] In this embodiment, when an object wishes to set a theme color by circling a color block, an interactive operation triggers the theme color block selection area. The server then displays multiple candidate theme color blocks in the theme color block selection area on the first setting page in response to the object's triggering of the theme color block selection area.
[0238] In step 930 , in response to selecting a candidate theme color block corresponding to the first theme color from among the plurality of candidate theme color blocks, a first theme color value is determined.
[0239] In this embodiment, after a subject selects a candidate color block from among multiple candidate color blocks, the server first responds to the subject's selection by setting the selected candidate color block to the color the subject desires to set as the theme color. Next, the server sets the selected candidate color block as the first theme color, sets the color value of the selected candidate color block as the first theme color value, and displays the first theme color in the sequential color display area.
[0240] like Figure 10 As shown, there is a circular color area and a square color area in the theme color block selection area. The circular color area and the shaped color area contain multiple candidate main color blocks. Among them, the object can select the color pointer (white circle) with the mouse in the theme color block selection area, and move the color pointer freely in the circular color area and the shaped color area. The candidate theme color block selected by the color pointer becomes the theme color circled by the object. Based on this, a color square consistent with the circled color is displayed in the theme color display area. In addition, the color value corresponding to the circled color will also be displayed in the theme value input area, and the various color component parameters of the circled color under the selected color representation model will be displayed in the color component parameter area.
[0241] The benefit of this embodiment is that the first settings page provides the user with a theme color selection area and multiple candidate theme colors. If the theme color to be selected is unclear, the user can freely circle the candidate theme color in the theme color selection area and select the color indicated by the circled candidate theme color as the first theme color. The server then determines the first theme color value based on the color circled by the user, which improves the flexibility and convenience of theme color setting.
[0242] In the actual setting process, in addition to setting the theme color through numerical input and circling a color block, the object may also want to fine-tune the originally determined theme color and use the new color obtained by fine-tuning as the theme color to obtain the corresponding sequence color. Based on this, the embodiment of the present disclosure provides a solution for fine-tuning the color based on the selection control of setting multiple color representation models to update the first theme color value. This can meet the color adjustment needs of the object under different color representation models, further improving the adjustment flexibility of the theme color and the accuracy of the first theme color value.
[0243] In an embodiment of the present disclosure, the sequential color parameter setting area includes a plurality of selection controls for color representation models.
[0244] The multiple color representation model selection control refers to an interactive control provided to an object to trigger the selection of different color representation models.
[0245] Please refer to Figure 11 In one embodiment, after step 620, the method for setting the interface sequential color may further include but is not limited to the following steps 1110-1120:
[0246] Step 1110: In response to a triggering operation on a selection control of a target color representation model among a plurality of color representation models, a color component parameter editing control corresponding to the triggered target color representation model is displayed in a sequential color parameter setting area;
[0247] Step 1120: In response to an editing operation on the color component parameter editing control, update the first theme color value.
[0248] Steps 1110 - 1120 are described in detail below.
[0249] In step 1110 , in response to a triggering operation on a selection control of a target color representation model among a plurality of color representation models, a color component parameter editing control corresponding to the triggered target color representation model is displayed in a sequential color parameter setting area.
[0250] The target color representation model refers to the color representation model selected by the object through a selection control of multiple color representation models.
[0251] A trigger action is an interaction between an object and a selection control of a color representation model.
[0252] The color component parameter editing control is an operation control provided to the object to change the parameters of each color component of the first theme color in the target color representation model. The color component parameter editing control can be a draggable value bar or a value input box for entering a specific value.
[0253] In a specific implementation of this embodiment, when an object wishes to fine-tune the current first theme color, it triggers a color model selection control from among multiple color representation model selection controls. Based on this, the server first responds to the object's triggering operation and determines the color representation model triggered by the object from among the multiple color representation models, obtaining the target color representation model. The server then displays the multiple color component parameter edit controls for the target color representation model in the sequential color parameter setting area.
[0254] In step 1120 , in response to an editing operation on the color component parameter editing control, the first theme color value is updated.
[0255] The color component parameter is used to indicate the parameter value of the first theme color in a certain color dimension under the target color representation model.
[0256] There will be certain differences in the color component parameters under different color representation models.
[0257] For example, when the color representation model is the RGB model, the color component parameters are R, G, and B. However, when the color representation model is the HSL model, the color classification parameters are the hue component L, the chroma component S, and the brightness component L.
[0258] In a specific implementation of this embodiment, when multiple color component parameter editing controls of the target color representation model are displayed in the sequential color parameter setting area, the color component parameters indicated by each color component parameter editing control are the color component parameters of the first theme color that have not yet been adjusted. Furthermore, when an object wants to change the value of a certain color component of the first theme color, the object will first edit the color component parameter editing control. At this time, the server will receive the color component parameters edited by the object, and then determine the adjusted color component parameters of the first theme color based on the color component parameters edited by the object, and update the first theme color value based on the adjusted color component parameters of the first theme color, and use the updated first theme color value for subsequent steps.
[0259] In addition, the server also sends the edited color classification parameters to the target terminal, so that the first theme color with the edited color component parameters is displayed in the sequential color display area.
[0260] like Figure 10As shown in the figure, the object has selected the selection control corresponding to the HSB model from the selection controls for multiple color representation models. At this time, the target color representation model is the HSB model. Based on this, the value bar and input box for color component parameter H, the value bar and input box for color component parameter S, and the value bar and input box for color component parameter B are displayed in the editing area of the color classification parameters. By dragging and dropping the value bars of each color component parameter, the object sets color component parameter H to 220, color component parameter S to 83, and color component parameter B to 94. Therefore, the first theme color after editing has a hue value of 220, a chroma value of 83, and a brightness value of 94.
[0261] The advantage of this embodiment is that color fine-tuning is performed based on setting selection controls for multiple color representation models and color component parameter editing areas corresponding to each color representation model. This can meet the color adjustment requirements of each color component of the object under different color representation models, and can achieve fine-grained and single-dimensional color adjustment under each color representation model, thereby further improving the adjustment flexibility of the theme color and the accuracy of the first theme color value.
[0262] A process for determining configuration parameters of sequential colors of a first theme color in one embodiment of the present disclosure
[0263] In order to make the brightness changes of the sequential colors of the displayed first theme color more uniform and to make the first theme color also be in the sequential colors, the embodiment of the present disclosure also provides various forms of parameter configuration areas in the first setting page, which can meet the needs for various configuration forms (including the setting of brightness range, the setting of the change trend of sequential colors, etc.), and also enable the object to flexibly adjust the sequential colors by adjusting various configuration parameters on the interface.
[0264] In the disclosed embodiment, the sequential color parameter setting area includes an Iteration Count editing subarea, which allows the subject to define the number of iterations for the color search process. To obtain higher-quality sequential colors, the subject can set the color search iteration count to a larger value.
[0265] In one embodiment, in the iteration number editing sub-area, the edited target iteration number is received, and the target iteration number is determined as the iteration number to be reached by the iteration sequence in the first process.
[0266] In a specific implementation of this embodiment, when an object wishes to control the color value accuracy of each color in a sequential color, the object enters the desired number of iterations in the Iterations edit subfield. Based on this, the server receives the target number of iterations entered by the object in the Iterations edit subfield and uses the target number of iterations as the number of iterations to be executed during the color search process of the sequential color generation method of this embodiment.
[0267] like Figure 12A The figure shows a schematic diagram of dividing a two-dimensional plane representing the correlation between brightness and chromaticity into 8×8 color blocks when the number of iterations is 3. Specifically, first, the two-dimensional plane is divided into 8×8 color blocks, where the color value corresponding to the center of each color block is used as a candidate color. Then, the 64 color blocks are screened and only the 49 color blocks that meet the requirements are displayed. 10 candidate colors are selected from the 49 color blocks as color search results, and the 10 color search results are numbered as sequential colors containing 10 first colors.
[0268] like Figure 12B The figure shows a schematic diagram of dividing a two-dimensional plane representing the correlation between brightness and chromaticity into 16×16 color blocks when the number of iterations is 4. Specifically, first, the two-dimensional plane is divided into 16×16 color blocks, where the color value corresponding to the center of each color block is used as a candidate color. Then, the 256 color blocks are screened, and only a portion of the color blocks that meet the requirements are displayed. 10 candidate colors are selected from the multiple retained color blocks as color search results, and the 10 color search results are numbered as sequential colors containing 10 first colors.
[0269] like Figure 12C The figure shows a schematic diagram of dividing a two-dimensional plane representing the correlation between brightness and chromaticity into 32×32 color blocks when the number of iterations is 5. Specifically, first, the two-dimensional plane is divided into 32×32 color blocks, where the color value corresponding to the center of each color block is used as a candidate color. Then, the 1024 color blocks are screened, and only a portion of the color blocks that meet the requirements are displayed. 10 candidate colors are selected from the multiple retained color blocks as color search results, and the 10 color search results are numbered as sequential colors containing 10 first colors.
[0270] like Figure 12D The figure shows a schematic diagram of dividing the two-dimensional plane representing the correlation between luminance and chromaticity into 64×64 color blocks when the number of iterations is 6. Next, the 4096 color blocks are screened, and only those that meet the requirements are displayed. Ten candidate colors are selected from the retained color blocks as color search results, and these 10 color search results are numbered as a sequence color containing 10 first colors.
[0271] like Figure 12EThe figure shows a schematic diagram of dividing the two-dimensional plane representing the correlation between luminance and chromaticity into 128×128 color blocks when the number of iterations is 5. Next, the 16,384 color blocks are screened, and only those that meet the requirements are displayed. Ten candidate colors are selected from the retained color blocks as color search results, and these 10 color search results are numbered as a sequence color containing 10 first colors.
[0272] By the above Figures 12A-12E From the comparison, we can see that as the number of iterations increases, the same two-dimensional plane is divided more finely, there are more color blocks for screening, and the accuracy of the color value corresponding to each color block will be higher. Therefore, as the number of iterations increases, it will be easier to obtain more accurate sequence colors.
[0273] It should be noted that, in the embodiment of the present disclosure, in order to improve the visualization of the entire sequential color generation, after the target number of iterations is set for the object, the first setting page will also display a two-dimensional plane schematic diagram after the target number of iterations, and the level number of each color and the color value of each color will be marked in sequence according to the level of each color of the sequential color.
[0274] The advantage of this embodiment is that an iteration number editing sub-area is provided in the first setting page, so that the object can set the iteration number according to actual needs, so that the server generates a sequence color that meets the requirements according to the target iteration number edited by the object, and the sequence color of the first theme color obtained after iterating with the target iteration number is displayed in the sequence color display area. The sequence color generation process can be flexibly controlled through the interface, thereby improving the controllability of the sequence color generation process.
[0275] In the embodiment of the present disclosure, the sequential color parameter setting area includes a chroma following parameter adjustment sub-area. The chroma following parameter adjustment sub-area is used to provide the object with input chroma following parameters to determine the relationship between chroma and brightness in the sequential color of the first theme color.
[0276] In a specific implementation of this embodiment, when a user wishes to adjust the relationship between chromaticity and luminance for each first color, the user edits new chromaticity tracking parameters in the Chromaticity Following Parameter Adjustment sub-area of the first settings page. Based on this, the server receives the edited chromaticity following parameters in response to the user's edit of the chromaticity following parameters in the Chromaticity Following Parameter Adjustment sub-area. The server then updates the predetermined relationship between luminance and chromaticity for each first color based on the received chromaticity following parameters.
[0277] like Figure 5AAs shown, the chroma following parameter adjustment subarea provides an input box for the chroma following parameter and a draggable value bar. When the subject drags the value bar, the value in the input box changes synchronously. Based on this, the subject can set the chroma following parameter to 70% by dragging the value bar in the chroma following parameter adjustment subarea. At this point, the server generates a sequential color based on the edited chroma following parameter and displays each first color of the sequential color in the sequential color display area.
[0278] The advantage of this embodiment is that a chromaticity following parameter adjustment sub-area is provided in the first setting page, so that the object can set the chromaticity following parameters according to actual needs, so that the server adjusts the sequence color according to the chromaticity following parameters edited by the object to reduce the degree of oversaturation of colors with lower brightness in the sequence color, thereby improving the quality of the sequence color.
[0279] In the embodiment of the present disclosure, the sequential color parameter setting area includes a brightness extreme value editing sub-area for providing an object with an input brightness extreme value to determine a brightness variation range of the first color in the sequential color of the first theme color.
[0280] In a specific implementation of this embodiment, when a user wishes to adjust the brightness range of a first color of a sequential color, the user edits the maximum and minimum brightness values that each first color of the sequential color must meet in the Brightness Extreme Value Editing sub-area of the first settings page. Based on this, the server receives the maximum and minimum brightness values edited by the user in response to the brightness parameter edit operation in the Brightness Extreme Value Editing sub-area, and then determines the brightness range of each first color of the sequential color based on the maximum and minimum brightness values.
[0281] like Figure 5A As shown, the brightness extreme value editing sub-area in the first setting page is located in the lower right part of the entire page. The brightness extreme value editing sub-area is marked with the words "Brightness Range" and provides a value bar with two draggable endpoints and two brightness value input boxes. When the object wants to adjust the brightness value range of each first color of the sequence color, the object can drag the left endpoint of the value bar in the brightness extreme value editing sub-area to control the minimum brightness value, and can also drag the right endpoint of the value bar to control the maximum brightness value. Based on this, the object controls the brightness range between 10 and 90 by adjusting the two endpoints on the value bar, so that the maximum brightness value is 90 and the minimum brightness value is 10.
[0282] The benefit of this embodiment is that a brightness extreme value editing sub-area is provided in the first setting page, so that the object can set the maximum brightness value and the minimum brightness value according to actual needs, so that the server adjusts the brightness of the first number of first colors in the sequence color according to the maximum brightness value and the minimum brightness value edited by the object, so as to achieve a uniform change in the brightness of the first number of first colors within the range defined by the maximum brightness value and the minimum brightness value, thereby improving the quality of the generated sequence color.
[0283] In order to overcome the shortcomings of the inflexible adjustment of the interface sequence color in the prior art, the embodiments of the present disclosure provide a theme color setting sub-area, a single sequence color number setting sub-area, and a sequence color display area on the first setting page. The theme color setting sub-area is used to set the theme color for the sequence color to be set. The single sequence color number setting sub-area is used to set the first number of first colors in the sequence color to be set for the theme color. After the theme color and the first number are set, the first number of first colors that are consistent with the color of the first theme color can be directly set, and the brightness difference between every two adjacent first colors is the same, that is, a sequence color that meets the requirements is formed. Compared with the inflexibility of the prior art through background algorithms or models, the embodiments of the present disclosure improve the flexibility of sequence color adjustment through the interface, and the interface makes it easy to improve the uniformity of the brightness differences of each color in the interface sequence color.
[0284] Detailed description of step 620
[0285] In step 620 , based on the received extreme brightness value and the first theme color value, a brightness value sequence corresponding to the sequential colors of the first theme color is determined, where the brightness value sequence is used to indicate the brightness value of each first color in the sequential colors.
[0286] In an embodiment of the present disclosure, the sequential color parameter setting area includes a built-in theme color enable control and a built-in sequence color enable control. The built-in theme color enable control is used to define the brightness value method of the first number of first colors of the sequential color. The built-in sequence color enable control is used to set the brightness change order of the sequential color for the object.
[0287] The enabled state and disabled state of the built-in enabled control of the theme color respectively correspond to a brightness value method preset in the server.
[0288] When the built-in theme color enable control is enabled, the brightness value of the first color in the sequential colors determined by the server usually includes the edited maximum and minimum brightness values. However, the first number of first colors in the sequential colors often does not include the first theme color. In this case, the object can further interact to determine whether to set the first theme color in the sequential colors.
[0289] When the built-in theme color enable control is not enabled, the brightness value of the first color in the sequence color determined by the server may not include the edited maximum brightness value and minimum brightness value, but the first number of first colors in the sequence color will often include the first theme color.
[0290] The process of determining the brightness value sequence according to the embodiment of the present disclosure will be described in detail below based on the triggering states of the built-in enabled control for theme color and the built-in enabled control for sequence color.
[0291] Please refer to Figure 13 In one embodiment, the brightness extremes include a maximum brightness value and a minimum brightness value. When the trigger state of the theme color built-in enabling control is triggered, step 620 may specifically include, but is not limited to, the following steps 1310-1330:
[0292] Step 1310: Determine a first brightness difference between adjacent first colors in the color sequence based on the maximum brightness value, the minimum brightness value, and the received first number;
[0293] Step 1320: Calculate multiple brightness values based on the minimum brightness value, the first brightness difference, and the first number;
[0294] Step 1330: Arrange the multiple brightness values into a brightness value sequence.
[0295] Steps 1310 - 1330 are described in detail below.
[0296] In step 1310 , a first brightness difference between adjacent first colors in the sequential color is determined based on the maximum brightness value, the minimum brightness value, and the received first number.
[0297] The first brightness difference is used to indicate the brightness difference between adjacent first colors in the color sequence.
[0298] The first number is used to indicate the color number of the first color in the sequential color.
[0299] In the specific implementation of this embodiment, if it is determined that the trigger state of the built-in activation control of the theme color is triggered, it indicates that it is necessary to divide the brightness corresponding to the first color of each level in the sequence color into fixed values according to the brightness range. Based on this, first, the maximum brightness value and the minimum brightness value are subtracted to obtain the brightness extreme difference. Then, the brightness extreme difference is divided by the result of subtracting 1 from the first number to obtain the first brightness difference. The first brightness difference can be expressed as shown in formula (1):
[0300]
[0301] Here, delta1 refers to the first brightness difference; count refers to the first number; range.max refers to the maximum brightness value; and range.min refers to the minimum brightness value.
[0302] In step 1320 , a plurality of luminance values are calculated based on the minimum luminance value, the first luminance difference, and the first number.
[0303] The multiple brightness values are used to indicate the brightness corresponding to each first color in the sequential color.
[0304] In the specific implementation of this embodiment, first, for the first color of each level in the sequential color, the level number of each level is sequentially determined as a positive integer in the range [0 to the first number minus 1]. Next, for the first color of each level in the sequential color, the minimum brightness value and the product of the level number and the first brightness difference are added to obtain the brightness value of the first color of that level. The brightness value of the first color of each level in the sequential color can be expressed as shown in formula (2):
[0305] a n =range.min+delta1*n formula (2)
[0306] Among them, a n Refers to the brightness value of the first color of the nth level in the sequential color, where n is a positive integer in the range [0, count-1].
[0307] In step 1330 , the plurality of luminance values are arranged into a luminance value sequence.
[0308] In a specific implementation of this embodiment, the trigger state of the built-in sequential color activation control is first determined. Next, if the built-in sequential color activation control is determined to be activated, the plurality of brightness values are arranged in descending order to obtain a brightness value sequence. If the built-in sequential color activation control is determined to be unactivated, the plurality of brightness values are arranged in ascending order to obtain a brightness value sequence.
[0309] like Figure 14 As shown, after brightness normalization, the brightness range in the embodiment of the present disclosure is [0,1], where 0 represents the darkest (pure black) and 1 represents the brightest (pure white). At this time, the maximum brightness value received from the first setting page is 0.9, and the minimum brightness value is 0.1; the first number received is 5; the trigger state of the built-in enable control of the sequence color is not triggered; and the trigger state of the built-in enable control of the theme color is triggered. At this time, the brightness range defined by the maximum brightness value and the minimum brightness value is range = [0.1, 0.9]. Based on this, first, the first brightness difference is calculated as Furthermore, for each color in the sequence, the range of the level number is determined to be n∈[0,4]. Then, for each color in the sequence, the brightness value of the first color corresponding to each level is calculated in ascending order of the level number:
[0310] a0=0.1; a1=0.3; a2=0.5; a3=0.7; a4=0.9;
[0311] Based on this, the brightness value sequence is determined to be [0.1, 0.3, 0.5, 0.7, 0.9].
[0312] The benefit of this embodiment is that when an object triggers the built-in activation control for the theme color, the brightness values of the first colors at each level in the sequence color are fixedly divided according to the brightness range determined by the maximum brightness value and the minimum brightness value, as well as the first number. This method ensures that the brightness value of the first color at the first position among the multiple first colors of the sequence color is equal to the maximum brightness value or the minimum brightness value, and that the brightness value of the first color at the last position is equal to the minimum brightness value or the minimum brightness value. In addition, this method also ensures that the brightness values of the first colors at the same level of the sequence colors corresponding to the first theme colors of different hues remain equal, so that the first colors at the same level of the sequence colors corresponding to the first theme colors of different hues meet the brightness consistency requirement.
[0313] Please refer to Figure 15 In another embodiment, the brightness extremes include a maximum brightness value and a minimum brightness value; when the trigger state of the theme color built-in enabling control is not triggered, step 620 may specifically include but is not limited to the following steps 1510-1560:
[0314] Step 1510: Determine a first brightness value of the first theme color based on the first theme color value;
[0315] Step 1520: Determine a second brightness difference between adjacent first colors in the color sequence based on the maximum brightness value, the minimum brightness value, and the received first number;
[0316] Step 1530: Divide the brightness range determined by the maximum brightness value and the minimum brightness value into a plurality of candidate brightness intervals based on the second brightness difference and the first number;
[0317] Step 1540: Determine a brightness offset based on the first brightness value and the candidate brightness interval in which the first brightness value is located;
[0318] Step 1550: Calculate a plurality of brightness values based on the brightness offset, the minimum brightness value, and the first number;
[0319] Step 1560: Arrange the multiple brightness values into a brightness value sequence.
[0320] Steps 1510-1560 are described in detail below.
[0321] In step 1510 , a first brightness value of the first theme color is determined based on the first theme color value.
[0322] The first brightness value of the first theme color is used to indicate the color component of the first theme color in the brightness dimension.
[0323] In the specific implementation of this embodiment, if the trigger state of the built-in activation control for the theme color is determined to be untriggered, it indicates that the brightness value of the first color at each level in the sequential color sequence needs to be dynamically determined based on the first theme color's position in the entire brightness range [0, 1] and the brightness value range determined by the maximum and minimum brightness values, so that the first theme color can exist in the sequential color sequence. Based on this, the first theme color value of the first theme color is first determined. Then, based on the first theme color value, the color component of the first theme color in the brightness dimension is determined, and the obtained color component is used as the first brightness value.
[0324] To save space, the specific implementation process of determining the first brightness value of the first theme color based on the first theme color value in the embodiment of the present disclosure will be described in detail below and will not be repeated here.
[0325] In step 1520 , a second brightness difference between adjacent first colors in the sequential color is determined based on the maximum brightness value, the minimum brightness value, and the received first number.
[0326] The second brightness difference is used to indicate the brightness difference between adjacent first colors in the color sequence.
[0327] The first number is used to indicate the color number of the first color in the sequential color.
[0328] In the specific implementation of this embodiment, first, the maximum brightness value and the minimum brightness value are subtracted to obtain the brightness extreme difference. Then, the brightness extreme difference is divided by the first number to obtain the second brightness difference. The second brightness difference can be expressed as shown in formula (3):
[0329]
[0330] Among them, delta2 refers to the second brightness difference; count refers to the first number; range.max refers to the maximum brightness value; range.min refers to the minimum brightness value.
[0331] In step 1530 , based on the second brightness difference and the first number, the brightness range determined by the maximum brightness value and the minimum brightness value is divided into a plurality of candidate brightness intervals.
[0332] The candidate brightness intervals are used to indicate the brightness ranges of the first color for each level in the sequential color selection, initially divided based on the first brightness value, maximum brightness value, and minimum brightness value of the first theme color when the built-in theme color enable control is not triggered. The number of candidate brightness intervals is the same as the first number.
[0333] In the specific implementation of this embodiment, for each candidate brightness interval, first, based on the second brightness difference, the previous sequence number of the first color corresponding to the candidate brightness interval in the color sequence, and the minimum brightness value, the minimum brightness value corresponding to the candidate brightness interval is determined, where the minimum brightness value corresponding to the m-th candidate brightness interval is range.min+(m–1)*delta2, and m is an integer in the value range of [1, count]. Next, based on the second brightness difference, the sequence number of the first color corresponding to the candidate brightness interval in the color sequence, and the minimum brightness value, the maximum brightness value corresponding to the candidate brightness interval is determined, where the minimum brightness value corresponding to the m-th candidate brightness interval is range.min+m*delta2. Based on this, the m-th candidate brightness interval can be expressed as follows:
[0334] [range.min+(m–1)*delta2, range.min+m*delta2].
[0335] In step 1540 , a brightness offset is determined based on the first brightness value and the candidate brightness interval in which the first brightness value is located.
[0336] The brightness offset is used to indicate the degree of offset between the candidate brightness interval and the brightness intervals to which the first colors of the sequential color sequence correspond.
[0337] In a specific implementation of this embodiment, when the first brightness value is between the maximum brightness value and the minimum brightness value, a candidate brightness interval for the first theme color is determined from among multiple candidate brightness intervals. Next, the difference between the smaller endpoint of the candidate brightness interval in which the first brightness value is located and the first brightness value is calculated, and the calculated difference is used as the brightness offset.
[0338] In other embodiments, when the first brightness value is greater than or equal to the maximum brightness value, the maximum brightness value is used as the brightness value for calculating the brightness offset. Since the maximum brightness value is the endpoint value of the candidate brightness interval, the difference between the brightness value used to calculate the brightness offset (the maximum brightness value) and the smaller endpoint value of the candidate brightness interval is the second brightness difference, which is used as the brightness offset. Therefore, when the first brightness value is greater than or equal to the maximum brightness value, the brightness offset offset = the second brightness difference delta2.
[0339] In other embodiments, when the first brightness value is less than or equal to the minimum brightness value, the minimum brightness value is used as the brightness value for calculating the brightness offset. Since the minimum brightness value is the endpoint value of the candidate brightness interval, the difference between the brightness value used to calculate the brightness offset (the minimum brightness value) and the smaller endpoint value (the minimum brightness value) of the candidate brightness interval is 0, and 0 is used as the brightness offset. Therefore, when the first brightness value is less than or equal to the maximum brightness value, the brightness offset offset = 0.
[0340] In step 1550, a plurality of luminance values are calculated based on the luminance offset, the minimum luminance value, and the first number.
[0341] In the specific implementation of this embodiment, first, for the first color of each level in the sequential color, the level number of each level is sequentially determined as a positive integer in the range [0, the first number minus 1]. Next, for the first color of each level in the sequential color, the minimum brightness value, the brightness offset, and the product of the level number and the second brightness difference are added to obtain the brightness value of the first color of that level. The brightness value of the first color of each level in the sequential color can be expressed as shown in formula (4):
[0342] a n =range.min+offset+delta2*n Formula (4)
[0343] Where n is the level number of each first color in the sequence color. When the level number n of the first color is 1, it means that the first color is the second color in the sequence color. n Refers to the brightness value of the first color in the nth level of the sequential color.
[0344] In step 1560 , the plurality of luminance values are arranged into a luminance value sequence.
[0345] In the specific implementation of this embodiment, the specific implementation process of step 1560 is similar to the specific implementation process of the above-mentioned step 1330. To save space, it is not repeated here.
[0346] It should be noted that when the first brightness value is less than or equal to the minimum brightness value, the brightness value sequence often does not contain the first brightness value corresponding to the first theme color. In this case, the minimum brightness value in the brightness value sequence is replaced with the first brightness value. When the first brightness value is greater than or equal to the maximum brightness value, the brightness value sequence often does not contain the first brightness value corresponding to the first theme color. In this case, the maximum brightness value in the brightness value sequence is replaced with the first brightness value, so that no matter what the first brightness value is, the first theme color can exist in the final sequence color.
[0347] like Figure 16 As shown, after brightness normalization, the brightness range in the embodiment of the present disclosure is [0,1], where 0 represents the darkest (pure black) and 1 represents the brightest (pure white). At this time, the maximum brightness value received from the first setting page is 0.9, and the minimum brightness value is 0.1; the first number received is 5; the trigger state of the built-in enable control of the sequence color is not triggered; and the trigger state of the built-in enable control of the theme color is not triggered. At this time, the brightness range defined by the maximum brightness value and the minimum brightness value is range = [0.1, 0.9]. When the first brightness value L of the first theme color is 0.7, the second brightness difference is calculated to be delta2 = (0.9-0.1) / 5 = 0.16. Next, based on the second brightness difference, the brightness range defined by the maximum brightness value and the minimum brightness value is divided into five candidate brightness intervals, namely [0.1, 0.26], [0.26, 0.42], [0.42, 0.58], [0.58, 0.74], and [0.74, 0.9]. Furthermore, since the first brightness value L = 0.7 of the first theme color is within the candidate brightness interval [0.58, 0.74], the brightness offset is calculated as offset = 0.7 - 0.58 = 0.12. Next, based on the calculated brightness offset, the second brightness difference, and the minimum brightness value, the brightness values of the five first colors in the sequence color are determined in sequence:
[0348] a0=0.22; a1=0.38; a2=0.54; a3=0.7; a4=0.86;
[0349] Based on this, the brightness value sequence is determined to be [0.22, 0.38, 0.54, 0.7, 0.86].
[0350] The advantage of this embodiment is that when the trigger state of the built-in enabling control of the theme color is not triggered, the brightness value of the first color at each level in the sequence color is dynamically determined according to the position of the first theme color in the entire brightness range and the brightness value range determined by the maximum brightness value and the minimum brightness value. According to the range of the first brightness value of the first theme color, a brightness offset is calculated to fine-tune the preliminarily determined candidate brightness interval, and the same endpoint values of multiple fine-tuned candidate brightness intervals are determined as a brightness value sequence, so that the first theme color can exist in the sequence color. At the same time, the brightness difference of adjacent first colors in the sequence color can be made equal to the second brightness difference, so that the color change of the generated sequence color of the first theme color is more uniform.
[0351] The brightness calculation process of the embodiment of the present disclosure is mainly to generate a brightness value in the range of [0,1] by inputting a color value. Generally, when the brightness value is 0, the represented color is pure black; when the brightness value is 1, the represented color is pure white. As the brightness value increases, the color becomes evenly brighter. The brightness calculation process of the embodiment of the present disclosure can rely on commonly used brightness calculation methods without special restrictions, wherein commonly used brightness calculation methods include but are not limited to W3C Relative Luminance, HSP Lightness, etc.
[0352] Please refer to Figure 17 In one embodiment, the process of determining the first brightness value of the first theme color based on the first theme color value may include, but is not limited to, the following steps 1710-1740:
[0353] Step 1710: Perform a linear transformation on the first theme color value to obtain a first color component, a second color component, and a third color component of the first theme color;
[0354] Step 1720: Obtain a relative brightness value of the first theme color based on a weighted sum of the first color component, the second color component, and the third color component;
[0355] Step 1730: Perform a first grayscale conversion on the relative brightness value to obtain a preliminary brightness value of the first theme color;
[0356] Step 1740: Perform a second grayscale conversion on the preliminary brightness value based on the received grayscale adjustment coefficient to obtain a first brightness value.
[0357] Steps 1710-1740 are described in detail below.
[0358] In step 1710 , a linear transformation is performed on the first theme color value to obtain a first color component, a second color component, and a third color component of the first theme color.
[0359] The first color component, the second color component, and the third color component are used to indicate color components of the first theme color in three different dimensions.
[0360] In the specific implementation of this embodiment, the color component values indicated by the first theme color value in each dimension are first determined to obtain the first color component value, the second color component value, and the third color component value. Then, for the color component values in each dimension, the color component values are linearly transformed to obtain the color component corresponding to the color component value in that dimension, thereby obtaining the first color component, the second color component, and the third color component of the first theme color.
[0361] Specifically, in the embodiment of the present disclosure, the first theme color value of the first theme color can be a color-normalized sRGB value (r, g, b), and the value range of each component value of the first theme color value is [0, 1]. First, for the first color component value r, a linear transformation is performed according to the following formula to determine the first color component r corresponding to the first color component value r: linear .
[0362]
[0363] Similarly, linear transformation is performed on the second color component value g and the third color component value b to obtain the second color component g linear , and the third color component b linear .
[0364] In step 1720 , a relative brightness value of the first theme color is obtained based on a weighted sum of the first color component, the second color component, and the third color component.
[0365] The relative brightness value is used to indicate the relative brightness of the first theme color.
[0366] In a specific implementation of this embodiment, first, a first weight, a second weight, and a third weight are determined, wherein the first weight is used to indicate the importance of the first color component in calculating the relative brightness, the second weight is used to indicate the importance of the second color component in calculating the relative brightness, and the third weight is used to indicate the importance of the third color component in calculating the relative brightness, and the sum of the first weight, the second weight, and the third weight is 1. Next, the product of the first weight and the first color component, the product of the second weight and the second color component, and the product of the third weight and the third color component are added to obtain the relative brightness value of the first theme color.
[0367] For example, when the first weight is 0.2126, the second weight is 0.7512, and the third weight is 0.0722, the relative brightness value L of the first theme color is ′ It can be expressed as
[0368] L ′ =0.2126r linear +0.7152g linear +0.0722b linear .
[0369] In step 1730 , a first grayscale conversion is performed on the relative brightness value to obtain a preliminary brightness value of the first theme color.
[0370] The preliminary brightness value is used to indicate the brightness of the first theme color after a brightness and darkness distribution optimization.
[0371] In the specific implementation of this embodiment, first, a preset grayscale adjustment coefficient is determined. Then, an exponential calculation is performed using the relative brightness value as a base and the reciprocal of the received grayscale adjustment coefficient as an exponent to obtain a calculation result, which is used as the preliminary brightness value.
[0372] For example, when the preset grayscale adjustment coefficient is a value set according to the sRGB color space, the preset grayscale adjustment coefficient is 2.2. Based on this, the preliminary brightness value L0 can be expressed as L0=(L ′ ) 1 / 2.2 .
[0373] In step 1740 , a second grayscale conversion is performed on the preliminary brightness value based on the received grayscale adjustment coefficient to obtain a first brightness value.
[0374] The received grayscale adjustment coefficient refers to the grayscale adjustment coefficient edited by the object through the first setting page. For example, Figure 5A The grayscale adjustment coefficient gamma is 1.
[0375] In the specific implementation of this embodiment, first, the reciprocal of the received grayscale adjustment coefficient is determined. Then, the preliminary brightness value is used as the base and the reciprocal of the received grayscale adjustment coefficient is used as the exponent to perform exponential calculation to obtain the calculation result, and the calculation result is used as the first brightness value. The first brightness value L can be expressed as L = (L0) 1 / gamma .
[0376] like Figure 18A The figure below shows a graph showing how the first brightness value changes as the preliminary brightness value changes when the grayscale adjustment coefficient is 0.5. Specifically, as the preliminary brightness value increases, the first brightness value approaches 1 more quickly, indicating that a larger first brightness value makes the first theme color brighter. Therefore, when the grayscale adjustment coefficient is 0.5, the brightness of the first color in the sequence color increases, and the sequence color tends to converge toward brighter areas.
[0377] like Figure 18BThe figure below shows a graph showing how the first brightness value changes as the preliminary brightness value changes when the grayscale adjustment coefficient is 2. Specifically, the smaller the preliminary brightness value, the faster the first brightness value approaches 0, indicating that a smaller first brightness value makes the first theme color darker. Therefore, when the grayscale adjustment coefficient is 2, the smaller the brightness of the first color in the sequence color, the more the sequence color will converge into a darker area.
[0378] like Figure 18C The following table shows the sequence colors when the first theme color is blue and the grayscale adjustment coefficients are 0.5, 1, and 2. When the grayscale adjustment coefficient is less than 1, the sequence colors will be brighter overall; when the grayscale adjustment coefficient is greater than 1, the sequence colors will be darker overall.
[0379] By setting the grayscale adjustment coefficient, you can flexibly control the overall brightness and darkness of the sequence color. For example, in dark mode, due to the dark background color, the visual perception tends to be better for the darker foreground colors. Based on this, you can increase the grayscale adjustment coefficient value to make the sequence color have richer dark areas.
[0380] The benefit of this embodiment is that brightness calculation is independent of other execution processes and does not restrict the specific brightness calculation method, which can increase the flexibility of calculating the first brightness value of the first theme color. In addition, the disclosed embodiment also provides an editing area for grayscale adjustment coefficients on the first settings page, allowing the object to freely adjust the distribution of the sequence color in the dark or bright areas, and can better optimize the darker first color in the sequence color, thereby improving the color quality of the sequence color.
[0381] Detailed description of step 630
[0382] In step 630, based on the first theme color value, a projection result of the first theme color on a preset two-dimensional plane is determined, and based on the projection result and the received chromaticity following parameter, a brightness sequence extension line corresponding to the sequential color is determined in the two-dimensional plane. The two-dimensional plane is used to indicate the relationship between the chromaticity and brightness of each first color.
[0383] Because a high-quality sequential color has a regular pattern in the brightness and chromaticity of the multiple first colors it contains, the pattern often follows: when brightness decreases uniformly, chromaticity increases uniformly, thus achieving the effect of uniform brightness / chromaticity changes in the sequential color. Based on this, the disclosed embodiments provide a solution for determining the extension line of the sequential color based on a two-dimensional plane that can characterize the correlation between brightness and chromaticity, combined with a plane coordinate system. This solution can use the brightness sequence extension line to specify the generation direction of more first colors in the sequential color, accelerate the progress of color search calculations, and improve the efficiency and accuracy of sequential color generation.
[0384] Please refer to Figure 19 In one embodiment, step 630 may include, but is not limited to, the following steps 1910-1940:
[0385] Step 1910: construct a two-dimensional coordinate system based on the two-dimensional plane;
[0386] Step 1920: Determine a first coordinate point corresponding to the projection result in the two-dimensional coordinate system;
[0387] Step 1930: Determine a preliminary brightness extension line based on an intersection relationship between a connecting line between the first coordinate point and a predetermined coordinate point in the two-dimensional coordinate system and a predetermined straight line in the two-dimensional coordinate system;
[0388] Step 1940: Based on the chroma following parameter, the preliminary luminance extension line is corrected to obtain a luminance sequence extension line.
[0389] Steps 1910-1940 are described in detail below.
[0390] In step 1910, a two-dimensional coordinate system is constructed based on the two-dimensional plane.
[0391] The two-dimensional coordinate system is a coordinate system with chromaticity as the horizontal axis and brightness as the vertical axis.
[0392] Since in each color space, after color normalization, the range of chromaticity and brightness is [0, 1], a two-dimensional plane appears as a square with a side length of 1 in a two-dimensional coordinate system, containing multiple color points with certain chromaticity and brightness.
[0393] In the specific implementation of this embodiment, first, in a two-dimensional plane, the position of the candidate color with chroma 0 and brightness 0 is used as the origin. Then, a two-dimensional coordinate system is constructed with chroma as the horizontal axis and brightness as the vertical axis.
[0394] In step 1920, a first coordinate point corresponding to the projection result is determined in a two-dimensional coordinate system.
[0395] The first coordinate point is used to indicate the position of the first theme color in the two-dimensional plane.
[0396] In the specific implementation of this embodiment, first, the chromaticity value and brightness value corresponding to the projection result are determined. Then, the chromaticity value is used as the horizontal coordinate and the brightness value is used as the vertical coordinate. The coordinate point that meets these horizontal and vertical coordinate requirements is used as the first coordinate point.
[0397] like Figure 20AAs shown, in a two-dimensional coordinate system with chromaticity S as the horizontal axis and luminance L as the vertical axis, the two-dimensional plane is a square area in the two-dimensional coordinate system. Specifically, the first coordinate point P falls within the square area defined by the two-dimensional plane.
[0398] In step 1930 , a preliminary brightness extension line is determined based on an intersection relationship between the first coordinate point, a connecting line between a predetermined coordinate point in the two-dimensional coordinate system, and a predetermined straight line in the two-dimensional coordinate system.
[0399] The predetermined coordinate point refers to a coordinate point where the chromaticity value is 1 and the luminance value is 0, and a coordinate point where the chromaticity value is 0 and the luminance value is 1 in the two-dimensional coordinate system.
[0400] The predetermined straight line refers to a straight line whose luminance value is equal to 0 and a straight line whose chrominance value is equal to 1 in the two-dimensional coordinate system.
[0401] The preliminary brightness extension line is used to indicate a preliminary change trend of the brightness of a plurality of first colors in the sequential color.
[0402] In the specific implementation of this embodiment, first, the first coordinate point is connected to the coordinate point with a chromaticity value of 0 and a luminance value of 1 (the first predetermined coordinate point) to form a first line segment with the first coordinate point and the first predetermined coordinate point as endpoints. Next, the connected first line segment is extended along the direction from the first predetermined coordinate point to the first coordinate point, so that the extended first line segment intersects with a line with a chromaticity value of 1 or a line with a luminance value of 0, thereby obtaining an intersection point. Furthermore, the intersection point is connected to the coordinate point with a chromaticity value of 1 and a luminance value of 0 to form a second line segment. Finally, the first line segment and the second line segment serve as the preliminary luminance extension line.
[0403] like Figure 20B As shown, when the hue is 1, in a two-dimensional coordinate system with chromaticity S on the horizontal axis and luminance L on the vertical axis, the predetermined coordinate points are W(0,1) and B(1,0); the predetermined lines are L = 0 and S = 1. Based on this, first connect points P and W to form a first line segment WP. Next, extend the first line segment WP so that it intersects the predetermined line S = 1. The line segment from the intersection to point B and the first line segment WP serve as the preliminary luminance extension line.
[0404] like Figure 20C As shown, when the hue is Hue 2, in a two-dimensional coordinate system with chroma S on the horizontal axis and luminance L on the vertical axis, the predetermined coordinate points are W(0,1) and B(1,0); the predetermined lines are L = 0 and S = 1. Based on this, first connect points P and W to form a first line segment WP. Next, extend the first line segment WP so that it intersects the predetermined line L = 0. The line segment from the intersection to point B and the first line segment WP serve as the preliminary luminance extension line.
[0405] In step 1940, the preliminary luminance extension line is corrected based on the chrominance tracking parameter to obtain a luminance sequence extension line.
[0406] The Chroma Following Parameters are edited by the object in the first setting page. If the object does not edit or modify the Chroma Following Parameters, the Chroma Following Parameters are the default values preset by the relevant personnel.
[0407] In the disclosed embodiment, the value range of the chroma following parameter is a floating point number between [0, 1].
[0408] In a specific implementation of this embodiment, since the brightness extension line is determined solely based on a two-dimensional plane, predetermined coordinate points, and a predetermined line, using a candidate color from the brightness extension line as the first color in the sequence color often results in a large saturation gradient for the sequence color, causing the first color after the first theme color in the generated sequence color to be oversaturated. Based on this, the server adjusts the preliminary brightness extension line based on the received chroma tracking parameter, so that the first color after the first theme color in the generated sequence color more closely matches the saturation of the first theme color. Specifically, the connecting line formed between the intersection of the first line segment and the predetermined line and the first coordinate point is first determined as a third line segment. Next, the third line segment is multiplied by the chroma tracking parameter to obtain an adjustment offset. Furthermore, based on the adjustment offset, the line segment formed between the predetermined coordinate point with a chroma value of 0 and a luminance value of 1 and the intersection point is subtracted by the adjustment offset to obtain a new line segment. The endpoint of the new line segment, which is different from the predetermined coordinate point with a chroma value of 0 and a luminance value of 1, is recorded as the second coordinate point. Furthermore, a fourth line segment is formed by connecting the second coordinate point and a predetermined coordinate point having a chromaticity value of 1 and a brightness value of 0. Finally, the first line segment and the fourth line segment are used as brightness sequence extension lines.
[0409] like Figure 20D As shown, in actual applications, the saturation and brightness of the first theme color are often not too low at the same time, so the first theme color is often located above the line S = -L + 1. However, according to the changing trend of the preliminary brightness extension line, there is a clear range of high saturation (the circled area in the figure). If a candidate color in this high saturation range is selected as the first color of the sequence color, it will often lead to oversaturation of the sequence color.
[0410] like Figure 20E The figure shows an oversaturated first color in a color sequence. When the first theme color is red, the first theme color is at the third level of the color sequence, and the multiple consecutive first colors after this level are all oversaturated red.
[0411] like Figure 20FAs shown, the intersection of the first line segment WP and S = 1 is point I. Starting from point I, move a distance d(P, I) × the chromaticity following parameter toward the first coordinate point P to obtain a new line segment, WO. Furthermore, connect points O and B to form line segment OB. Line segment WO + OB is used as the final extension line of the luminance sequence. Here, d(P, I) is the Euclidean distance from point P to point I.
[0412] Specifically, when the chroma following parameter is 1, it is the maximum optimization of the darker first color part in the sequence color, and the brightness sequence extension line degenerates into the lowest saturation reference line (the combination of the line segments formed by the two predetermined coordinates and the first coordinate point), that is, Figure 20F Line segment WP and line segment PB in.
[0413] When the chroma follow parameter is 0, it means that the dark part of the sequence color is not optimized, and the initial brightness extension line at this time is the brightness sequence extension line. Figure 20F Line segment WI and line segment IB in.
[0414] like Figure 20G The figure below shows a comparison of sequential colors based on different chroma following parameters. When the hue is red, the first color after the first theme color in the sequential color with a chroma following parameter of 0 shows obvious oversaturation. However, when the chroma following parameter is 0.7 or 1, there is no obvious oversaturation in the sequential colors, and the color transitions in the sequential colors become more uniform.
[0415] The advantage of this embodiment is that the hue of the first theme color and the sequence color is used as a fixed dimension, and a two-dimensional plane composed of chromaticity and brightness is constructed based on the change law of the brightness and chromaticity of the first theme color and the sequence color. The correlation between brightness and chromaticity is characterized by a two-dimensional coordinate system constructed based on the two-dimensional plane, and the first theme color is projected into a coordinate point on the two-dimensional coordinate system. Therefore, according to the connecting line formed by the coordinate point projected by the first theme color and the predetermined coordinate, and the intersection relationship between the connecting line and the predetermined straight line, the extension line where the sequence color is located is determined, which can convert complex color space problems into relatively simple mathematical plane geometry problems, improve the efficiency of determining the brightness sequence extension line, and the efficiency of generating sequence colors. In addition, the embodiment of the present disclosure also takes into account the problem of color oversaturation of sequence colors, and provides a solution based on the correlation between chromaticity and brightness, and using chromaticity following parameters to further optimize the brightness sequence extension line, which can effectively reduce the degree of oversaturation of the sequence color finally generated, and improve the quality and aesthetics of the sequence color. Since the brightness sequence extension line is a continuous straight line, it can specify the generation direction of more first colors in the sequential color, and the sequential colors determined according to the first number are often discrete points on the brightness sequence extension line. Therefore, after determining the brightness sequence extension line corresponding to the first theme color, when changing the value of the first number, the color search is performed directly based on the brightness sequence extension line, which accelerates the progress of the color search calculation and can further improve the efficiency of sequential color generation.
[0416] In order to further improve the smoothness of the sequential color in saturation, based on this, the embodiment of the present disclosure provides a solution for correcting the preliminary brightness extension line based on nonlinear interpolation, which can improve the smoothness of the sequential color in saturation and further improve the color change uniformity of the sequential color.
[0417] Please refer to Figure 21 In one embodiment, step 1940 may include, but is not limited to, the following steps 2110-2120:
[0418] Step 2110: Correct the preliminary brightness extension line based on the chromaticity tracking parameter to obtain a corrected preliminary brightness extension line.
[0419] Step 2120: interpolate the corrected preliminary brightness extension line to obtain a brightness sequence extension line.
[0420] Steps 2110-2120 are described in detail below.
[0421] In step 2110 , the preliminary luminance extension line is corrected based on the chromaticity tracking parameter to obtain a corrected preliminary luminance extension line.
[0422] In the specific implementation of this embodiment, the specific implementation process of step 2110 is similar to the specific implementation process of the above-mentioned step 1940. To save space, it is not repeated here.
[0423] In step 2120, the corrected preliminary brightness extension line is interpolated to obtain a brightness sequence extension line.
[0424] In the specific implementation of this embodiment, multiple commonly used nonlinear interpolation algorithms such as Bessel interpolation are used to sequentially interpolate multiple line segment points in the corrected preliminary brightness extension line, and the corrected preliminary brightness extension line composed of line segment points is converted into a brightness sequence extension line in the form of a curve.
[0425] like Figure 22 The figure shows a comparison diagram of the brightness sequence extension line processed by the nonlinear interpolation algorithm and the corrected initial brightness extension line (line segment W0 and line segment OB). The brightness sequence extension line in the form of a curve is a Bezier curve formed by sequentially interpolating the line segment points W, P, and O, or sequentially interpolating the line segment points W, O, and B.
[0426] The advantage of this embodiment is that the preliminary brightness extension line is corrected based on a nonlinear interpolation method. After the preliminary brightness extension line is corrected using the chromaticity following parameter, the corrected preliminary brightness extension line is interpolated using a commonly used interpolation algorithm, so that the brightness extension line in the form of a broken line is transformed into a curve form, which can improve the smoothness of the sequential color in saturation and further improve the uniformity of the color change of the sequential color.
[0427] Detailed description of step 640
[0428] In step 640 , a color search is performed in a two-dimensional plane based on the brightness value sequence and the brightness sequence extension line to obtain a first color corresponding to each brightness value in the brightness value sequence.
[0429] In the specific implementation of this embodiment, step 640 includes but is not limited to the following steps:
[0430] Based on a predetermined color search rule, a brightness value sequence, and an extension line of the brightness sequence, a color search is performed in a two-dimensional plane to obtain a plurality of color search results corresponding to each brightness value in the brightness value sequence;
[0431] For each brightness value, a first color corresponding to the brightness value is determined based on a plurality of color search results corresponding to the brightness value.
[0432] The color search in the disclosed embodiments is performed based on a predetermined color search rule. The predetermined color search rule refers to a spatial quartering search method for a two-dimensional plane, which involves continuously dividing the two-dimensional plane into four equal parts in each iteration and screening candidate colors for each of the divided local spaces.
[0433] Each color search result is used to indicate a candidate color region on the two-dimensional plane.
[0434] Specifically, during the color search process, multiple color search results corresponding to each brightness value in the brightness value sequence are obtained. Each color search result indicates a candidate color region on a two-dimensional plane. Furthermore, for each brightness value, the multiple color search results corresponding to the brightness value are aggregated to obtain a unique search result. Next, the brightness and chromaticity corresponding to the unique search result on the two-dimensional plane are integrated with the fixed hue to obtain the color value of the first color corresponding to the brightness value, thereby determining the first color based on the color value.
[0435] To save space, the color search and the process of aggregating multiple color search results for each brightness value in the embodiment of the present disclosure will be described in detail below and will not be repeated here.
[0436] In order to more quickly determine the color search results corresponding to each brightness value in the brightness value sequence, the embodiment of the present disclosure provides a color search solution based on spatial quartering, which can improve the determination efficiency and accuracy of the color search results.
[0437] Please refer to Figure 23 In one embodiment, the process of performing a color search in a two-dimensional plane may include, but is not limited to, the following steps 2310-2330:
[0438] Step 2310: Initialize the iteration number to 1;
[0439] Step 2320: Execute the first process, which includes:
[0440] Based on a predetermined color search rule, the two-dimensional plane is spatially divided into four equal parts to obtain a first array;
[0441] For each preliminary search result, determining a candidate color corresponding to the preliminary search result in a two-dimensional plane based on vertex coordinates of a square area corresponding to the preliminary search result;
[0442] Based on a comparison of the second brightness value of each candidate color with each brightness value in the brightness value sequence, screening out an intermediate search result corresponding to each brightness value from a plurality of preliminary search results;
[0443] For each brightness value, based on the positional relationship between each intermediate search result and the brightness sequence extension line on the two-dimensional plane, determine the color search result corresponding to the brightness value from the multiple intermediate search results;
[0444] Step 2330: Increase the iteration number by 1, and repeat the first process until the iteration number is consistent with the received iteration parameter, and obtain multiple color search results corresponding to each brightness value.
[0445] Steps 2310-2330 are described in detail below.
[0446] In step 2310, the iteration number is initialized to 1.
[0447] The iteration number is used to mark and distinguish each iteration round.
[0448] In the specific implementation of this embodiment, the iteration number is initialized to 1 during the first iteration.
[0449] In step 2320, a first process is executed, which includes:
[0450] Based on a predetermined color search rule, the two-dimensional plane is spatially divided into four equal parts to obtain a first array;
[0451] For each preliminary search result, determining a candidate color corresponding to the preliminary search result in a two-dimensional plane based on vertex coordinates of a square area corresponding to the preliminary search result;
[0452] Based on a comparison of the second brightness value of each candidate color with each brightness value in the brightness value sequence, screening out an intermediate search result corresponding to each brightness value from a plurality of preliminary search results;
[0453] For each brightness value, based on the positional relationship between each intermediate search result and the brightness sequence extension line on the two-dimensional plane, a color search result corresponding to the brightness value is determined from the plurality of intermediate search results.
[0454] The first array is used to store the local spatial regions obtained after spatially dividing the two-dimensional plane into four equal parts, and each local spatial region obtained by the equal division is used as a preliminary search result, and each preliminary search result corresponds to a square area on the two-dimensional plane.
[0455] In the disclosed embodiment, each search result (including the preliminary search result, the intermediate search result, and the color search result) has a data field r. The data field includes the coordinates (x, y) of the lower left corner of the search result, the width w of the search result, and the level n of the brightness value corresponding to the search result in the brightness value sequence.
[0456] The predetermined color search rule is used to limit the use of an iterative algorithm based on spatial quartering for color search, to limit specific rules for filtering search results based on brightness values, and to limit specific rules for filtering search results based on a positional relationship with a brightness sequence extension line.
[0457] Each execution step of the above-mentioned first process is described in detail below.
[0458] When the two-dimensional plane is spatially divided into four equal parts based on a predetermined color search rule to obtain the first array, the two-dimensional plane is first used as the initial original search result, and the data field of the original search result corresponding to the two-dimensional plane is determined, where the data field r of the search result corresponding to the two-dimensional plane is {x: 0, y: 0, w: 1, k: unknown}. In this case, the first array result = [r]. Next, the square two-dimensional plane is spatially divided into four equal parts according to the predetermined color search rule. In the first iteration, the two-dimensional plane is divided into four small squares of equal area, and each small square is used as a preliminary search result, so that the first array r contains four preliminary search results.
[0459] like Figure 24A The figure shows a schematic diagram of dividing the original search results corresponding to a two-dimensional plane into four equal parts. Specifically, after dividing the original search result r = {x: 0, y: 0, w: 1, k: unknown} into four equal parts, four preliminary search results are obtained, namely preliminary search result r1, preliminary search result r2, preliminary search result r3, and preliminary search result r4. The data fields of the four preliminary search results are represented as follows:
[0460] r1={x:rx,y:ry,w:(rw) / 2,k:unknown};
[0461] r2={x:r.x+(rw) / 2,y:ry,w:(rw) / 2,k:unknown};
[0462] r3={x:rx,y:r.y+(rw) / 2,w:(rw) / 2,k:unknown};
[0463] r4={x:r.x+(rw) / 2,y:r.y+(rw) / 2,w:(rw) / 2,k:unknown};
[0464] Here, rx refers to the horizontal coordinate value of the original search result r; ry refers to the vertical coordinate value of the original search result r; and (rw) / 2 refers to half the width of the original search result r.
[0465] Based on this, after the first spatial quartering, the first array is result = [r1, r2, r3, r4].
[0466] When determining the candidate colors corresponding to each preliminary search result in a two-dimensional plane based on the vertex coordinates of the square area corresponding to the preliminary search result, the following steps are performed: first, for each square area corresponding to the preliminary search result, the vertex coordinates of the four vertices of the square area corresponding to the preliminary search result are obtained. Next, based on the vertex coordinates of the four vertices and the hue parameters of the first theme color, the four candidate colors corresponding to the preliminary search result are determined. For each candidate color, the hue of the candidate color is the hue of the first theme color, the chroma is the abscissa value of the vertex coordinate corresponding to the candidate color, and the brightness is the ordinate value of the vertex coordinate corresponding to the candidate color.
[0467] by Figure 24A Taking the preliminary search result r1 in the example, the hue component H, chroma component S, and brightness component L of the four candidate colors C1, C2, C3, and C4 of the preliminary search result r1 can be expressed as:
[0468] C1={H:main_color.H,S:r1.x,L:r1.y}
[0469] C2={H:main_color.H,S:r1.x+r1.w,L:r1.y}
[0470] C3={H:main_color.H,S:r1.x,L:r1.y+r1.w}
[0471] C4={H:main_color.H,S:r1.x+r1.w,L:r1.y+r1.w}
[0472] Among them, r1.x refers to the horizontal coordinate value of the preliminary search result r1 in the data field (in the two-dimensional coordinate system), r1.y refers to the vertical coordinate value of the preliminary search result r1 in the data field (in the two-dimensional coordinate system), r1.w refers to the width of the preliminary search result r1 (the side length of the square area). main_color.H refers to the hue of the first theme color.
[0473] Based on the comparison of the second brightness value of each candidate color with each brightness value in the brightness value sequence, when screening out the intermediate search results corresponding to each brightness value from the multiple preliminary search results, the following steps may be included but are not limited to:
[0474] For each preliminary search result, determining a second brightness value for each candidate color of the preliminary search result;
[0475] For each candidate color, calculating a brightness difference between the second brightness value and each brightness value of the brightness value sequence;
[0476] For each brightness value, if it is determined that the product of the brightness difference of two candidate colors for this brightness value in the preliminary search result is less than or equal to 0, the preliminary search result is determined as the intermediate search result for this brightness value, and the level number of the brightness value in the brightness value sequence is assigned to the intermediate search result.
[0477] For example, for a preliminary search result, the second brightness values of the four candidate colors are L1, L2, L3, and L4 in sequence; the second brightness values L1, L2, L3, and L4 are sequentially compared with the brightness value sequence a n Each brightness value a in the brightness value sequence is subtracted to obtain the brightness value a of the i-th level. i Brightness difference:
[0478] δ1=L1-a i ;δ2=L2-a i ;δ3=L3-a i ; δ4=L4-a i , where k is an integer in the range [0, the first number minus 1].
[0479] When the brightness difference δ1, δ2, δ3, δ 41 When the product of two brightness differences is not greater than 0, the preliminary search result is considered to be the brightness value a of the i-th level of the brightness value sequence. i The intermediate search result is modified by changing the k in the data field of the intermediate search result from unknown to i.
[0480] In addition, for the preliminary search results, if the brightness difference between the second brightness value and each brightness value of the brightness value sequence is determined, and for each brightness value, the product of the brightness difference between any two candidate colors for this brightness value is greater than 0, the preliminary search results will be eliminated.
[0481] In a specific embodiment, when determining the second brightness value of each candidate color, since the color value of each candidate color is a three-dimensional value based on the HSL color space, first, for each candidate color, the HSL value of the candidate color is converted into an RGB value; then, the second brightness value of the candidate color is calculated based on the RGB value, wherein the process of calculating the second brightness value of the candidate color based on the RGB value is similar to the above steps 1710-1740 and will not be repeated here to save space.
[0482] It should be noted that the hue component value H of the candidate color in the hue dimension ranges from [0°, 360°], the chroma component value S in the chroma dimension ranges from [0, 1], and the luminance component value L in the luminance dimension ranges from [0, 1].
[0483] For each candidate color, when converting the HSL value of the candidate color into an RGB value, first, a first parameter C is determined based on the chromaticity component value S of the candidate color in the chromaticity dimension and the brightness component value L in the brightness dimension, wherein the first parameter C can be expressed as C = (1-|2L-1|) × S. Then, a second parameter X is determined based on the first parameter C and the hue component value H of the candidate color in the hue dimension, wherein the second parameter X can be expressed as Wherein, mod is a modulo operation. Further, a third parameter m is determined according to the first parameter and the brightness component value, wherein the third parameter m can be expressed as Based on this, the preliminary RGB value of the candidate brightness is determined according to the first parameter, the second parameter and the third parameter. The preliminary RGB value (R ′ , G ′ , B ′ ) can be expressed as
[0484]
[0485] Based on this, the preliminary RGB values are normalized to obtain the RGB values of the candidate colors. The RGB values (R, G, B) can be expressed as
[0486] (R,G,B)=(R ′ +m,G ′ +m,B ′ +m);
[0487] Among them, 0≤R≤1, 0≤G≤1, 0≤B≤1.
[0488] For each brightness value, based on the positional relationship between each intermediate search result and the brightness sequence extension line on the two-dimensional plane, determining a color search result corresponding to the brightness value from multiple intermediate search results includes but is not limited to the following steps:
[0489] For each brightness value, among the multiple intermediate search results, determine the intermediate search result whose brightness sequence extension line intersects with the intermediate search result on the two-dimensional plane as the color search result;
[0490] In the two-dimensional plane, intermediate search results whose brightness sequence extension lines and the intermediate search results do not intersect on the two-dimensional plane are cleared.
[0491] In step 2330, the iteration number is increased by 1, and the first process is repeated until the iteration number is consistent with the received iteration parameter, and multiple color search results corresponding to various brightness values are obtained.
[0492] In the embodiment of the present disclosure, the received iteration parameter refers to the target iteration parameter edited by the object in the first setting page.
[0493] In a specific implementation of this embodiment, after the first iteration round completes, the iteration number is incremented by 1, and a second round of iterative search is performed. In this second round, the color search results retained from the previous round are further screened and refined according to the first process, including spatial quartering, candidate color determination, screening based on brightness comparison, and screening based on the positional relationship with the brightness sequence extension line. If the iteration number is less than the target number of iterations, the first process is repeated until the iteration number equals the target number of iterations. The remaining color search results for each brightness value are used as the color search results in step 2040.
[0494] like Figure 24B The figure shows an overview of all unfiltered square regions (16,384 selectable search results) demarcated on a two-dimensional plane during a color search process when the number of iterations is 7, and the process of filtering these 16,384 selectable square regions based on the comparison of the second brightness value with the brightness values of the brightness value sequence in step 3120 to obtain 1,246 square regions. As can be seen from the figure, after filtering, several intermediate search results corresponding to various brightness values are displayed as a curve. All intermediate search results on this curve have the same brightness, so this curve can be called a brightness contour line.
[0495] like Figure 24C ,and Figure 24D The figure shows a comparison diagram of multiple brightness contour lines formed by the color search results corresponding to each brightness value under the same number of iterations for four first theme colors with different hues but the same brightness. Figure 24C In the example, when the first theme color value is #ED7782 and the first theme color value is #F99837, the changing trends of the brightness sequence extension lines are different, and the changing trends of the brightness contour lines composed of multiple intermediate search results with the same brightness values are also different. Figure 24D In the example, the brightness sequence extension lines change differently when the first theme color value is #9438D6 and when the first theme color value is #35DE87. The brightness contour lines formed by the intermediate search results with the same brightness value also change differently in the two cases. This shows that the brightness contour lines formed by the intermediate search results with the same brightness value for first theme colors of different hues often differ.
[0496] like Figure 24EAs shown, based on the intersection of each intermediate search result with the brightness sequence extension line, the intermediate search results that intersect with the brightness sequence extension line are retained, and the intermediate search results that do not intersect with the brightness sequence extension line are cleared in a two-dimensional plane. Specifically, the number of intermediate search results that intersect with the brightness sequence extension line in each brightness value can be the same or different, and multiple intermediate search results that intersect with the brightness sequence extension line in each brightness value are often continuous.
[0497] like Figure 24F The figure shows a schematic diagram of the specific process of color search. Specifically, a brightness sequence extension line is first determined on a two-dimensional plane with a fixed hue. Then, the two-dimensional plane is spatially divided into four equal parts to form four small square areas. Based on the two screening processes described above (screening based on brightness value comparison and screening based on the intersection relationship with the brightness sequence extension line), three square areas are retained as the color search results for iteration 1. Next, for the color search results for iteration 1, each color search result is spatially divided into four equal parts, and multiple smaller square areas are generated. Two more screening processes are performed, and the retained small square areas are used as the color search results for iteration 2. Similarly, each color search result for iteration 2 is spatially divided into four equal parts, and the above process is repeated to obtain each color search result for iteration 3, and so on, and similarly, to obtain each color search result for each brightness value for iteration 6. As can be seen from the figure, as the number of iterations increases, the area of the retained color search results becomes smaller, and the color search accuracy increases.
[0498] The advantage of this embodiment is that color search is performed based on the spatial quartering method, which continuously divides the two-dimensional plane into four equal parts to obtain multiple candidate color blocks with decreasing side lengths. Furthermore, the divided candidate color blocks are initially screened based on the comparison of the brightness value of each candidate color block with the brightness values of the brightness value sequence. The candidate color blocks after the initial screening are then screened again based on the intersection of the candidate color blocks after the initial screening with the extension line of the brightness sequence, thereby obtaining the final color search results corresponding to each brightness value, thereby improving the efficiency and accuracy of the color search results.
[0499] Because when the number of iterations is small or the angle between the brightness sequence extension line and the brightness contour line is small, each brightness value in the sequential color often corresponds to multiple color search results. However, each brightness value required in the sequential color is for a specific color. Based on this, the disclosed embodiment provides a solution for filtering and aggregating multiple color search results for each brightness value, which can quickly determine the first color that each brightness value ultimately corresponds to in a two-dimensional plane, thereby improving the efficiency of sequential color generation.
[0500] Please refer to Figure 25In one embodiment, for each brightness value, based on multiple color search results corresponding to the brightness value, a process of determining a first color corresponding to the brightness value may include, but is not limited to, the following steps 2510-2540:
[0501] Step 2510: For each color search result of brightness value, calculate a first distance between the center coordinates of the candidate color region corresponding to each color search result and the brightness sequence extension line;
[0502] Step 2520: Filter out a target search result from the multiple color search results based on the first distance;
[0503] Step 530: Determine the center coordinates of the candidate color region corresponding to the target search result on a two-dimensional plane;
[0504] Step 2540: Determine a first color corresponding to the brightness value based on the coordinate parameters of the center coordinates and the hue parameter of the first theme color.
[0505] Steps 2510-2540 are described in detail below.
[0506] In step 2510 , for each color search result of brightness value, a first distance between the center coordinates of the candidate color region corresponding to each color search result and the brightness sequence extension line is calculated.
[0507] Since each color search result is obtained by spatially quartering the two-dimensional plane, and the two-dimensional plane is a square, the color search result obtained by multiple spatially quartering the two-dimensional plane is also a square area. Therefore, the square area indicated by the color search result can be used as the candidate color area corresponding to the color search result.
[0508] Based on this, the center coordinates of the candidate color regions refer to the intersection coordinates of the diagonals of the respective square regions.
[0509] The first distance refers to the shortest straight-line distance (Euclidean distance) from the center coordinate to the extension line of the brightness sequence.
[0510] In a specific implementation of this embodiment, first, the center point of the candidate color region corresponding to each color search result for a certain brightness value is determined in a two-dimensional coordinate system. Next, the coordinate value of the center point is determined based on the coordinate setting of the two-dimensional plane to obtain the center coordinates, and a linear representation equation for the brightness sequence extension line is determined. Furthermore, based on the coordinate value of the center coordinates and the linear representation equation for the brightness sequence extension line, the shortest distance from the center coordinate point to the brightness sequence extension line is calculated to obtain a first distance.
[0511] For example, the color search results with the same brightness value are taken as a set and the set is recorded as Si , which indicates the set of color search results corresponding to the brightness value of the i-th level in the color sequence. Where i is an integer in the range [0, the first number minus 1]. Based on this, for each color search result R in the set, the center coordinate Q corresponding to the color search result R can be expressed as:
[0512]
[0513] Among them, Rx refers to the horizontal coordinate value of the color search result R in the data field (in the two-dimensional coordinate system), and Ry is the vertical coordinate value of the color search result R in the data field (in the two-dimensional coordinate system). Half the width of the color search results.
[0514] In step 2520 , based on the first distance, a target search result is screened out from the plurality of color search results.
[0515] The target search result refers to the color search result whose first distance meets the requirement among the multiple color search results.
[0516] In a specific implementation of this embodiment, the first distances of the color search results are compared. Based on the comparison results, the candidate color region formed by the first predetermined number of color search results with the smallest first distances is selected as a target search result. The predetermined number is determined based on search accuracy; the higher the search accuracy requirement, the smaller the predetermined number.
[0517] For example, a candidate color region formed by the first five color search results with the smallest first distance is taken as a target search result.
[0518] In step 2530 , the center coordinates of the candidate color region corresponding to the target search result are determined on a two-dimensional plane.
[0519] The center coordinates of the candidate color region corresponding to the target search result refer to the coordinates of the geometric center of the candidate color region formed by the target search result.
[0520] In the specific implementation of this embodiment, the specific implementation process of step 2530 is similar to the process of determining the center coordinates of the color search result in step 2510. To save space, it is not repeated here.
[0521] In step 2540 , a first color corresponding to the brightness value is determined based on the coordinate parameters of the center coordinates and the hue parameter of the first theme color.
[0522] The coordinate parameter of the center coordinate refers to the coordinate value of the geometric center of the candidate color area corresponding to the target search result.
[0523] The hue parameter of the first theme color is the component of the first theme color value of the first theme color in the hue dimension.
[0524] In the specific implementation of this embodiment, first, the parameters of the center coordinates are determined. The specific implementation process is similar to the method of determining the coordinate parameters of the center coordinates in step 2510 above. Next, the hue parameters are determined based on the component H of the first theme color in the hue dimension. Finally, the horizontal coordinate in the coordinate parameters of the center coordinates is used as the chromaticity of the first color corresponding to the brightness value, the vertical coordinate in the coordinate parameters of the center coordinates is used as the brightness of the first color corresponding to the brightness value, and the hue parameters of the first theme color are used as the hue of the first color. Based on this, when the chromaticity, hue, and brightness are known, the first color corresponding to each brightness value is obtained.
[0525] Based on this, after the first color corresponding to each brightness value is determined according to the above method, the three-dimensional values (hue, chroma and brightness) of the sequential color can be determined more conveniently.
[0526] like Figure 24G As shown, under different brightness values, the color search results corresponding to the brightness value may be 1, 2, 3, 6, or 7. When the color search result is 7, the number is large, and multiple color search results need to be aggregated. Based on this, according to the Euclidean distance between the geometric center point of each color search result (small square) and the brightness sequence extension line, the color search results corresponding to the brightness value are filtered and controlled to within 3. Then, the brightness and chromaticity of the geometric center of the target search result corresponding to each brightness value, and the hue of the first theme color are used as the three-dimensional value of the first color corresponding to each brightness value, thereby obtaining the three-dimensional value of the sequence color.
[0527] like Figure 24H As shown, what is shown are the color search results in the brightness-chromaticity plane (two-dimensional plane), the brightness contour lines formed by the color search results with the same brightness value, and the brightness sequence extension lines. In the two-dimensional plane, the algorithm will digitally mark the color search results of each brightness level. Each color search result is located at the intersection of the corresponding brightness contour line and the brightness sequence extension line. Furthermore, Figure China also shows the first number of first colors of the sequence color, as well as the serial number and specific color value of each first color. It should be noted that, Figure 24H The contents illustrated in the figure will be displayed on the first setting page to achieve an intuitive display of the generation details of the sequential color, providing convenience for the subject to understand the generation method of the sequential color and adjust the sequential color.
[0528] It should be noted that, in the embodiment of the present disclosure, if no results are found for a brightness value of a certain level in the brightness value sequence, that is, the color search result corresponding to a certain brightness value is none, then the color search result of the brightness value of the brightness level before this brightness value in the brightness value sequence is taken as the color search result for this brightness value.
[0529] The advantage of this embodiment is that multiple color search results for each brightness value are screened based on the distance between the center coordinates of the candidate color area corresponding to each color search result and the brightness sequence extension line; further, the retained color search results are treated as a whole, and the center coordinates of the candidate color area corresponding to this whole are used as the chromaticity and brightness of the first color corresponding to the brightness value, thereby achieving aggregation of multiple color search results, being able to quickly determine the final first color corresponding to each brightness value in a two-dimensional plane, and improving the efficiency of sequential color generation.
[0530] Detailed Description of Step 650
[0531] In step 650 , a sequence color of the first theme color is determined based on the plurality of first colors.
[0532] In the specific implementation of this embodiment, step 650 includes but is not limited to the following steps:
[0533] sorting the plurality of first colors to obtain a color sequence;
[0534] Adjust the color sequence to obtain the sequence color of the first theme color.
[0535] The color sequence is a sequence formed by sorting the first colors in the order of brightness change.
[0536] In a specific implementation of this embodiment, further, according to the arrangement order of each brightness value in the brightness value sequence, the first colors corresponding to each brightness value are arranged in the same arrangement order to form a color sequence.
[0537] Furthermore, since the generated color sequence often does not include the first theme color, it is necessary to adjust the color sequence and add the first theme color to the sequence color to obtain the sequence color corresponding to the first theme color.
[0538] In order to ensure that the first theme color exists in the final sequence color, if the first theme color is added to the generated color sequence, uneven color transitions may occur in the sequence colors. Therefore, a color adjustment process is also required to solve the uneven color transition problem caused by directly adding the first theme color.
[0539] In one embodiment, the process of sorting the plurality of first colors includes, but is not limited to, the following steps:
[0540] Receive a sorting method selection operation for the sequence color of the first theme color;
[0541] Based on the sorting mode selection operation, the plurality of first colors are sorted according to the first order or the second order to obtain a color sequence.
[0542] The sorting mode selection operation is used to set the first colors of the sequence colors to be arranged in a first order from small to large brightness values, or to set the first colors of the sequence colors to be arranged in a second order from large to small brightness values.
[0543] In the embodiment of the present disclosure, the operation of selecting the sorting mode of the sequence colors of the first theme color is implemented through the built-in enabling control of the sequence colors in the first setting page.
[0544] When the object wants the first color of the sequence color of the first theme color to change from dark to light, the sorting mode selection operation of the sequence color of the first theme color is to not trigger the sequence color built-in enable control, so that the sequence color built-in enable control remains in an inactive state. Based on this, the server receives that the sequence color built-in enable control remains in an inactive state. The server first determines the brightness values of the first number of first colors in the sequence color, and then arranges the first colors into a sequence color in a first order (in order of brightness from small to large) according to the brightness value. As a result, the first color in the front position of the sequence color is darker, and the first color in the back position is brighter, so that the multiple first colors of the sequence color displayed in the sequence color display area are arranged in order of brightness from small to large.
[0545] like Figure 26A As shown, when the sequential color built-in enabling control in the first setting page is not triggered, that is, the sequential color built-in enabling control is in the off state, the multiple first colors of the sequential color displayed in the sequential color display area are arranged in order of brightness from small to large, and the sequential color transitions from black to green and finally to white.
[0546] When the object wants to make the first color of the sequence color of the first theme color change from light to dark, the sorting mode selection operation of the sequence color of the first theme color is to trigger the sequence color built-in enable control, so that the sequence color built-in enable control is in the on state. Based on this, the server receives the trigger of the sequence color built-in enable control, and first sets the sequence color built-in enable control to the on state. Then, the server determines the brightness values of the first number of first colors in the sequence color, and then arranges the first colors into the sequence color in the second order (the order of brightness from large to small) according to the brightness value. Thereby, the first color in the front position of the sequence color is brighter, and the first color in the back position is darker, so that the multiple first colors of the sequence color displayed in the sequence color display area are arranged in the order of brightness from large to small.
[0547] like Figure 26B As shown, when the sequential color built-in enable control in the first setting page is triggered, that is, the sequential color built-in enable control is in the turned-on state, the multiple first colors of the sequential color displayed in the sequential color display area are arranged in order of brightness from large to small, and the sequential color transitions from white to green and finally to black.
[0548] The advantage of this embodiment is that a built-in enabling control for sequential colors is provided in the first setting page, so that the object can set the arrangement order of the first colors in the sequential colors according to the brightness size according to actual needs, so that the server can make the brightness change trend of multiple first colors of the displayed sequential colors consistent with the selected brightness arrangement order according to the arrangement order according to the brightness size selected by the object, thereby improving the flexibility and diversity of the sequential color settings.
[0549] Since in most application scenarios, the first theme color needs to exist in the sequence color, based on this, the present disclosure also provides a solution for color replacement based on the color difference between the first theme color and the first color of the sequence color, which can improve the flexibility and rationality of the sequence color setting.
[0550] Please refer to Figure 27 In one embodiment, the color adjustment process may include but is not limited to the following steps 2710-2720:
[0551] Step 2710: If it is determined that the sequence color does not include the first theme color, and the trigger state of the theme color built-in enabling control is not triggered, then replace the first color in the sequence color with the same brightness value as the first theme color with the first theme color;
[0552] Step 2720: If it is determined that the sequence color does not include the first theme color, and the trigger state of the theme color built-in enable control is triggered, then based on the color difference values between the first theme color and each first color of the sequence color, the first theme color is used to replace the first color with the smallest color difference value.
[0553] Steps 2710-2720 are described in detail below.
[0554] In step 2710 , if it is determined that the sequence color does not include the first theme color, and the trigger state of the theme color built-in enabling control is not triggered, the first color in the sequence color having the same brightness value as the first theme color is replaced with the first theme color.
[0555] The trigger state of the built-in enabled control for the theme color indicates how the sequence of brightness values is determined.
[0556] Since the first brightness value of the first theme color is in the brightness value sequence when the built-in activation control for theme colors is not triggered, the first theme color will be included in the sequence when the color search is performed with high precision. However, if the width of the color search result based on spatial quartering is not less than the precision required, the first theme color may not be included in the sequence.
[0557] In a specific implementation of this embodiment, if it is determined that the sequence color does not include the first theme color, and the trigger state of the built-in theme color activation control is not triggered, in order to include the first theme color in the sequence color, the first brightness value of the first theme color is first determined; then, the position of the first color with the first brightness value is determined in the sequence color. Finally, the first color at that position is replaced with the first theme color.
[0558] In step 2720 , if it is determined that the sequence colors do not include the first theme color, and the trigger state of the theme color built-in enable control is triggered, then based on the color difference values between the first theme color and each first color of the sequence colors, the first theme color is used to replace the first color with the smallest color difference value.
[0559] In the specific implementation of this embodiment, if it is determined that the sequence color does not include the first theme color, and the trigger state of the built-in theme color enable control is triggered, first, the color error between each first color and the first theme color is calculated; when the smallest color error is less than or equal to the theme color tolerance value, the first color with the smallest color error is directly replaced with the first theme color. However, when the smallest color error is greater than the theme color tolerance value, the first color with the smallest color error from the first theme color is displayed as the optimal theme color recommendation on the second settings page, and the first theme color and the color error value are displayed at the same time. A theme color replacement control is also provided for the subject to select whether to replace the first color recommended as the optimal theme color with the first theme color.
[0560] In a specific embodiment, after the built-in activation control of the theme color is triggered, the method for generating the sequential color further includes but is not limited to the following steps:
[0561] In response to the theme color built-in enabling control being triggered, displaying a second setting page;
[0562] In the theme color tolerance editing sub-area, the edited theme color tolerance value is received;
[0563] For the first theme color, a first color having the smallest color error with the first theme color is displayed on the second setting page;
[0564] When the minimum color error is less than or equal to the theme color tolerance value, replacing the first color with the minimum color error with the first theme color, so that the sequence colors displayed in the sequence color display area include the first theme color;
[0565] When the minimum color error is greater than the theme color tolerance value, in response to the theme color replacement control being triggered, the first theme color is replaced with the first color with the minimum color error, so that the sequential colors displayed in the sequential color display area do not include the first theme color.
[0566] In the embodiment of the present disclosure, the second setting page has a theme color tolerance editing sub-area and a theme color replacement control.
[0567] The theme color tolerance editing sub-area is used to set a maximum allowable color error between the first theme color and a plurality of first colors in the sequence color for the object.
[0568] The theme color replacement control is used to provide an object with the option to display the first color with the smallest color error from the first theme color as the theme color in the sequence color.
[0569] The theme color tolerance value is used to indicate a maximum allowable color error between the first theme color and the first number of first colors.
[0570] In the specific implementation of this embodiment, after the object triggers the built-in enable control of the theme color, the built-in enable control of the theme color is set to the on state. Then, the server will display the second setting page in response to the built-in enable control of the theme color being triggered. Furthermore, the object can edit and input the theme color tolerance value in the theme color tolerance editing sub-area in the second setting page to determine the maximum color error allowed between the first theme color and each first color. Based on this, the server will receive the edited theme color tolerance value, calculate the color error of the first theme color and each first color in the sequence color, and obtain multiple color errors. Furthermore, when the minimum color error is less than or equal to the theme color tolerance value, indicating that the color error is within the allowable error range, the first color with the smallest color error in the sequence color is replaced with the first theme color, so that the sequence color displayed in the sequence color display area contains the first theme color.
[0571] However, when the minimum color error is greater than the theme color tolerance value, it indicates that the color errors have exceeded the allowable error range. Directly displaying the first theme color in the sequence color may result in a large difference in the final sequence color. Based on this, a theme color replacement control is also provided for the object in the second setting page. When the object does not trigger the theme color replacement control, the first color with the smallest color error in the sequence color is replaced with the first theme color, so that the sequence color displayed in the sequence color display area includes the first theme color, and the first color with the smallest color error is recommended as the optimal main color. When the object triggers the theme color replacement control, the first theme color is replaced with the first color with the smallest color error, so that the sequence color displayed in the sequence color display area does not include the first theme color.
[0572] like Figure 5A As shown, the built-in theme color enable control is located in the lower right area of the first settings page. An interactive selection button appears after the built-in theme color enable control. Selecting this button triggers the built-in theme color enable control, turning it on. If the subject wants the brightness value of the first color in the sequence color to include the edited maximum and minimum brightness values, the subject clicks the selection button after the built-in theme color enable control on the first settings page to turn it on.
[0573] like Figure 28 As shown, after the subject clicks the selection button on the first settings page to turn on the built-in theme color enable control, the server displays a second settings page in response to the subject's triggering of the built-in theme color enable control. The second settings page displays a theme color tolerance editing subsection for the theme color tolerance value. At this point, the subject drags the slider in the theme color tolerance editing subsection to set the theme color tolerance value to 10. The server calculates the color error between the first theme color and multiple first colors in the sequence color according to the set theme color tolerance value, and finds the first color with the smallest color error with the first theme color. The second settings page displays the first theme color and its color value "#07C160," the first color with the smallest color error (the optimal primary color recommendation), its color value "#0ECC3B," and a color error of "12.5." Since 12.5 is greater than 10, the first theme color to be set in the sequence color is replaced with the first color with the smallest color error, leaving the first color in the sequence color unchanged and not displayed in the sequence color. The second settings page also displays a prompt field stating "The brightness of the current theme color does not meet the brightness limit for sequential colors." At this point, the subject clicks the theme color replacement control labeled "Replace Theme Color" to replace the first theme color with the first color in the sequential colors with the smallest color error.
[0574] The benefit of this embodiment is that, based on the scheme for adjusting the color sequence, when the sequence color does not include the first theme color and the trigger state of the built-in activation control of the theme color is not triggered, the first color is directly replaced by the first theme color, so that the first theme color exists in the sequence color. When the sequence color does not include the first theme color, but the trigger state of the built-in activation control of the theme color is triggered, the object decides whether to set the first theme color in the sequence color based on the color difference between the first theme color and the first color, and can also provide the color closest to the first theme color for the object to choose, thereby improving the flexibility of the sequence color setting. In addition, the object can also determine whether the first theme color exists in the sequence color by operating the built-in activation control of the theme color, so that the server can determine the brightness value sequence of the sequence color according to the established brightness determination rules based on the different operation requests received, so that the difference between adjacent brightness values in the brightness value sequence is equal.
[0575] Detailed description of the application process and export process of the sequence color of the first theme color in the embodiment of the present disclosure
[0576] In order to keep the overall style of the object interface consistent, the sequential color of the first theme color in the embodiment of the present disclosure can be well adapted to the design of the object interface. Based on this, the embodiment of the present disclosure provides a color setting scheme based on applying the sequential color to the components of the object interface. This scheme can more conveniently use different first colors in the sequential color for different components to distinguish different types of components, and can also maintain good consistency in the color style of each component.
[0577] Please refer to Figure 29 In one embodiment, the process of applying the sequential color of the first theme color to the interface component design may include but is not limited to the following steps 2910-2920:
[0578] Step 2910: Receive a sequential color application operation for applying a sequential color of a first theme color to a predetermined page;
[0579] Step 2920: Display each component of the predetermined page according to the first color corresponding to the component in the sequential color.
[0580] Steps 2910-2920 are described in detail below.
[0581] In step 2910 , a sequential color application operation is received for applying a sequential color of a first theme color to a predetermined page.
[0582] A pre-defined page refers to a pre-configured object interface. It can be customized based on the business scenario. A pre-defined page often contains multiple components, each of which provides different functional services and executes different business processes.
[0583] The sequential color application operation is used to instruct that each component of a predetermined page be displayed according to a first color corresponding to the component in the sequential color.
[0584] In a specific implementation of this embodiment, when an object wants to use the sequential colors of the first theme color for the design of the object interface, the object can perform a sequential color application operation on the first setting page to trigger the sequential color application process. Based on this, the server will receive the sequential color application operation to apply the sequential colors of the first theme color to the predetermined page.
[0585] In step 2920, each component of the predetermined page is displayed according to the first color corresponding to the component in the sequential color.
[0586] In a specific implementation of this embodiment, after receiving a sequential color application operation to apply a sequential color of the first theme color to a predetermined page, the server first determines, based on the sequential color application operation, the first color in the sequential color corresponding to each component. Then, the server displays each component on the predetermined page using the first color in the sequential color corresponding to the component.
[0587] The advantage of this embodiment is that, based on the color setting of the components of the object interface that apply the sequential color, according to the sequential color application operation of the object on the first setting page, the various components of the predetermined page are displayed according to the first color of the sequential color corresponding to the component, so that the object can intuitively preview the display situation of using the various first colors of the sequential color for different components, and can more conveniently use different first colors in the sequential color for different components, thereby improving the distinction between different types of components. Since the hue of the first color of the sequential color is consistent, this method can also maintain a good consistency in the color style of each component.
[0588] In addition to being applied to the color settings of various components in interface design, the sequential colors of the embodiments of the present disclosure can also be used in data visualization scenarios to distinguish various data items and data volumes in data charts, thereby improving the visualization of data analysis and the distinction between different data.
[0589] Please refer to Figure 30 In another embodiment, the process of applying the sequential color of the first theme color to the interface component design includes but is not limited to the following steps 3010-3020:
[0590] Step 3010: receiving a sequential color application operation for applying a sequential color of a first theme color to a predetermined data chart;
[0591] Step 3020: Display each data indicator of the predetermined data chart according to the first color corresponding to the data indicator in the sequence color.
[0592] Steps 3010-3020 are described in detail below.
[0593] In step 3010 , a sequential color application operation is received for applying a sequential color of a first theme color to a predetermined data chart.
[0594] The predetermined data chart is used to indicate various commonly used graphs, tables, etc. for displaying data. The predetermined data chart includes but is not limited to a histogram, a line chart, an area chart, a pie chart, a heat chart, etc.
[0595] The sequential color application operation is used to instruct that each data indicator of a predetermined data chart be displayed according to a first color corresponding to the data indicator in the sequential color.
[0596] Data indicators are used to indicate a certain type of indicator to be analyzed. For example, in a resource distribution diagram, a data indicator can be resource quantity or resource type.
[0597] In the specific implementation of this embodiment, the specific implementation process of step 3010 is similar to the specific implementation process of the above-mentioned step 2910. To save space, it is not repeated here.
[0598] In step 3620 , each data indicator of the predetermined data chart is displayed according to the first color corresponding to the data indicator in the sequential color.
[0599] In the specific implementation of this embodiment, the specific implementation process of step 3020 is similar to the specific implementation process of the above-mentioned step 2920. To save space, it is not repeated here.
[0600] The advantage of this embodiment is that the sequential color of the first theme color is applied in the data visualization scenario, and the multiple first colors in the sequential color are used to distinguish various data items and data quantities in the data chart, thereby improving the visualization of data analysis and the distinction between different data.
[0601] In order to enable an object to conveniently reuse various sequential colors, the embodiment of the present disclosure provides a solution for exporting and saving the sequential colors of the first theme color, which can achieve convenient storage of the sequential colors.
[0602] In one embodiment, the process of deriving the sequence color of the first theme color may include but is not limited to the following steps:
[0603] In response to a request to export the sequence colors of the first theme color, displaying a third editing page;
[0604] In response to a selection operation on a target candidate export format among the plurality of candidate export formats, the sequential colors and the sequential color parameters corresponding to the sequential colors are exported and stored according to the target candidate export format.
[0605] The third editing page has a plurality of candidate export formats, which are used to provide the object with a choice of a file format in which the sequential color and the sequential color parameters corresponding to the sequential color are to be saved.
[0606] The sequential color parameters corresponding to the sequential color refer to the first number, iteration number, first theme color value, grayscale adjustment coefficient, etc. of the generated sequential color, and also include the color value of each first color in the sequential color.
[0607] In a specific implementation of this embodiment, when an object triggers a control for executing an export process in the sequential color setting system, the server will display a third editing page in response to the sequential color export request for the first theme color. The third editing page will display multiple candidate export formats and the trigger controls corresponding to each candidate export format. Next, the object will select a trigger control for a target candidate export format from the multiple candidate export formats and trigger it. Based on this, the server will respond to the selection operation for the target candidate export format from the multiple candidate export formats by exporting the sequential colors and the sequential color parameters corresponding to the sequential colors according to the target candidate export format and storing them in a predetermined storage space.
[0608] It should be noted that the candidate export formats of the embodiment of the present disclosure include but are not limited to JSON format, data table (CSV) format, and SVG format.
[0609] like Figure 31 As shown, the object clicks the "Export" button in the sequential color setting system. At this time, the third setting page is displayed. The third setting page displays a prompt field "Please select the export format", as well as a trigger control corresponding to "Format 1", a trigger control corresponding to "Format 2", a trigger control corresponding to "Format 3", and a trigger control corresponding to "Format 4". At this time, the object can arbitrarily select a trigger control to trigger to export the sequential color parameters corresponding to the sequential color according to the selected format.
[0610] The advantage of this embodiment is that a third editing page is set in the sequential color setting system, so that the object can export and store the sequential color and the related sequential color configuration parameters of the sequential color in a certain format according to actual needs, so that the stored sequential color and the related configuration parameters of the sequential color can be quickly retrieved in various subsequent application scenarios, thereby improving the reusability of the sequential color and the utilization rate of the sequential color.
[0611] Detailed description of the practical application of the sequence color of the first theme color of one embodiment of the present disclosure
[0612] The following combination Figures 32A-32C Various application scenarios of sequential colors in the embodiments of the present disclosure are described.
[0613] like Figure 32A As shown, the first setting page of the sequential color setting system of the present disclosure and the sequential color generation method of the server correspond to multiple first theme colors. The sequential colors of each theme color contain 10 first colors, and the first theme colors of various hues are present in the corresponding sequential colors; however, the positions (levels) of the first theme colors of different hues in the corresponding sequential colors are different. For example, in order from top to bottom, the first first theme color is in the 5th position of the sequential color; the second first theme color is in the 3rd position of the sequential color; the third first theme color is in the 4th position of the sequential color; the fourth first theme color is in the 5th position of the sequential color; the fifth first theme color is in the 3rd position of the sequential color; the sixth first theme color is in the 4th position of the sequential color; the seventh first theme color is in the 6th position of the sequential color; the eighth first theme color is in the 7th position of the sequential color; and the ninth first theme color is in the 6th position of the sequential color. In addition, the brightness of the sequential colors of the first theme colors of each hue in the embodiment of the present disclosure changes evenly, and the brightness changes of the sequential colors under each hue maintain good consistency.
[0614] like Figure 32B The figure shows a schematic diagram of applying a sequential color corresponding to a first theme color to a sector module in a data chart. Specifically, different first colors within the same sequential color are applied to five different types of resources. The brightness values of the first colors in the sequential colors corresponding to the first, second, third, fourth, and fifth types of resources gradually decrease, from bright to dark, effectively distinguishing between different types of resources.
[0615] like Figure 32C The figure shows a schematic diagram of applying the sequential color corresponding to the first theme color to a data chart to distinguish different areas with different data volumes. Specifically, the area with data volumes of 1-30 and the area with data volumes of 31-60 are displayed in the first color with higher brightness in the sequential color; the area with data volumes of 61-80 and the area with data volumes of 81-110 are displayed in the first color with moderate brightness in the sequential color; and the area with data volumes greater than 111 is displayed in the first color with lower brightness in the sequential color. This allows the data volume distribution of the entire area to be illustrated through multiple first colors of the same hue but different brightnesses.
[0616] Description of the apparatus and device of the present disclosure
[0617] It is to be understood that, although the steps in the above-mentioned flowcharts are shown in sequence according to the arrow representations, these steps are not necessarily performed in sequence according to the order represented by the arrows. Unless otherwise specified in the present embodiment, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the above-mentioned flowcharts may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.
[0618] It should be noted that in each specific embodiment of the present application, when it comes to the need to perform relevant processing based on data related to the characteristics of the target object, such as the target object attribute information or attribute information set, the permission or consent of the target object will be obtained first, and the collection, use and processing of such data will comply with relevant laws, regulations and standards. In addition, when the embodiment of the present application needs to obtain the attribute information of the target object, the target object's separate permission or separate consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the target object's separate permission or separate consent, the necessary target object-related data for the normal operation of the embodiment of the present application will be obtained.
[0619] Figure 33 This is a schematic diagram of the structure of a sequential color generation device 3300 provided in an embodiment of the present disclosure. The sequential color generation device 3300 includes:
[0620] A first determining unit 3310 is configured to determine a first theme color value of the first theme color in response to a sequential color generation request for the first theme color;
[0621] A second determining unit 3320 is configured to determine a brightness value sequence corresponding to the sequential colors of the first theme color based on the received brightness extreme value and the first theme color value, where the brightness value sequence is used to indicate the brightness value of each first color in the sequential color;
[0622] a third determining unit 3330 configured to determine, based on the first theme color value, a projection result of the first theme color on a preset two-dimensional plane, and determine, based on the projection result and the received chromaticity following parameter, a brightness sequence extension line corresponding to the sequential colors in the two-dimensional plane, where the two-dimensional plane is used to indicate a relationship between the chromaticity and brightness of each first color;
[0623] A color search unit 3340 is configured to perform a color search in a two-dimensional plane based on the brightness value sequence and the brightness sequence extension line to obtain a first color corresponding to each brightness value in the brightness value sequence;
[0624] The fourth determining unit 3350 is configured to determine a sequence color of the first theme color based on the plurality of first colors, wherein the first color in the sequence color is consistent with the color of the first theme color, and the brightness difference between every two adjacent first colors is the same.
[0625] Optionally, the brightness extremes include a maximum brightness value and a minimum brightness value;
[0626] The second determining unit 3320 is configured to:
[0627] determining a first brightness difference between adjacent first colors in the sequential color based on the maximum brightness value, the minimum brightness value, and the received first number, where the first number is used to indicate the number of the first colors in the sequential color;
[0628] calculating a plurality of brightness values based on the minimum brightness value, the first brightness difference, and the first number;
[0629] Arrange multiple brightness values into a brightness value sequence.
[0630] Optionally, the brightness extremes include a maximum brightness value and a minimum brightness value;
[0631] The second determining unit 3320 is configured to:
[0632] Determining a first brightness value of the first theme color based on the first theme color value;
[0633] determining a second brightness difference between adjacent first colors in the sequential color based on the maximum brightness value, the minimum brightness value, and the received first number, wherein the first number is used to indicate the number of colors of the first color in the sequential color;
[0634] dividing the brightness range determined by the maximum brightness value and the minimum brightness value into a plurality of candidate brightness intervals based on the second brightness difference and the first number;
[0635] determining a brightness offset based on the first brightness value and the candidate brightness interval in which the first brightness value is located;
[0636] calculating a plurality of brightness values based on the brightness offset, the minimum brightness value, and the first number;
[0637] Arrange multiple brightness values into a brightness value sequence.
[0638] Optionally, determining a first brightness value of the first theme color based on the first theme color value includes:
[0639] Performing a linear transformation on the first theme color value to obtain a first color component, a second color component, and a third color component of the first theme color;
[0640] Obtaining a relative brightness value of the first theme color based on a weighted sum of the first color component, the second color component, and the third color component;
[0641] Performing a first grayscale conversion on the relative brightness value to obtain a preliminary brightness value of the first theme color;
[0642] A second grayscale conversion is performed on the preliminary brightness value based on the received grayscale adjustment coefficient to obtain a first brightness value.
[0643] Optionally, the third determining unit 3330 is configured to:
[0644] Based on the two-dimensional plane, a two-dimensional coordinate system is constructed, wherein the two-dimensional coordinate system is a coordinate system with chromaticity as the horizontal axis and brightness as the vertical axis;
[0645] In a two-dimensional coordinate system, determining a first coordinate point corresponding to the projection result;
[0646] Determining a preliminary brightness extension line based on an intersection relationship between a connecting line of the first coordinate point and a predetermined coordinate point in the two-dimensional coordinate system and a predetermined straight line in the two-dimensional coordinate system;
[0647] Based on the chromaticity following parameter, the preliminary brightness extension line is corrected to obtain the brightness sequence extension line.
[0648] Optionally, based on the chroma following parameter, the preliminary luminance extension line is corrected to obtain a luminance sequence extension line, including:
[0649] Based on the chromaticity following parameter, the preliminary brightness extension line is corrected to obtain a corrected preliminary brightness extension line;
[0650] The corrected preliminary brightness extension line is interpolated to obtain the brightness sequence extension line.
[0651] Optionally, the color search unit 3340 includes:
[0652] a search subunit (not shown) configured to perform a color search in a two-dimensional plane based on a predetermined color search rule, a brightness value sequence, and an extension line of the brightness sequence, and obtain a plurality of color search results corresponding to respective brightness values in the brightness value sequence, wherein each color search result indicates a candidate color region on the two-dimensional plane;
[0653] The determining subunit (not shown) is configured to determine, for each brightness value, a first color corresponding to the brightness value based on a plurality of color search results corresponding to the brightness value.
[0654] Optionally, a search subunit (not shown) is configured to:
[0655] Initialize the iteration number to 1;
[0656] Execute a first process, the first process including:
[0657] Based on a predetermined color search rule, the two-dimensional plane is spatially divided into four equal parts to obtain a first array, wherein the first array includes a plurality of preliminary search results, each of which corresponds to a square area on the two-dimensional plane;
[0658] For each preliminary search result, determining a candidate color corresponding to the preliminary search result in a two-dimensional plane based on vertex coordinates of a square area corresponding to the preliminary search result;
[0659] Based on a comparison of the second brightness value of each candidate color with each brightness value in the brightness value sequence, screening out an intermediate search result corresponding to each brightness value from a plurality of preliminary search results;
[0660] For each brightness value, based on the positional relationship between each intermediate search result and the brightness sequence extension line on the two-dimensional plane, determine the color search result corresponding to the brightness value from the multiple intermediate search results;
[0661] The iteration number is increased by 1, and the first process is repeated until the iteration number is consistent with the received iteration parameter, and a plurality of color search results corresponding to each brightness value are obtained.
[0662] Optionally, a determination subunit (not shown) is configured to:
[0663] For each color search result of brightness value, calculate the first distance between the center coordinates of the candidate color region corresponding to each color search result and the brightness sequence extension line;
[0664] Based on the first distance, filtering out a target search result from the multiple color search results;
[0665] Determine the center coordinates of the candidate color region corresponding to the target search result on a two-dimensional plane;
[0666] A first color corresponding to the brightness value is determined based on the coordinate parameters of the center coordinates and the hue parameter of the first theme color.
[0667] Optionally, the fourth determining unit 3350 includes:
[0668] a sorting subunit (not shown), configured to sort the plurality of first colors to obtain a color sequence;
[0669] The adjustment subunit (not shown) is used to perform color adjustment on the color sequence to obtain a sequence color of the first theme color.
[0670] Optionally, a sorting subunit (not shown) is used to:
[0671] receiving a sorting mode selection operation for the sequence colors of the first theme color, the sorting mode selection operation being used to set the first colors of the sequence colors to be arranged in a first order from small to large brightness values, or to set the first colors of the sequence colors to be arranged in a second order from large to small brightness values;
[0672] Based on the sorting mode selection operation, the plurality of first colors are sorted according to the first order or the second order to obtain a color sequence.
[0673] Optionally, the adjustment subunit (not shown) is configured to:
[0674] If it is determined that the sequence color does not include the first theme color, and the trigger state of the built-in theme color enable control is not triggered, then the first color in the sequence color that has the same brightness value as the first theme color is replaced with the first theme color. The trigger state of the built-in theme color enable control is used to indicate the method for determining the brightness value sequence;
[0675] If it is determined that the sequential colors do not include the first theme color, and the trigger state of the theme color built-in enabling control is triggered, then based on the color difference values between the first theme color and each first color of the sequential colors, the first theme color is used to replace the first color with the smallest color difference value.
[0676] Optionally, the first theme color value of the first theme color is determined by:
[0677] In response to the sequential color generation request, displaying a first setting page, the first setting page having a sequential color parameter setting area and a sequential color display area, the sequential color parameter setting area including a theme color setting sub-area, the theme color setting sub-area including a theme color format selection control and a theme color value input area;
[0678] Receive a selection operation on a theme color format selection control, where the selection operation is used to specify a target theme color format;
[0679] In the theme color value input area, a first theme color value input according to a target theme color format is received.
[0680] Optionally, the first theme color value of the first theme color is determined by:
[0681] In response to the sequential color generation request, displaying a first setting page, the first setting page having a sequential color parameter setting area and a sequential color display area, the sequential color parameter setting area including a theme color setting sub-area, and the theme color setting sub-area including a theme color block selection area;
[0682] In response to triggering the theme color block selection area, displaying a plurality of candidate theme color blocks in the theme color block selection area;
[0683] In response to selecting a candidate theme color block corresponding to the first theme color from among the plurality of candidate theme color blocks, a first theme color value is determined.
[0684] Optionally, the sequential color parameter setting area includes a plurality of selection controls for color representation models;
[0685] After determining the first theme color value in response to selecting a candidate theme color block corresponding to the first theme color from the plurality of candidate theme color blocks, the method further includes:
[0686] In response to a triggering operation on a selection control of a target color representation model among the plurality of color representation models, displaying a color component parameter editing control corresponding to the triggered target color representation model in a sequential color parameter setting area;
[0687] In response to an editing operation on the color component parameter editing control, the first theme color value is updated.
[0688] Optionally, the sequential color parameter setting area includes a chroma following parameter adjustment sub-area and a luminance extreme value editing sub-area;
[0689] The luminance extremes and chrominance following parameters are determined as follows:
[0690] determining a chroma following parameter in response to an editing operation on the chroma following parameter in the chroma following parameter adjustment subregion;
[0691] In response to an editing operation on a brightness parameter in the brightness extreme value editing sub-area, a brightness extreme value is determined.
[0692] Reference Figure 34 , Figure 34 The following is a block diagram of the structure of a terminal that implements the sequential color generation method according to an embodiment of the present disclosure. The terminal includes: a radio frequency (RF) circuit 3410, a memory 3415, an input unit 3430, a display unit 3440, a sensor 3450, an audio circuit 3460, a wireless fidelity (WiFi) module 3470, a processor 3480, and a power supply 3490. It will be understood by those skilled in the art that Figure 34 The terminal structure shown does not constitute a limitation on the mobile phone or computer, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0693] The RF circuit 3410 may be used for receiving and sending signals during information transmission or calls. In particular, after receiving downlink information from the base station, it is sent to the processor 3480 for processing. In addition, the designed uplink data is sent to the base station.
[0694] The memory 3415 may be used to store software programs and modules. The processor 3480 executes various functional applications and data processing of the target terminal by running the software programs and modules stored in the memory 3415 .
[0695] The input unit 3430 may be configured to receive input digital or character information and generate key signal input related to the setting and function control of the target terminal. Specifically, the input unit 3430 may include a touch panel 3431 and other input devices 3432.
[0696] The display unit 3440 may be configured to display input information or provided information and various menus of the target terminal. The display unit 3440 may include a display panel 3441 .
[0697] The audio circuit 3460 , the speaker 3461 , and the microphone 3462 may provide an audio interface.
[0698] In this embodiment, the processor 3480 included in the terminal can execute the sequential color generation method of the previous embodiment.
[0699] The terminals of the embodiments of the present disclosure include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. The embodiments of the present invention can be applied to various scenarios, including but not limited to interface design, page layout, data chart design, information technology, etc.
[0700] Figure 35 This is a block diagram of the structure of a portion of a server that implements the sequential color generation method of an embodiment of the present disclosure. The server may vary significantly due to different configurations or performance, and may include one or more central processing units (CPUs) 3522 (for example, one or more processors) and memory 3532, and one or more storage media 3530 (for example, one or more mass storage devices) that store application programs 3542 or data 3544. Memory 3532 and storage medium 3530 may be temporary storage or permanent storage. The program stored in storage medium 3530 may include one or more modules (not shown), each module may include a series of instruction operations on the server. Furthermore, the central processing unit 3522 may be configured to communicate with the storage medium 3530 to execute a series of instruction operations in the storage medium 3530 on the server.
[0701] The server may also include one or more power supplies 3526, one or more wired or wireless network interfaces 3550, one or more input and output interfaces 3558, and / or one or more operating systems 3541, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0702] The central processor 3522 in the server can be used to execute the sequential color generation method of the embodiment of the present disclosure.
[0703] The embodiments of the present disclosure further provide a computer-readable storage medium, which is used to store program codes, and the program codes are used to execute the sequential color generation methods of the aforementioned embodiments.
[0704] The present disclosure also provides a computer program product, which includes a computer program. A processor of a computer device reads and executes the computer program, so that the computer device executes the aforementioned transaction on-chain.
[0705] The terms "first," "second," "third," "fourth," and the like (if any) in the specification of the present disclosure and the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the present disclosure described herein, for example, can be implemented in orders other than those illustrated or described herein. In addition, the terms "comprises" and "comprising," and any variations thereof, are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or apparatus.
[0706] In the embodiments of the present disclosure, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0707] It should be understood that in the present disclosure, "at least one (item)" refers to one or more, and "plurality" refers to two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0708] It should be understood that in the description of the embodiments of the present disclosure, the meaning of multiple (or multiple items) is more than two, greater than, less than, exceed, etc. are understood to exclude the number itself, and above, below, within, etc. are understood to include the number itself.
[0709] In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0710] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0711] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0712] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the various embodiments of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program code.
[0713] It should also be understood that the various implementations provided in the embodiments of the present disclosure can be combined arbitrarily to achieve different technical effects.
[0714] The above is a specific description of the implementation methods of the present disclosure, but the present disclosure is not limited to the above implementation methods. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present disclosure. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present disclosure.
Claims
1. A method for generating sequential colors, characterized in that: The method comprises: In response to a sequential color generation request for a first theme color, determining a first theme color value of the first theme color; Determining a brightness value sequence corresponding to a sequential color of the first theme color based on the received brightness extreme value and the first theme color value, wherein the brightness value sequence is used to indicate a brightness value of each first color in the sequential color; Determining, based on the first theme color value, a projection result of the first theme color on a preset two-dimensional plane, and determining, based on the projection result and the received chromaticity following parameter, a brightness sequence extension line corresponding to the sequential colors in the two-dimensional plane, where the two-dimensional plane is used to indicate a relationship between the chromaticity and brightness of each of the first colors; Based on the brightness value sequence and the brightness sequence extension line, performing a color search in the two-dimensional plane to obtain the first color corresponding to each brightness value in the brightness value sequence; The sequence color of the first theme color is determined based on the plurality of first colors, wherein the first colors in the sequence color are consistent with the color of the first theme color, and the brightness difference between every two adjacent first colors is the same.
2. The method according to claim 1, characterized in that The brightness extremes include a maximum brightness value and a minimum brightness value; The determining, based on the received extreme brightness value and the first theme color value, a brightness value sequence corresponding to the sequential colors of the first theme color includes: determining a first brightness difference between adjacent first colors in the sequential color based on the maximum brightness value, the minimum brightness value, and the received first number, where the first number is used to indicate the number of the first colors in the sequential color; calculating a plurality of luminance values based on the minimum luminance value, the first luminance difference, and the first number; Arrange the plurality of brightness values into the brightness value sequence.
3. The method according to claim 1, characterized in that The brightness extremes include a maximum brightness value and a minimum brightness value; The determining, based on the received extreme brightness value and the first theme color value, a brightness value sequence corresponding to the sequential colors of the first theme color includes: Determining a first brightness value of the first theme color based on the first theme color value; determining a second brightness difference between adjacent first colors in the sequential color based on the maximum brightness value, the minimum brightness value, and the received first number, wherein the first number is used to indicate the number of the first colors in the sequential color; dividing a brightness range determined by the maximum brightness value and the minimum brightness value into a plurality of candidate brightness intervals based on the second brightness difference and the first number; determining a brightness offset based on the first brightness value and the candidate brightness interval in which the first brightness value is located; calculating a plurality of luminance values based on the luminance offset, the minimum luminance value, and the first number; Arrange the plurality of brightness values into the brightness value sequence.
4. The method according to claim 3, characterized in that The determining, based on the first theme color value, a first brightness value of the first theme color includes: Performing a linear transformation on the first theme color value to obtain a first color component, a second color component, and a third color component of the first theme color; Obtaining a relative brightness value of the first theme color based on a weighted sum of the first color component, the second color component, and the third color component; Performing a first grayscale conversion on the relative brightness value to obtain a preliminary brightness value of the first theme color; A second grayscale conversion is performed on the preliminary brightness value based on the received grayscale adjustment coefficient to obtain the first brightness value.
5. The method according to claim 1, wherein The determining, based on the projection result and the received chromaticity following parameter, a brightness sequence extension line corresponding to the sequential color in the two-dimensional plane includes: Based on the two-dimensional plane, a two-dimensional coordinate system is constructed, wherein the two-dimensional coordinate system is a coordinate system with chromaticity as the horizontal axis and brightness as the vertical axis; Determining a first coordinate point corresponding to the projection result in the two-dimensional coordinate system; determining a preliminary brightness extension line based on an intersection relationship between a connecting line between the first coordinate point and a predetermined coordinate point in the two-dimensional coordinate system and a predetermined straight line in the two-dimensional coordinate system; Based on the chromaticity following parameter, the preliminary brightness extension line is corrected to obtain the brightness sequence extension line.
6. The method according to claim 5, characterized in that The step of correcting the preliminary brightness extension line based on the chromaticity following parameter to obtain the brightness sequence extension line includes: Based on the chromaticity following parameter, the preliminary brightness extension line is corrected to obtain a corrected preliminary brightness extension line; Interpolation processing is performed on the corrected preliminary brightness extension line to obtain the brightness sequence extension line.
7. The method according to claim 1, characterized in that The performing a color search in the two-dimensional plane based on the brightness value sequence and the brightness sequence extension line to obtain the first color corresponding to each brightness value in the brightness value sequence includes: Based on a predetermined color search rule, the brightness value sequence, and an extension line of the brightness sequence, a color search is performed in the two-dimensional plane to obtain a plurality of color search results corresponding to each brightness value in the brightness value sequence, wherein each color search result is used to indicate a candidate color region on the two-dimensional plane; For each of the brightness values, the first color corresponding to the brightness value is determined based on a plurality of color search results corresponding to the brightness value.
8. The method according to claim 7, characterized in that The color search is performed in the two-dimensional plane based on a predetermined color search rule, the brightness value sequence, and the brightness sequence extension line to obtain a plurality of color search results corresponding to each brightness value in the brightness value sequence, including: Initialize the iteration number to 1; Executing a first process, the first process comprising: Based on the predetermined color search rule, spatially dividing the two-dimensional plane into four equal parts to obtain a first array, wherein the first array includes a plurality of preliminary search results, each of the preliminary search results corresponding to a square area on the two-dimensional plane; For each of the preliminary search results, determining, in the two-dimensional plane, a candidate color corresponding to the preliminary search result based on vertex coordinates of a square area corresponding to the preliminary search result; Based on a comparison between the second brightness value of each candidate color and each brightness value in the brightness value sequence, screening out an intermediate search result corresponding to each brightness value from the plurality of preliminary search results; For each brightness value, based on the positional relationship between each intermediate search result and the brightness sequence extension line on the two-dimensional plane, determine the color search result corresponding to the brightness value from the plurality of intermediate search results; The iteration number is incremented by 1, and the first process is repeatedly performed until the iteration number is consistent with the received iteration parameter, thereby obtaining a plurality of color search results corresponding to the respective brightness values.
9. The method according to claim 7, characterized in that The step of determining, for each brightness value, the first color corresponding to the brightness value based on a plurality of color search results corresponding to the brightness value, includes: For each color search result of the brightness value, calculating a first distance between the center coordinates of the candidate color region corresponding to each color search result and the brightness sequence extension line; Based on the first distance, filtering out a target search result from the plurality of color search results; Determining the center coordinates of the candidate color area corresponding to the target search result on the two-dimensional plane; The first color corresponding to the brightness value is determined based on the coordinate parameters of the center coordinates and the hue parameter of the first theme color.
10. The method according to claim 1, characterized in that The determining the sequence color of the first theme color based on the plurality of first colors includes: sorting the plurality of first colors to obtain a color sequence; Color adjustment is performed on the color sequence to obtain the sequence color of the first theme color.
11. The method according to claim 10, characterized in that The step of sorting the plurality of first colors to obtain a color sequence includes: receiving an operation for selecting a sorting mode for the sequence colors of the first theme color, the operation for selecting a sorting mode being used to arrange the first colors of the sequence colors in a first order from small to large brightness values, or to arrange the first colors of the sequence colors in a second order from large to small brightness values; Based on the sorting mode selection operation, the plurality of first colors are sorted according to the first order or the second order to obtain the color sequence.
12. The method according to claim 10, characterized in that The step of adjusting the color sequence to obtain the sequence color of the first theme color includes: If it is determined that the sequence of colors does not include the first theme color, and the trigger state of the built-in theme color activation control is not triggered, then replacing a first color in the sequence of colors having the same brightness value as the first theme color with the first theme color, wherein the trigger state of the built-in theme color activation control is used to indicate a method for determining the brightness value sequence; If it is determined that the sequence color does not include the first theme color, and the trigger state of the theme color built-in enabling control is triggered, based on the color difference values between the first theme color and each of the first colors in the sequence color, the first color with the smallest color difference value is replaced with the first theme color.
13. The method according to claim 1, wherein The first theme color value of the first theme color is determined by: In response to the sequential color generation request, displaying a first setting page, the first setting page having a sequential color parameter setting area and a sequential color display area, the sequential color parameter setting area including a theme color setting sub-area, the theme color setting sub-area including a theme color format selection control and a theme color value input area; receiving a selection operation on the theme color format selection control, wherein the selection operation is used to specify a selected target theme color format; In the theme color value input area, a first theme color value input according to the target theme color format is received.
14. The method according to claim 1, wherein The first theme color value of the first theme color is determined by: In response to the sequential color generation request, displaying a first setting page, the first setting page having a sequential color parameter setting area and a sequential color display area, the sequential color parameter setting area including a theme color setting sub-area, and the theme color setting sub-area including a theme color block selection area; In response to triggering the theme color block selection area, displaying a plurality of candidate theme color blocks in the theme color block selection area; In response to selecting the candidate theme color block corresponding to the first theme color from among the plurality of candidate theme color blocks, the first theme color value is determined.
15. The method according to claim 14, characterized in that The sequential color parameter setting area includes a plurality of color representation model selection controls; After determining the first theme color value in response to selecting the candidate theme color block corresponding to the first theme color from the plurality of candidate theme color blocks, the method further includes: In response to a triggering operation on the selection control of a target color representation model among the plurality of color representation models, displaying a color component parameter editing control corresponding to the triggered target color representation model in the sequential color parameter setting area; In response to an editing operation on the color component parameter editing control, the first theme color value is updated.
16. The method according to claim 15, characterized in that The sequential color parameter setting area includes a chroma following parameter adjustment sub-area and a brightness extreme value editing sub-area; The luminance extreme value and the chromaticity following parameter are determined in the following manner: determining the chroma following parameter in response to an editing operation on the chroma following parameter in the chroma following parameter adjustment subregion; The luminance extreme value is determined in response to an editing operation on a luminance parameter in the luminance extreme value editing sub-area.
17. A sequential color generating device, characterized in that: The device comprises: A first determining unit, configured to determine a first theme color value of the first theme color in response to a sequential color generation request for the first theme color; a second determining unit, configured to determine a brightness value sequence corresponding to a sequential color of the first theme color based on the received brightness extreme value and the first theme color value, wherein the brightness value sequence is used to indicate a brightness value of each first color in the sequential color; a third determining unit, configured to determine, based on the first theme color value, a projection result of the first theme color on a preset two-dimensional plane, and determine, based on the projection result and the received chromaticity following parameter, a brightness sequence extension line corresponding to the sequential colors in the two-dimensional plane, wherein the two-dimensional plane is used to indicate a relationship between the chromaticity and brightness of each of the first colors; a color search unit, configured to perform a color search in the two-dimensional plane based on the brightness value sequence and an extension line of the brightness sequence, to obtain the first color corresponding to each brightness value in the brightness value sequence; The fourth determining unit is configured to determine the sequence color of the first theme color based on the plurality of the first colors, wherein the first colors in the sequence color are consistent with the color of the first theme color, and the brightness difference between every two adjacent first colors is the same.
18. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the sequential color generation method according to any one of claims 1 to 16 is implemented.
19. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the sequential color generation method according to any one of claims 1 to 16 is implemented.
20. A computer program product, comprising a computer program, wherein the computer program is read and executed by a processor of a computer device, so that the computer device executes the sequential color generation method according to any one of claims 1 to 16.