Color matching processing method, device, storage medium and processor

By calculating the intermediate color of the initial legend color in the chart to render the newly added legend, the problem of legend color duplication is solved, and more efficient legend color management and user search experience are achieved.

CN113989417BActive Publication Date: 2025-09-12BEIJING JINSHAN ZHIYUAN OFFICE SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111223543.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-20
Publication Date
2025-09-12
Estimated Expiration
2041-10-20

AI Technical Summary

Technical Problem

In the prior art, legend colors in charts are easily repeated, which makes it difficult for users to quickly find and distinguish required content by color, thereby reducing the efficiency of chart visualization.

Method used

By determining the initial legend colors pre-configured in the target product, selecting color one and color two of the two initial legends, calculating the intermediate color as the target color, and using the intermediate color for rendering when adding a new legend, color duplication and confusion are avoided.

Benefits of technology

The efficiency and accuracy of legend color generation have been improved. Users can quickly find and distinguish legends by color, which improves the efficiency of finding chart content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113989417B_ABST
    Figure CN113989417B_ABST
Patent Text Reader

Abstract

This application discloses a color matching processing method, device, storage medium, and processor. The method includes: determining multiple preconfigured initial legends in a target product and the color of each initial legend; upon detecting the addition of a new target legend to the target product, selecting the colors of two initial legends from the multiple initial legends in the target product to obtain color one and color two; determining a target color based on color one and color two, wherein the target color is an intermediate color between the two initial legend colors; and rendering the target legend in the target product using the target color. This application addresses the problem of poor color matching for legends in products in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of color matching processing of products, and in particular to a color matching processing method, device, storage medium and processor. Background Art

[0002] When users use a certain product, they usually encounter multiple legends. In order to present the data intuitively, each legend will have its own fill color, which makes it convenient for users to obtain the content referred to by the legend based on the color. There are two implementation methods in the existing technology: the first method is similar to the Microsoft and WPS chart practices, which fixes the colors of the first to sixth legends as the first group, and the colors of the seventh to twelfth legends as the second group. The second group of colors keeps the color system unchanged on the basis of the first group of colors, and adjusts the brightness. When the thirteenth legend appears, the first and second groups of colors are cycled. The second method is similar to the Chartcube chart practice, which sets a limited number of colors. When the legend exceeds the set limited value, a random color is selected from the set colors as the fill color of the excess legend.

[0003] Both of the above methods result in duplicate legend colors within the chart, meaning that different legends are represented by the same color. Legend colors are part of visualization, and their distinct colors help users easily identify the content they refer to. If multiple identical colors appear repeatedly within a chart, users cannot quickly locate their desired content by focusing solely on the color, significantly reducing the chart's visualization capabilities and making it less efficient for users to find content within the chart by color.

[0004] With respect to the problem of poor color matching effect of legends in products in related technologies, no effective solution has been proposed so far. Summary of the Invention

[0005] The main purpose of this application is to provide a color matching processing method, device, storage medium and processor to solve the problem of poor color matching effect of legends in products in related technologies.

[0006] To achieve the above objectives, according to one aspect of the present application, a color matching method is provided. The method comprises: determining multiple initial legends preconfigured in a target product and the color of each initial legend; upon detecting the addition of a target legend to the target product, selecting the colors of two initial legends from the multiple initial legends in the target product to obtain color 1 and color 2; determining a target color based on color 1 and color 2, wherein the target color is an intermediate color between the colors of the two initial legends; and rendering the target legend in the target product using the target color.

[0007] Furthermore, determining the target color based on the color one and the color two includes: converting the color one and the color two to color space one, obtaining color parameter one corresponding to the color one in the color space one, and color parameter two corresponding to the color two in the color space; and determining a plurality of asymptotic colors between the color one and the color two based on the color parameter one and the color parameter two; and determining the target color from the plurality of asymptotic colors.

[0008] Furthermore, determining multiple asymptotic colors between the color one and the color two based on the color parameter one and the color parameter two includes: determining multiple candidate asymptotic colors between the color one and the color two using an arithmetic progression calculation method based on the color parameter one and the color parameter two; correcting the multiple candidate asymptotic colors using the interpolation of the color parameter one and the interpolation of the color parameter one; converting the corrected multiple candidate asymptotic colors to color space two; and using the converted multiple candidate asymptotic colors as the multiple asymptotic colors between the color one and the color two.

[0009] Furthermore, the color space is a one-dimensional LCH color space, and determining the target color based on the color one and the color two includes: converting the color one and the color two into the LCH color space to obtain the lightness, chroma, and hue angle of the color one and the lightness, chroma, and hue angle of the color two; determining multiple asymptotic colors between the color one and the color two based on the lightness, chroma, and hue angle of the color one and the lightness, chroma, and hue angle of the color two; and determining the target color from the multiple asymptotic colors.

[0010] Furthermore, determining multiple asymptotic colors between color one and color two based on the lightness, chroma, hue angle of color one and the lightness, chroma, hue angle of color two includes: using an arithmetic progression to calculate the lightness, chroma, hue angle of color one and the lightness, chroma, hue angle of color two to determine multiple candidate asymptotic colors between color one and color two; correcting the multiple candidate asymptotic colors by interpolating the three values ​​of the lightness, chroma, and hue angle of color one and the three values ​​of the lightness, chroma, and hue angle of color two; converting the corrected multiple candidate asymptotic colors to the HSL color space; and using the converted multiple candidate asymptotic colors as the multiple asymptotic colors between color one and color two.

[0011] Furthermore, determining the target color from the multiple asymptotic colors includes: determining the color of a previous legend adjacent to the target legend in the target product to obtain color three; and comparing each asymptotic color with color three to determine the target color from the multiple asymptotic colors.

[0012] Furthermore, comparing the hue value in each asymptotic color with the hue value in the color three to determine the target color from the multiple asymptotic colors includes: comparing the hue value in each asymptotic color with the hue value in the color three to select a candidate target color from the multiple asymptotic colors; judging whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value; if the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than the second preset value, then using the candidate target color as the target color.

[0013] Furthermore, determining the target color from multiple asymptotic colors includes: determining the color of the previous legend adjacent to the target legend in the target product to obtain color three; comparing the hue value in each asymptotic color with the hue value in color three to determine whether the difference between the hue value in each asymptotic color and the hue value in color three is greater than a first preset value; taking the asymptotic color whose hue value differs from the hue value in color three by more than the first preset value as a candidate target color; determining whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value; if the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than the second preset value, taking the candidate target color as the target color.

[0014] Furthermore, determining the target color from the multiple asymptotic colors includes: determining the color of the previous legend adjacent to the target legend in the target product to obtain color three; comparing the hue value in each asymptotic color with the hue value in color three to select a candidate target color from the multiple asymptotic colors; judging whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value; if the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than the second preset value, then using the candidate target color as the target color.

[0015] Furthermore, comparing the hue value in each asymptotic color with the hue value in the third color to select a candidate target color from the multiple asymptotic colors includes: determining whether the difference between the hue value in each asymptotic color and the hue value in the third color is greater than a first preset value; and selecting the asymptotic color whose hue value difference with the hue value in the third color is greater than the first preset value as the candidate target color.

[0016] Further, if there are multiple candidate target colors, determining whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value includes: determining whether the difference between the hue value of each candidate target color and the hue value in the color of each initial legend is greater than the second preset value.

[0017] Furthermore, the method also includes: when there are multiple candidate target colors whose hue values ​​have a difference greater than the second preset value than the hue value in the color of each initial legend, the candidate target color with the largest difference between the hue value in the multiple candidate target colors and the hue value in the color of each initial legend is used as the target color, and the candidate target color with the largest difference between the hue value in the multiple candidate target colors and the hue value in the color of each initial legend is used as the target color, or, when there is no candidate target color whose hue value has a difference greater than the second preset value than the hue value in the color of each initial legend, the candidate target color with the largest difference between the hue value in the multiple candidate target colors and the hue value in the color of each initial legend is used as the target color.

[0018] Furthermore, after determining whether the difference between the hue value in each asymptotic color and the hue value in the color three is greater than a first preset value, the method also includes: when there is no asymptotic color whose hue value difference with the hue value in the color three is greater than the first preset value, the asymptotic color with the largest difference between the hue value in the multiple asymptotic colors and the hue value in the color three is selected as the candidate target color.

[0019] Furthermore, selecting the colors of two initial legends from multiple initial legends in the target product to obtain color one and color two includes: selecting two adjacent initial legends from multiple initial legends in the target product; and using the colors of the two adjacent initial legends as color one and color two.

[0020] Furthermore, after determining whether the difference between the hue value in each asymptotic color and the hue value in color three is greater than a first preset value, the method also includes: if there is an asymptotic color among multiple asymptotic colors whose hue value difference with the hue value in color three is less than or equal to the first preset value, and there is an asymptotic color whose hue value difference with the hue value in color three is greater than the first preset value; the asymptotic color whose hue value difference with the hue value in color three is less than or equal to the first preset value is determined as a similar visual color of color three, and the similar visual color is deleted; the asymptotic color whose hue value difference with the hue value in color three is greater than the first preset value is determined as a non-similar visual color of color three.

[0021] Furthermore, after determining whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value, the method also includes: if there is a candidate target color among the multiple candidate target colors whose hue value difference between the hue value and the hue value in the color of each initial legend is greater than the second preset value, and there is a candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is less than or equal to the second preset value; determine the candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is less than or equal to the second preset value as a similar visual color of the initial legend, and delete the similar visual color; determine the candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is greater than the second preset value as a non-similar visual color of the initial legend.

[0022] To achieve the above-mentioned objectives, according to another aspect of the present application, a color matching processing device is provided. The device includes: a first determination unit, configured to determine a plurality of initial legends pre-configured in a target product and the color of each initial legend; a first detection unit, configured to, upon detecting the addition of a new target legend to the target product, select the colors of two initial legends from the plurality of initial legends in the target product to obtain color one and color two; a second determination unit, configured to determine a target color based on color one and color two, wherein the target color is an intermediate color between the colors of the two initial legends; and a first rendering unit, configured to render the target legend in the target product using the target color.

[0023] Furthermore, the second determination unit includes: a first conversion subunit, used to convert the color one and the color two to color space one, to obtain color parameter one corresponding to the color one in the color space one, and color parameter two corresponding to the color two in the color space; a first determination subunit, used to determine multiple asymptotic colors between the color one and the color two based on the color parameter one and the color parameter two; a second determination subunit, used to determine the target color from the multiple asymptotic colors.

[0024] Furthermore, the first determination subunit includes: a first determination module, used to determine multiple candidate asymptotic colors between the color one and the color two using an arithmetic progression calculation method based on the color parameter one and the color parameter two; a first correction module, used to correct the multiple candidate asymptotic colors using the interpolation of the color parameter one and the interpolation of the color parameter one; a first conversion module, used to convert the corrected multiple candidate asymptotic colors to color space two; and a second determination module, used to use the converted multiple candidate asymptotic colors as multiple asymptotic colors between the color one and the color two.

[0025] Furthermore, the color space is a one-dimensional LCH color space, and the second determination unit includes: a second conversion subunit, used to convert the color one and the color two into the LCH color space to obtain the lightness, chroma, and hue angle of the color one and the lightness, chroma, and hue angle of the color two; a third determination subunit, used to determine multiple asymptotic colors between the color one and the color two based on the lightness, chroma, and hue angle of the color one and the lightness, chroma, and hue angle of the color two; and a fourth determination subunit, used to determine the target color from the multiple asymptotic colors.

[0026] Furthermore, the first determination subunit includes: a third determination module, used to use an arithmetic progression calculation method to calculate the lightness, chroma, hue angle of color one and the lightness, chroma, hue angle of color two to determine multiple candidate asymptotic colors between color one and color two; a second correction module, used to use the interpolation of the three numerical values ​​of lightness, chroma, and hue angle of color one and the interpolation of the three numerical values ​​of lightness, chroma, and hue angle of color two to correct the multiple candidate asymptotic colors; a second conversion module, used to convert the corrected multiple candidate asymptotic colors into the HSL color space; a fourth determination module, used to use the converted multiple candidate asymptotic colors as multiple asymptotic colors between color one and color two.

[0027] Furthermore, the second determination subunit includes: a fifth determination module, used to determine the color of the previous legend adjacent to the target legend in the target product to obtain color three; a first comparison module, used to compare each progressive color with color three to determine the target color from multiple progressive colors.

[0028] Furthermore, the first comparison module includes: a first comparison submodule, used to compare the hue value in each progressive color with the hue value in color three to select a candidate target color from multiple progressive colors; a first judgment submodule, used to judge whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value; a determination submodule, used to use the candidate target color as the target color based on the difference between the hue value of the candidate target color and the hue value in the color of each initial legend being greater than the second preset value.

[0029] Furthermore, the first comparison module is also used to determine whether the difference between the hue value in each progressive color and the hue value in the third color is greater than a first preset value; and the progressive color whose hue value difference with the hue value in the third color is greater than the first preset value is taken as a candidate target color.

[0030] Furthermore, if there are multiple candidate target colors, the first judgment module includes: a second judgment submodule, configured to judge whether the difference between the hue value of each candidate target color and the hue value of each initial legend color is greater than a second preset value.

[0031] Furthermore, the device also includes: a first processing unit, which is used to use the candidate target color with the largest difference in hue value between the multiple candidate target colors and the hue value in the color of each initial legend as the target color when there are multiple candidate target colors whose hue values ​​have a difference greater than a second preset value between them and the hue value in the color of each initial legend; or, when there is no candidate target color whose hue value has a difference greater than the second preset value between it and the hue value in the color of each initial legend, use the candidate target color with the largest difference in hue value between the multiple candidate target colors and the hue value in the color of each initial legend as the target color.

[0032] Furthermore, the device also includes: a third determination unit, which is used to determine whether the difference between the hue value in each progressive color and the hue value in color three is greater than a first preset value. If there is no progressive color whose hue value difference with the hue value in color three is greater than the first preset value, then the progressive color with the largest difference between the hue value in multiple progressive colors and the hue value in color three is used as a candidate target color.

[0033] Furthermore, the first detection unit includes: a first selection subunit, used to select two adjacent initial legends from multiple initial legends in the target product; and a third determination subunit, used to use the colors of the two adjacent initial legends as color one and color two.

[0034] Furthermore, the device also includes: a first judgment unit, which is used to determine whether the difference between the hue value in each progressive color and the hue value in color three is greater than a first preset value. If there is a progressive color among multiple progressive colors whose difference between the hue value and the hue value in color three is less than or equal to the first preset value, and there is a progressive color whose difference between the hue value and the hue value in color three is greater than the first preset value; a first deletion unit, which is used to determine the progressive color whose difference between the hue value and the hue value in color three is less than or equal to the first preset value as a similar visual color of color three, and delete the similar visual color; a fourth determination unit, which is used to determine the progressive color whose difference between the hue value and the hue value in color three is greater than the first preset value as a non-similar visual color of color three.

[0035] Furthermore, the device also includes: a second judgment unit, which is used to determine whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value. If there is a candidate target color among multiple candidate target colors whose hue value difference between the hue value and the hue value in the color of each initial legend is greater than the second preset value, and there is a candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is less than or equal to the second preset value; a second deletion unit, which is used to determine the candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is less than or equal to the second preset value as a similar visual color of the initial legend, and delete the similar visual color; a fifth determination unit, which is used to determine the candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is greater than the second preset value as a non-similar visual color of the initial legend.

[0036] According to another aspect of an embodiment of the present application, a processor is further provided, and the processor is used to run a program, wherein any one of the above methods is executed when the program is run.

[0037] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, any one of the above methods is performed.

[0038] Through this application, the following steps are adopted: determining multiple initial legends pre-configured in the target product and the color of each initial legend; when a new target legend is detected in the target product, selecting the colors of two initial legends from the multiple initial legends in the target product to obtain color one and color two; determining the target color based on color one and color two, wherein the target color is the middle color of the colors of the two initial legends; rendering the target legend in the target product using the target color, thereby solving the problem of poor color matching effect of the legend in the product. By determining the color of the newly added legend based on the initial legends pre-configured in the target product and the colors of the initial legends, the color is the middle color of the color of the initial legend, thereby avoiding the situation where the color of the newly added legend is repeated or similar to the color of the initial legend, thereby automatically rendering the color of the newly added legend using the target color (middle color) obtained by the above scheme, improving the efficiency and accuracy of legend color generation, and when users search for legends in the product, they can quickly search and distinguish based on color, thereby achieving the effect of improving the efficiency of searching for content by color in the product. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which constitute part of this application, are intended to provide a further understanding of this application. The exemplary embodiments and descriptions of this application are intended to explain this application and do not constitute an improper limitation on this application. In the accompanying drawings:

[0040] Figure 1 is a flow chart of a color matching method provided in an embodiment of the present application;

[0041] Figure 2 is a schematic diagram of asymptotic colors in a color matching method provided in an embodiment of the present application;

[0042] Figure 3 is a flow chart of a color matching method provided in an embodiment of the present application;

[0043] Figure 4 is a flow chart of a color matching method provided in an embodiment of the present application;

[0044] Figure 5 is a schematic diagram of an optional color matching processing method provided according to an embodiment of the present application;

[0045] Figure 6 Schematic diagram of a color matching processing device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0046] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0047] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0048] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0049] According to an embodiment of the present application, a color matching method is provided.

[0050] Figure 1This is a flow chart of the color matching method according to an embodiment of the present application. Figure 1 As shown, the method includes the following steps:

[0051] Step S101 : determining a plurality of initial legends pre-configured in a target product and the color of each initial legend.

[0052] For example, the target product is a chart, which includes six legends. These six legends are pre-configured with colors. In this application, the pre-configured legends are used as the initial legends. It should be noted that the method of pre-configuring the colors of the legends can be user-defined or pre-configured by the background according to color matching rules.

[0053] It should be noted that the above-mentioned legends can be various types of legends, such as: line charts, column charts, pie charts, bar charts, area charts, etc.

[0054] Step S102 , when it is detected that a new target legend is added to the target product, the colors of two initial legends are selected from the multiple initial legends in the target product to obtain color one and color two.

[0055] For example, if a chart includes six legends, namely Legend 1, Legend 2, Legend 3, Legend 4, Legend 5, and Legend 6, select Legend 1 and Legend 6, set the color of Legend 1 as Color 1, and the color of Legend 6 as Color 2. Alternatively, select Legend 1 and Legend 2, set the color of Legend 1 as Color 1, and the color of Legend 2 as Color 2. That is, select two adjacent initial legends from multiple initial legends in the chart, and set the colors of the two adjacent initial legends as Color 1 and Color 2.

[0056] Step S103 : determining a target color according to the first color and the second color, wherein the target color is an intermediate color between the two initial legend colors.

[0057] It should be noted that the hue value of the intermediate color is between the hue value of color one and the hue value of color two.

[0058] Step S104: Rendering a target legend in the target product using a target color.

[0059] Since the determined target color is the middle color between the colors of the two initial legends, and there is a gap between the middle color and the color of the initial legend, it will not be indistinguishable due to similar color arrangement, thereby avoiding the situation where the color of the newly added legend configuration is repeated or similar to the color of the initial legend in the target product, causing color confusion. Therefore, the target color (middle color) obtained by the above scheme is used to automatically render the color of the newly added legend in the product, thereby improving the efficiency of legend color generation. In addition, when users search for legends in the target product, they can quickly search and distinguish based on color, thereby achieving the effect of improving the efficiency of searching for content by color in the product.

[0060] Optionally, in the color matching processing method provided in the embodiment of the present application, determining the target color based on the color one and the color two includes: converting the color one and the color two to color space one, obtaining color parameter one corresponding to the color one in the color space one, and color parameter two corresponding to the color two in the color space, and determining multiple asymptotic colors between the color one and the color two based on the color parameter one and the color parameter two; and determining the target color from the multiple asymptotic colors.

[0061] It should be noted that the color space 1 described above can convert color 1 and color 2 into computer-recognizable values, that is, color parameter 1 and color parameter 2 are computer-recognizable values. For example, the color space can be an LCH color space, an RGB color space, an HSV color space, etc.

[0062] Through the above solution, it is possible to define how to determine the target color based on color one and color two, thereby ensuring the accuracy of determining the target color.

[0063] Optionally, in the color matching processing method provided in the embodiment of the present application, determining multiple asymptotic colors between the color one and the color two based on the color parameter one and the color parameter two includes: determining multiple candidate asymptotic colors between the color one and the color two using an arithmetic progression calculation method based on the color parameter one and the color parameter two; correcting the multiple candidate asymptotic colors using the interpolation of the color parameter one and the interpolation of the color parameter one; converting the corrected multiple candidate asymptotic colors to color space two; and using the converted multiple candidate asymptotic colors as the multiple asymptotic colors between the color one and the color two.

[0064] It should be noted that, the corrected multiple candidate asymptotic colors are converted through the above color space, and the converted candidate asymptotic colors include hue values, so that the target color is subsequently selected from the multiple candidate asymptotic colors based on the hue values.

[0065] Through the above scheme, it is possible to define how to determine multiple asymptotic colors between the color one and the color two based on the color parameter one and the color parameter two, thereby ensuring the accuracy of determining the asymptotic colors and further ensuring the accuracy of determining the target color.

[0066] Optionally, in the color matching processing method provided in the embodiment of the present application, determining the target color based on color one and color two includes: converting color one and color two to the LCH color space to obtain the lightness, chroma, and hue angle of color one and the lightness, chroma, and hue angle of color two; determining multiple asymptotic colors between color one and color two based on the lightness, chroma, and hue angle of color one and the lightness, chroma, and hue angle of color two; and determining the target color from the multiple asymptotic colors.

[0067] For example, the chart includes 6 legends, namely Legend 1, Legend 2, Legend 3, Legend 4, Legend 5 and Legend 6. Select Legend 1 and Legend 2, and set the color of Legend 1 as Color 1 and the color of Legend 2 as Color 2. Figure 2 As shown, the RGB values ​​of color one and color two are input into the conversion tool, and color one and color two are converted into the LCH color space to obtain the lightness, chroma, and hue angle of color one and the lightness, chroma, and hue angle of color two, thereby determining multiple asymptotic colors (for example, 4 asymptotic colors) between color one and color two based on the lightness, chroma, and hue angle of color one and the lightness, chroma, and hue angle of color two, and selecting one asymptotic color from the multiple asymptotic colors as the target color.

[0068] In the above solution, how to determine the target color based on color one and color two is further defined, thereby ensuring the accuracy of determining the target color.

[0069] Optionally, in the color matching processing method provided in the embodiment of the present application, determining multiple asymptotic colors between color one and color two based on the lightness, chroma, hue angle of color one and the lightness, chroma, hue angle of color two includes: using an arithmetic progression to calculate the lightness, chroma, hue angle of color one and the lightness, chroma, hue angle of color two to determine multiple candidate asymptotic colors between color one and color two; correcting the multiple candidate asymptotic colors by interpolating the three values ​​of lightness, chroma, and hue angle of color one and the three values ​​of lightness, chroma, and hue angle of color two; converting the corrected multiple candidate asymptotic colors to the HSL color space; and using the converted multiple candidate asymptotic colors as the multiple asymptotic colors between color one and color two.

[0070] Since the multiple candidate asymptotic colors between color one and color two are determined by using an arithmetic progression calculation method, there may be multiple candidate asymptotic colors that are not suitable colors. In order to ensure the accuracy of the colors, after the multiple candidate asymptotic colors are determined, the multiple candidate asymptotic colors are corrected by interpolating the three values ​​of the lightness, chroma, and hue angle of color one and the lightness, chroma, and hue angle of color two, thereby ensuring the accuracy of the corrected multiple candidate asymptotic colors. Then, the corrected multiple candidate asymptotic colors are converted to the HSL color space. The hue value of the converted color one is 152, the saturation is 177, and the brightness is 138. The hue value of the converted color two is 111, the saturation is 182, and the brightness is 109. There are four candidate asymptotic colors after conversion, namely asymptotic color 1 (hue value is 145, saturation is 151, and brightness is 126), asymptotic color 2 (hue value is 137, saturation is 152, and brightness is 114), asymptotic color 3 (hue value is 128, saturation is 153, and brightness is 102), and asymptotic color 4 (hue value is 111, saturation is 182, and brightness is 109). The converted multiple candidate asymptotic colors are used as multiple asymptotic colors between color one and color two, as shown in FIG. Figure 3 shown.

[0071] Optionally, in the color matching processing method provided in an embodiment of the present application, determining the target color from multiple progressive colors includes: determining the color of the previous legend adjacent to the target legend in the target product to obtain color three; comparing each progressive color with color three to determine the target color from multiple progressive colors.

[0072] For example, the target product includes six legends: Legend 1, Legend 2, Legend 3, Legend 4, Legend 5, and Legend 6. The previous legend in the target product adjacent to the target legend is Legend 6. Multiple gradient colors are compared to Legend 6 to accurately determine the target color for rendering the target legend from multiple gradient colors. This solution avoids color confusion caused by duplicate or similar colors between the newly added legend and the adjacent legend.

[0073] Optionally, in the color matching processing method provided in an embodiment of the present application, comparing the hue value in each asymptotic color with the hue value in color three to determine the target color from multiple asymptotic colors includes: comparing the hue value in each asymptotic color with the hue value in color three to select a candidate target color from multiple asymptotic colors; judging whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value; if the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than the second preset value, then using the candidate target color as the target color.

[0074] For example, a chart includes six legends, namely Legend 1, Legend 2, Legend 3, Legend 4, Legend 5, and Legend 6. The previous legend in the chart adjacent to the target legend is Legend 6, and the hue value of Legend 6 is 120. The hue values ​​of Gradient Color 1, Gradient Color 2, Gradient Color 3, and Gradient Color 4 are compared with the hue value of Legend 6 to select a candidate target color from the multiple gradient colors. For example, Gradient Color 1 is selected as the candidate target color, and then it is determined whether the difference in hue value between Gradient Color 1 and the color of each initial legend is greater than 10. For example, if it is determined that the difference in hue value between Gradient Color 1 and the color of each initial legend is greater than 10, Gradient Color 1 is selected as the target color and used to render the newly added target legend. Through the above scheme, the target color is accurately determined from the multiple gradient colors and used to render the newly added target legend, thereby avoiding the situation where the color configured for the target legend overlaps with the color of the initial legends in the chart.

[0075] For example, Figure 4 As shown in the following example, when Legend 7 is added to the chart, the color of Legend 7 is automatically rendered as the target color, that is, the color of Legend 7 is set to the midpoint between the colors of Legend 1 and Legend 2. It should be noted that when multiple legends are added, for example, Legend 8, Legend 9, Legend 12, Legend 13, and so on, the color of Legend 8 is set to the midpoint between the colors of Legend 2 and Legend 3, the color of Legend 12 is set to the midpoint between the colors of Legend 1 and Legend 6, the color of Legend 13 is set to the midpoint between the colors of Legend 7 and Legend 8, and so on.

[0076] Optionally, in the color matching processing method provided in the embodiment of the present application, comparing the hue value in each asymptotic color with the hue value in color three to select a candidate target color from multiple asymptotic colors includes: determining whether the difference between the hue value in each asymptotic color and the hue value in color three is greater than a first preset value; and selecting the asymptotic color whose hue value difference with the hue value in color three is greater than the first preset value as a candidate target color.

[0077] For example, a chart includes six legends, namely Legend 1, Legend 2, Legend 3, Legend 4, Legend 5, and Legend 6. The previous legend adjacent to the target legend in the chart is Legend 6, and the hue value of Legend 6 is 120. The hue values ​​in asymptotic color 1, asymptotic color 2, asymptotic color 3, and asymptotic color 4 are compared with the hue value of Legend 6. For example, the first preset value is 10 and the second preset value is 10. It is determined whether the difference between the hue value in each asymptotic color and the hue value in color three is greater than 10. If the difference between the hue value in asymptotic color 1 and the hue value in color three is greater than 10, asymptotic color 1 is selected as a candidate target color. Through the above scheme, a candidate target color can be accurately obtained from multiple asymptotic colors based on adjacent legends.

[0078] Optionally, in the color matching processing method provided in an embodiment of the present application, if there are multiple candidate target colors, determining whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value includes: determining whether the difference between the hue value of each candidate target color and the hue value in the color of each initial legend is greater than the second preset value.

[0079] In addition, the method also includes: when there are multiple candidate target colors whose hue values ​​have a difference greater than a second preset value from the hue value in the color of each initial legend, the candidate target color with the largest difference between the hue value in the multiple candidate target colors and the hue value in the color of each initial legend is used as the target color; or, when there is no candidate target color whose hue value has a difference greater than the second preset value from the hue value in the color of each initial legend, the candidate target color with the largest difference between the hue value in the multiple candidate target colors and the hue value in the color of each initial legend is used as the target color.

[0080] For example, if it is determined that the difference between the hue value of asymptotic color 1 and asymptotic color 2 and color three is greater than 10, asymptotic color 1 and asymptotic color 2 are used as candidate target colors, and then it is determined whether the difference between the hue value of asymptotic color 1 and asymptotic color 2 and the color of each initial legend is greater than 10 (a second preset value). For example, if it is determined that the difference between the hue value of asymptotic color 1 and the color of each initial legend is greater than 10, asymptotic color 1 is used as the target color, and the newly added target legend is rendered using asymptotic color 1. Since the difference between the hue value of asymptotic color 2 and the color of each initial legend is not greater than 10, asymptotic color 2 is determined to be a similar visual color to the initial legend, and asymptotic color 2 is deleted.

[0081] If the difference between the hue value of asymptotic color 1 and asymptotic color 2 and the color of each initial legend is greater than a second preset value (for example, the second preset value is 10), the difference between the hue value of asymptotic color 1 and the color of each initial legend is 18, and the difference between the hue value of asymptotic color 2 and the color of each initial legend is 15, asymptotic color 1 is used as the target color, that is, the candidate target color with the largest difference between the hue value and the hue value of the color of each initial legend among multiple candidate target colors is used as the target color.

[0082] If the difference between the hue value of asymptotic color 1 and asymptotic color 2 and the color of each initial legend is not greater than a second preset value (for example, the second preset value is 20), the difference between the hue value of asymptotic color 1 and the color of each initial legend is 18, and the difference between the hue value of asymptotic color 2 and the color of each initial legend is 15, asymptotic color 1 is used as the target color, that is, the candidate target color with the largest difference between the hue value of multiple candidate target colors and the hue value of the color of each initial legend is used as the target color.

[0083] Through the above scheme, when there are multiple target colors that meet the conditions or there is no target color, the candidate target color with the largest difference in hue value from the color in each initial legend is used as the target color, thereby ensuring that the target color can be determined from multiple candidate target colors.

[0084] Optionally, in the color matching processing method provided in the embodiment of the present application, after determining whether the difference between the hue value in each asymptotic color and the hue value in color three is greater than a first preset value, the method further includes: if there is no asymptotic color whose hue value difference with the hue value in color three is greater than the first preset value, then the asymptotic color with the largest difference between the hue value in multiple asymptotic colors and the hue value in color three is selected as a candidate target color.

[0085] For example, the difference between the hue value of progressive color 1 and color three is 18, the difference between the hue value of progressive color 2 and color three is 13, the difference between the hue value of progressive color 3 and color three is 10, the difference between the hue value of progressive color 1 and color three is 8, and the differences between the hue values ​​of progressive color 1, progressive color 2, progressive color 3, and progressive color 4 and color three are all no greater than 20 (a first preset value), that is, there is no progressive color whose hue value difference with the hue value in color three is greater than the first preset value. In this case, progressive color 1 is selected as the candidate target color, that is, the progressive color with the largest difference between the hue value of multiple progressive colors and the hue value in color three is selected as the candidate target color.

[0086] Through the above scheme, when there is no candidate target color, the asymptotic color with the largest difference between the hue value of the multiple asymptotic colors and the hue value of color three is used as the candidate target color, thereby ensuring that the candidate target color can be determined from the multiple asymptotic colors.

[0087] Optionally, in the color matching processing method provided in the embodiment of the present application, after determining whether the difference between the hue value in each asymptotic color and the hue value in color three is greater than a first preset value, the method further includes: if there is an asymptotic color among multiple asymptotic colors whose hue value difference with the hue value in color three is less than or equal to the first preset value, and there is an asymptotic color whose hue value difference with the hue value in color three is greater than the first preset value; the asymptotic color whose hue value difference with the hue value in color three is less than or equal to the first preset value is determined as a similar visual color of color three, and the similar visual color is deleted; the asymptotic color whose hue value difference with the hue value in color three is greater than the first preset value is determined as a non-similar visual color of color three.

[0088] For example, multiple asymptotic colors are asymptotic color 1, asymptotic color 2, asymptotic color 3, and asymptotic color 4. The difference between the hue value of asymptotic color 1 and asymptotic color 2 and the hue value in color three is greater than a first preset value, and the difference between the hue value of asymptotic color 3 and asymptotic color 4 and the hue value in color three is less than or equal to a first preset value; asymptotic color 1 and asymptotic color 2 are determined as non-similar visual colors of color three, asymptotic color 3 and asymptotic color 4 are determined as similar visual colors of color three, and asymptotic colors 3 and 4 are deleted. It should be noted that similar visual colors indicate that the difference in hue value between the colors of the legends is less than the preset difference, thereby giving the user the impression that the colors of the legends are similar in perspective. Similar visual colors indicate that the difference in hue value between the colors of the legends is greater than or equal to the preset difference, thereby giving the user the impression that the colors of the legends are not similar in perspective.

[0089] Through the above scheme, it is possible to distinguish whether the asymptotic color is a similar visual color of color three or a non-similar visual color, and delete the asymptotic color of the similar visual color to reduce the occupied memory space and avoid resource waste.

[0090] Optionally, in the color matching processing method provided in the embodiment of the present application, after determining whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value, the method further includes: if there is a candidate target color among multiple candidate target colors whose hue value difference between the hue value and the hue value in the color of each initial legend is greater than the second preset value, and there is a candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is less than or equal to the second preset value; determine the candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is less than or equal to the second preset value as a similar visual color of the initial legend, and delete the similar visual color; determine the candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is greater than the second preset value as a non-similar visual color of the initial legend.

[0091] For example, multiple candidate target colors are asymptotic color 1 and asymptotic color 2, the difference between the hue value of asymptotic color 1 and the hue value in the color of each initial legend is greater than a second preset value, and the difference between the hue value of asymptotic color 2 and the hue value in the color of each initial legend is less than or equal to the second preset value, and asymptotic color 1 is determined as a non-similar visual color of the initial legend. Asymptotic color 2 is determined as a similar visual color of the initial legend, and asymptotic color 2 is deleted. It should be noted that similar visual colors indicate that the difference in hue values ​​of the colors between the legends is less than the preset difference, thereby giving the user the feeling that the colors of the legends are similar in perspective. Similar visual colors indicate that the difference in hue values ​​of the colors between the legends is greater than or equal to the preset difference, thereby giving the user the feeling that the colors of the legends are not similar in perspective.

[0092] Through the above scheme, it is possible to distinguish whether the candidate target color is a similar visual color or a non-similar visual color to the initial legend, and delete the candidate target colors with similar visual colors to reduce the occupied memory space and avoid resource waste.

[0093] In summary, the color matching processing method provided by the embodiment of the present application determines the multiple initial legends pre-configured in the target product and the color of each initial legend; when a new target legend is detected in the target product, the colors of two initial legends are selected from the multiple initial legends in the target product to obtain color one and color two; the target color is determined based on color one and color two, wherein the target color is the middle color of the colors of the two initial legends; the target legend is rendered in the product using the target color, thereby solving the problem of poor color matching effect of the legend in the product. By determining the color of the newly added legend based on the initial legends pre-configured in the target product and the colors of the initial legends, the color is the middle color of the color of the initial legend, thereby avoiding the situation where the color of the newly added legend is repeated or similar to the color of the initial legend, causing color confusion, and automatically rendering the newly added legend with the target color (middle color) obtained by the above scheme, thereby improving the efficiency and accuracy of legend color generation. When the user searches for the legend in the product, he can quickly search and distinguish based on color, thereby achieving the effect of improving the efficiency of searching for content by color in the product.

[0094] Figure 5 is a schematic diagram of an optional color matching method provided in an embodiment of the present application, such as Figure 5As shown, select color 1 and color 2 in the legend of the chart, convert color 1 and color 2 to LCH color space, calculate 6 asymptotic colors including color 1 and color 2 according to the arithmetic progression, use the interpolation of the three values ​​of L (lightness), C (chroma), and H (hue angle) of color 1 and color 2 to correct the 4 asymptotic colors except color 1 and color 2, and then convert these 6 colors back to HSL color space. In addition to the 2 primary colors (color 1 and color 2), the other 4 asymptotic colors are named color A, color B, color C, and color D. In the HSL color space, first convert the hue values ​​of color A, color B, color C, and color D (corresponding to Figure 2 The H value in the chart) is used to calculate the difference between the hue value of color A (the last existing legend in the chart, which is also the adjacent legend to the newly added legend). When the difference is greater than 10, the two are judged to be non-visually similar colors and can be used adjacent to each other. Conversely, if the difference is not greater than 10, the two are visually similar colors and cannot be used adjacent to each other. For example, if the hue values ​​of color A, color B, color C, and color D are all less than 10 with the hue value of color n, then the color with the largest difference in hue value with the hue value of color n is selected. For another example, if the difference between the hue values ​​of color C and color D and the hue value of color n is less than 10, color C and color D are considered to be visually similar colors to color n, and then color C and color D are discarded. For example, if the difference between the hue values ​​of color A and color B and the hue value of color n is greater than 10, color C and color D are considered to be non-visually similar colors to color n. Then, the difference between the hue values ​​of Colors A and B, which are not visually similar, and the hue values ​​of all legend colors in the chart is calculated. If the difference between the hue values ​​of Color A and all legend colors in the chart is greater than 10, Color A is used as the midpoint between Colors 1 and 2, and the newly added legend color is rendered using Color A. If the difference between the hue values ​​of Colors A and B and all legend colors in the chart is greater than 10, for example, the difference between the hue values ​​of Color A and all legend colors in the chart is 18, and the difference between the hue values ​​of Color B and all legend colors in the chart is 12, Color A is used as the midpoint between Colors 1 and 2. If the difference between the hue values ​​of Colors A and B and all legend colors in the chart is no greater than 10, for example, the difference between the hue values ​​of Color A and all legend colors in the chart is 8, and the difference between the hue values ​​of Color B and all legend colors in the chart is 2, Color A is used as the midpoint between Colors 1 and 2. That is, when there are multiple colors that meet the conditions, or when there is no color that meets the conditions, the color whose hue value is the largest different from the hue values ​​of all legend colors in the chart is selected.

[0095] Therefore, through this solution, as long as the color spectrum and the color matching processing method provided by the embodiment of the present application are introduced into the program during the development process, the color of the legend can be automatically and intelligently generated, which can reduce manual intervention and calculation and improve convenience. The technical solution of the present application can ensure that the colors will not be repeated even when there are an infinite number of legends, which is conducive to users to quickly find information through colors and improve the level of visualization. In addition, the color matching processing method provided by the embodiment of the present application can be used in all types of charts and all products involving color generation, and has a wide range of applications. For example, the product involving color generation is a calendar. When making plans in the calendar, specific items are distinguished by color. In the calendar, the study items are configured with green, the work items are configured with red, and so on. When new items are added, the newly added items can be rendered in color based on the color matching scheme of the present application, thereby improving the rendering effect of the new items.

[0096] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0097] The embodiment of the present application further provides a color matching processing device. It should be noted that the color matching processing device of the embodiment of the present application can be used to execute the color matching processing method provided in the embodiment of the present application. The color matching processing device provided in the embodiment of the present application is introduced below.

[0098] Figure 6 Schematic diagram of a color matching device according to an embodiment of the present application. Figure 6 As shown, the device includes: a first determination unit 601, a first detection unit 602, a second determination unit 603, and a first rendering unit 604.

[0099] Specifically, the first determining unit 601 is configured to determine a plurality of initial legends pre-configured in the target product and the color of each initial legend;

[0100] The first detection unit 602 is configured to, upon detecting that a new target legend is added to the target product, select two colors of the initial legends from the multiple initial legends in the target product to obtain color one and color two;

[0101] A second determining unit 603 is configured to determine a target color based on the first color and the second color, wherein the target color is an intermediate color between the two initial legend colors;

[0102] The first rendering unit 604 is configured to render a target legend in a target product using a target color.

[0103] In summary, the color matching processing device provided in the embodiment of the present application determines the multiple initial legends pre-configured in the target product and the color of each initial legend through the first determination unit 601; when the first detection unit 602 detects that a new target legend is added to the target product, it selects the colors of two initial legends from the multiple initial legends in the target product to obtain color one and color two; the second determination unit 603 determines the target color based on color one and color two, wherein the target color is the middle color of the two initial legends; the first rendering unit 604 uses the target color to render the target legend in the target product, thereby solving the problem of poor color matching effect of the legend in the product. By determining the color of the newly added legend based on the initial legend pre-configured in the target product and the color of the initial legend, the color is the intermediate color of the initial legend, thereby avoiding the situation where the color of the newly added legend is repeated or similar to the color of the initial legend, causing color confusion. The target color (intermediate color) obtained by the above scheme is used to automatically render the color of the newly added legend, thereby improving the efficiency and accuracy of legend color generation. When users search for legends in the product, they can quickly search and distinguish based on color, thereby achieving the effect of improving the efficiency of searching for content by color in the product.

[0104] Optionally, in the color matching processing device provided in the embodiment of the present application, the second determination unit includes: a first conversion subunit, used to convert the color one and the color two to color space one, and obtain color parameter one corresponding to the color one in the color space one, and color parameter two corresponding to the color two in the color space; a first determination subunit, used to determine multiple asymptotic colors between the color one and the color two based on the color parameter one and the color parameter two; a second determination subunit, used to determine the target color from the multiple asymptotic colors.

[0105] Optionally, in the color matching processing device provided in the embodiment of the present application, the first determination subunit includes: a first determination module, used to determine a plurality of candidate asymptotic colors between the color one and the color two using an arithmetic progression calculation method based on the color parameter one and the color parameter two; a first correction module, used to correct the plurality of candidate asymptotic colors using the interpolation of the color parameter one and the interpolation of the color parameter one; a first conversion module, used to convert the corrected plurality of candidate asymptotic colors to color space two; and a second determination module, used to use the converted plurality of candidate asymptotic colors as the plurality of asymptotic colors between the color one and the color two.

[0106] Optionally, in the color matching processing device provided in the embodiment of the present application, the color space is a one-dimensional LCH color space, and the second determination unit includes: a second conversion subunit, used to convert the color one and the color two into the LCH color space to obtain the lightness, chroma, and hue angle of the color one and the lightness, chroma, and hue angle of the color two; a third determination subunit, used to determine multiple asymptotic colors between the color one and the color two based on the lightness, chroma, and hue angle of the color one and the lightness, chroma, and hue angle of the color two; and a fourth determination subunit, used to determine the target color from the multiple asymptotic colors.

[0107] Optionally, in the color matching processing device provided in the embodiment of the present application, the first determination subunit includes: a third determination module, which is used to use an arithmetic progression to calculate the lightness, chroma, hue angle of color one and the lightness, chroma, and hue angle of color two to determine multiple candidate asymptotic colors between color one and color two; a second correction module, which is used to correct the multiple candidate asymptotic colors by interpolating the three values ​​of lightness, chroma, and hue angle of color one and the three values ​​of lightness, chroma, and hue angle of color two; a second conversion module, which is used to convert the corrected multiple candidate asymptotic colors into the HSL color space; and a fourth determination module, which is used to use the converted multiple candidate asymptotic colors as multiple asymptotic colors between color one and color two.

[0108] Optionally, in the color matching processing device provided in an embodiment of the present application, the second determination subunit includes: a fifth determination module, used to determine the color of the previous legend adjacent to the target legend in the target product to obtain color three; a first comparison module, used to compare each progressive color with color three to determine the target color from multiple progressive colors.

[0109] Optionally, in the color matching processing device provided in the embodiment of the present application, the first comparison module includes: a first comparison submodule, used to compare the hue value in each progressive color with the hue value in color three to select a candidate target color from multiple progressive colors; a first judgment submodule, used to judge whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value; a determination submodule, used to use the candidate target color as the target color based on the fact that the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than the second preset value.

[0110] Optionally, in the color matching processing device provided in the embodiment of the present application, the first comparison module is also used to determine whether the difference between the hue value in each progressive color and the hue value in color three is greater than a first preset value; and the progressive color whose hue value differs from the hue value in color three is greater than the first preset value is used as a candidate target color.

[0111] Optionally, in the color matching processing device provided in an embodiment of the present application, if there are multiple candidate target colors, the first judgment module includes: a second judgment submodule, used to determine whether the difference between the hue value of each candidate target color and the hue value in the color of each initial legend is greater than a second preset value.

[0112] Optionally, in the color matching processing device provided in the embodiment of the present application, the device also includes: a first processing unit, which is used to select the candidate target color with the largest difference in hue value between the multiple candidate target colors and the hue value in the color of each initial legend as the target color if there are multiple candidate target colors whose hue values ​​have a difference greater than a second preset value between them and the hue value in the color of each initial legend, or if there is no candidate target color whose hue value has a difference greater than the second preset value between it and the hue value in the color of each initial legend.

[0113] Optionally, in the color matching processing device provided in the embodiment of the present application, the device also includes: a third determination unit, which is used to determine whether the difference between the hue value in each asymptotic color and the hue value in color three is greater than a first preset value. If there is no asymptotic color whose hue value difference with the hue value in color three is greater than the first preset value, then the asymptotic color with the largest difference between the hue value in multiple asymptotic colors and the hue value in color three is used as a candidate target color.

[0114] Optionally, in the color matching processing device provided in an embodiment of the present application, the first detection unit includes: a first selection subunit, used to select two adjacent initial legends from multiple initial legends in the target product; and a third determination subunit, used to use the colors of the two adjacent initial legends as color one and color two.

[0115] Optionally, in the color matching processing device provided in the embodiment of the present application, the device also includes: a first judgment unit, for judging whether the difference between the hue value in each asymptotic color and the hue value in color three is greater than a first preset value, if there is an asymptotic color among the multiple asymptotic colors whose difference between the hue value and the hue value in color three is less than or equal to the first preset value, and there is an asymptotic color whose difference between the hue value and the hue value in color three is greater than the first preset value; a first deletion unit, for determining the asymptotic color whose difference between the hue value and the hue value in color three is less than or equal to the first preset value as a similar visual color of color three, and deleting the similar visual color; a fourth determination unit, for determining the asymptotic color whose difference between the hue value and the hue value in color three is greater than the first preset value as a non-similar visual color of color three.

[0116] Optionally, in the color matching processing device provided in the embodiment of the present application, the device further includes: a second judgment unit, for judging whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value, if there is a candidate target color among the multiple candidate target colors whose hue value difference between the hue value and the hue value in the color of each initial legend is greater than the second preset value, and there is a candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is less than or equal to the second preset value; a second deletion unit, for determining the candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is less than or equal to the second preset value as a similar visual color of the initial legend, and deleting the similar visual color; a fifth determination unit, for determining the candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is greater than the second preset value as a non-similar visual color of the initial legend.

[0117] The above-mentioned color matching processing device includes a processor and a memory. The above-mentioned first determination unit 601, first detection unit 602, second determination unit 603, first rendering unit 604, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0118] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and color matching can be performed by adjusting kernel parameters.

[0119] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0120] An embodiment of the present invention provides a computer-readable storage medium storing a program, which implements a color matching method when executed by a processor.

[0121] An embodiment of the present invention provides a processor, which is used to run a program, wherein the color matching processing method is executed when the program is run.

[0122] An embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored in the memory and capable of running on the processor. When the processor executes the program, the following steps are implemented: determining multiple initial legends pre-configured in a target product and the color of each initial legend; when a new target legend is detected in the target product, selecting the colors of two initial legends from the multiple initial legends in the target product to obtain color one and color two; determining a target color based on color one and color two, wherein the target color is an intermediate color between the colors of the two initial legends; and rendering the target legend in the target product using the target color.

[0123] When the processor executes the program, the following steps are also implemented: determining the target color based on the color one and the color two includes: converting the color one and the color two to color space one, obtaining color parameter one corresponding to the color one in the color space one, and color parameter two corresponding to the color two in the color space; determining multiple asymptotic colors between the color one and the color two based on the color parameter one and the color parameter two; and determining the target color from the multiple asymptotic colors.

[0124] When the processor executes the program, the following steps are also implemented: determining multiple asymptotic colors between the color one and the color two based on the color parameter one and the color parameter two, including: determining multiple candidate asymptotic colors between the color one and the color two using an arithmetic progression calculation method based on the color parameter one and the color parameter two; correcting the multiple candidate asymptotic colors using the interpolation of the color parameter one and the interpolation of the color parameter one; converting the corrected multiple candidate asymptotic colors to color space two; and using the converted multiple candidate asymptotic colors as the multiple asymptotic colors between the color one and the color two.

[0125] When the processor executes the program, the following steps are also implemented: the color space is a one-dimensional LCH color space, and determining the target color based on the color one and the color two includes: converting the color one and the color two into the LCH color space to obtain the lightness, chroma, and hue angle of the color one and the lightness, chroma, and hue angle of the color two; determining multiple asymptotic colors between the color one and the color two based on the lightness, chroma, and hue angle of the color one and the lightness, chroma, and hue angle of the color two; and determining the target color from the multiple asymptotic colors.

[0126] When the processor executes the program, the following steps are also implemented: based on the lightness, chroma, hue angle of color one and the lightness, chroma, and hue angle of color two, multiple asymptotic colors between color one and color two are determined, including: using an arithmetic progression calculation method on the lightness, chroma, hue angle of color one and the lightness, chroma, and hue angle of color two to determine multiple candidate asymptotic colors between color one and color two; using interpolation of the three values ​​of the lightness, chroma, and hue angle of color one and the three values ​​of the lightness, chroma, and hue angle of color two to correct the multiple candidate asymptotic colors; converting the corrected multiple candidate asymptotic colors into the HSL color space; and using the converted multiple candidate asymptotic colors as the multiple asymptotic colors between color one and color two.

[0127] When the processor executes the program, the following steps are also implemented: determining the target color from the multiple asymptotic colors includes: determining the color of the previous legend adjacent to the target legend in the target product to obtain color three; comparing each asymptotic color with color three to determine the target color from the multiple asymptotic colors.

[0128] When the processor executes the program, the following steps are also implemented: comparing the hue value in each asymptotic color with the hue value in the color three to determine the target color from the multiple asymptotic colors, including: comparing the hue value in each asymptotic color with the hue value in the color three to select a candidate target color from the multiple asymptotic colors; judging whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value; if the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than the second preset value, then using the candidate target color as the target color.

[0129] When the processor executes the program, the following steps are also implemented: determining the target color from multiple asymptotic colors includes: determining the color of the previous legend adjacent to the target legend in the target product to obtain color three; comparing the hue value in each asymptotic color with the hue value in color three, and judging whether the difference between the hue value in each asymptotic color and the hue value in color three is greater than a first preset value; taking the asymptotic color whose hue value differs from the hue value in color three by more than the first preset value as a candidate target color; judging whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value; if the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than the second preset value, taking the candidate target color as the target color.

[0130] When the processor executes the program, the following steps are also implemented: determining the target color from the multiple asymptotic colors includes: determining the color of the previous legend adjacent to the target legend in the target product to obtain color three; comparing the hue value in each asymptotic color with the hue value in the color three to select a candidate target color from the multiple asymptotic colors; judging whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value; if the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than the second preset value, then using the candidate target color as the target color.

[0131] When the processor executes the program, the following steps are also implemented: comparing the hue value in each asymptotic color with the hue value in the third color to select a candidate target color from multiple asymptotic colors, including: determining whether the difference between the hue value in each asymptotic color and the hue value in the third color is greater than a first preset value; and selecting the asymptotic color whose hue value difference with the hue value in the third color is greater than the first preset value as a candidate target color.

[0132] When the processor executes the program, the following steps are also implemented: if there are multiple candidate target colors, determining whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value includes: determining whether the difference between the hue value of each candidate target color and the hue value in the color of each initial legend is greater than a second preset value.

[0133] When the processor executes the program, the following steps are also implemented: the method also includes: when there are multiple candidate target colors whose hue values ​​have a difference with the hue values ​​in the colors of each initial legend that is greater than the second preset value, the candidate target color with the largest difference between the hue values ​​in the multiple candidate target colors and the hue values ​​in the colors of each initial legend is used as the target color, and the candidate target color with the largest difference between the hue values ​​in the multiple candidate target colors and the hue values ​​in the colors of each initial legend is used as the target color, or, when there is no candidate target color whose hue value has a difference with the hue value in the colors of each initial legend that is greater than the second preset value, the candidate target color with the largest difference between the hue values ​​in the multiple candidate target colors and the hue values ​​in the colors of each initial legend is used as the target color.

[0134] When the processor executes the program, the following steps are also implemented: after determining whether the difference between the hue value in each asymptotic color and the hue value in the third color is greater than a first preset value, the method also includes: when there is no asymptotic color whose hue value differs from the hue value in the third color by more than the first preset value, the asymptotic color with the largest difference between the hue value in the plurality of asymptotic colors and the hue value in the third color is selected as the candidate target color.

[0135] When the processor executes the program, the following steps are also implemented: selecting the colors of two initial legends from multiple initial legends in the target product to obtain color one and color two, including: selecting two adjacent initial legends from multiple initial legends in the target product; and using the colors of the two adjacent initial legends as color one and color two.

[0136] When the processor executes the program, the following steps are also implemented: after determining whether the difference between the hue value in each asymptotic color and the hue value in color three is greater than a first preset value, the method also includes: if there is an asymptotic color among the multiple asymptotic colors whose hue value difference with the hue value in color three is less than or equal to the first preset value, and there is an asymptotic color whose hue value difference with the hue value in color three is greater than the first preset value; the asymptotic color whose hue value difference with the hue value in color three is less than or equal to the first preset value is determined as a similar visual color of color three, and the similar visual color is deleted; the asymptotic color whose hue value difference with the hue value in color three is greater than the first preset value is determined as a non-similar visual color of color three.

[0137] When the processor executes the program, the following steps are also implemented: after determining whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value, the method also includes: if there is a candidate target color among the multiple candidate target colors whose hue value difference between the hue value and the hue value in the color of each initial legend is greater than the second preset value, and there is a candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is less than or equal to the second preset value; the candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is less than or equal to the second preset value is determined as a similar visual color of the initial legend, and the similar visual color is deleted; the candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is greater than the second preset value is determined as a non-similar visual color of the initial legend.

[0138] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0139] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having the following method steps: determining multiple initial legends pre-configured in a target product and the color of each initial legend; when a new target legend is detected in the target product, selecting the colors of two initial legends from the multiple initial legends in the target product to obtain color one and color two; determining a target color based on color one and color two, wherein the target color is an intermediate color between the colors of the two initial legends; and rendering the target legend in the target product using the target color.

[0140] When executed on a data processing device, the program is suitable for executing initialization with the following method steps: determining the target color based on the color one and the color two includes: converting the color one and the color two to color space one, obtaining color parameter one corresponding to the color one in the color space one, and color parameter two corresponding to the color two in the color space; determining multiple asymptotic colors between the color one and the color two based on the color parameter one and the color parameter two; and determining the target color from the multiple asymptotic colors.

[0141] When executed on a data processing device, the program is suitable for executing initialization having the following method steps: determining multiple asymptotic colors between the color one and the color two based on the color parameter one and the color parameter two, including: determining multiple candidate asymptotic colors between the color one and the color two using an arithmetic progression calculation method based on the color parameter one and the color parameter two; correcting the multiple candidate asymptotic colors using interpolation of the color parameter one and the interpolation of the color parameter one; converting the corrected multiple candidate asymptotic colors to color space two; and using the converted multiple candidate asymptotic colors as the multiple asymptotic colors between the color one and the color two.

[0142] When executed on a data processing device, it is suitable for executing a program initialized with the following method steps: the color space is a one-dimensional LCH color space, and determining the target color based on the color one and the color two includes: converting the color one and the color two to the LCH color space to obtain the lightness, chroma, and hue angle of the color one and the lightness, chroma, and hue angle of the color two; determining multiple asymptotic colors between the color one and the color two based on the lightness, chroma, and hue angle of the color one and the lightness, chroma, and hue angle of the color two; and determining the target color from the multiple asymptotic colors.

[0143] When executed on a data processing device, the program is suitable for executing initialization having the following method steps: determining multiple asymptotic colors between color one and color two based on the lightness, chroma, hue angle of color one and the lightness, chroma, hue angle of color two, including: using an arithmetic progression to calculate the lightness, chroma, hue angle of color one and the lightness, chroma, hue angle of color two to determine multiple candidate asymptotic colors between color one and color two; correcting the multiple candidate asymptotic colors by interpolating the three values ​​of the lightness, chroma, and hue angle of color one and the three values ​​of the lightness, chroma, and hue angle of color two; converting the corrected multiple candidate asymptotic colors to the HSL color space; and using the converted multiple candidate asymptotic colors as the multiple asymptotic colors between color one and color two.

[0144] When executed on a data processing device, the program is suitable for executing initialization and has the following method steps: determining the target color from the multiple asymptotic colors includes: determining the color of the previous legend adjacent to the target legend in the target product to obtain color three; comparing each asymptotic color with the color three to determine the target color from the multiple asymptotic colors.

[0145] When executed on a data processing device, the program is suitable for executing initialization having the following method steps: comparing the hue value in each asymptotic color with the hue value in the color three to determine the target color from the multiple asymptotic colors, including: comparing the hue value in each asymptotic color with the hue value in the color three to select a candidate target color from the multiple asymptotic colors; judging whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value; if the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than the second preset value, then using the candidate target color as the target color.

[0146] When executed on a data processing device, the program is suitable for executing initialization with the following method steps: determining a target color from multiple asymptotic colors includes: determining the color of the previous legend adjacent to the target legend in the target product to obtain color three; comparing the hue value in each asymptotic color with the hue value in color three, and judging whether the difference between the hue value in each asymptotic color and the hue value in color three is greater than a first preset value; taking the asymptotic color whose hue value differs from the hue value in color three by more than the first preset value as a candidate target color; judging whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value; if the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than the second preset value, taking the candidate target color as the target color.

[0147] When executed on a data processing device, the program is suitable for executing initialization with the following method steps: determining the target color from the multiple asymptotic colors includes: determining the color of the previous legend adjacent to the target legend in the target product to obtain color three; comparing the hue value in each asymptotic color with the hue value in the color three to select a candidate target color from the multiple asymptotic colors; judging whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value; if the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than the second preset value, then using the candidate target color as the target color.

[0148] When executed on a data processing device, the program is adapted to execute initialization having the following method steps: comparing the hue value in each asymptotic color with the hue value in the third color to select a candidate target color from a plurality of asymptotic colors, including: determining whether a difference between the hue value in each asymptotic color and the hue value in the third color is greater than a first preset value; and selecting the asymptotic color whose hue value difference with the hue value in the third color is greater than the first preset value as a candidate target color.

[0149] When executed on a data processing device, the program is suitable for executing initialization having the following method steps: if there are multiple candidate target colors, determining whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value includes: determining whether the difference between the hue value of each candidate target color and the hue value in the color of each initial legend is greater than the second preset value.

[0150] When executed on a data processing device, it is suitable for executing a program initialized with the following method steps: the method also includes: when there are multiple candidate target colors whose hue values ​​have a difference greater than the second preset value from the hue value in each initial legend, the candidate target color with the largest difference between the hue value in the multiple candidate target colors and the hue value in the color of each initial legend is used as the target color, and the candidate target color with the largest difference between the hue value in the multiple candidate target colors and the hue value in the color of each initial legend is used as the target color, or, when there is no candidate target color whose hue value has a difference greater than the second preset value from the hue value in the color of each initial legend, the candidate target color with the largest difference between the hue value in the multiple candidate target colors and the hue value in the color of each initial legend is used as the target color.

[0151] When executed on a data processing device, the program is suitable for executing initialization having the following method steps: after determining whether the difference between the hue value in each asymptotic color and the hue value in the third color is greater than a first preset value, the method further includes: when there is no asymptotic color whose hue value differs from the hue value in the third color by more than the first preset value, the asymptotic color with the largest difference between the hue value in the plurality of asymptotic colors and the hue value in the third color is selected as the candidate target color.

[0152] When executed on a data processing device, the program is suitable for executing initialization having the following method steps: selecting the colors of two initial legends from multiple initial legends in the target product to obtain color one and color two, including: selecting two adjacent initial legends from multiple initial legends in the target product; and using the colors of the two adjacent initial legends as color one and color two.

[0153] When executed on a data processing device, the program is suitable for executing initialization having the following method steps: after determining whether the difference between the hue value in each asymptotic color and the hue value in color three is greater than a first preset value, the method further includes: if there is an asymptotic color among the multiple asymptotic colors whose difference between the hue value and the hue value in color three is less than or equal to the first preset value, and there is an asymptotic color whose difference between the hue value and the hue value in color three is greater than the first preset value; the asymptotic color whose difference between the hue value and the hue value in color three is less than or equal to the first preset value is determined as a similar visual color of color three, and the similar visual color is deleted; the asymptotic color whose difference between the hue value and the hue value in color three is greater than the first preset value is determined as a non-similar visual color of color three.

[0154] When executed on a data processing device, the program is suitable for executing initialization with the following method steps: after determining whether the difference between the hue value of the candidate target color and the hue value in the color of each initial legend is greater than a second preset value, the method also includes: if there is a candidate target color among the multiple candidate target colors whose hue value difference between the hue value and the hue value in the color of each initial legend is greater than the second preset value, and there is a candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is less than or equal to the second preset value; determine the candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is less than or equal to the second preset value as a similar visual color of the initial legend, and delete the similar visual color; determine the candidate target color whose hue value difference between the hue value and the hue value in the color of each initial legend is greater than the second preset value as a non-similar visual color of the initial legend.

[0155] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0156] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0157] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0158] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0159] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0160] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0161] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0162] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0163] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0164] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A color matching method, characterized in that: include: determining a plurality of initial legends pre-configured in the target product and a color of each initial legend; When a new target legend is detected in the target product, the colors of two initial legends are selected from the multiple initial legends in the target product to obtain color one and color two, including: selecting two adjacent initial legends from the multiple initial legends in the target product; and using the colors of the two adjacent initial legends as the color one and color two; Determining a target color based on the first color and the second color, wherein the target color is an intermediate color between the two initial legend colors; The target legend is rendered in the target product using the target color.

2. The method according to claim 1, characterized in that Determining the target color according to the color 1 and the color 2 includes: Converting the color 1 and the color 2 to a color space 1 to obtain a color parameter 1 corresponding to the color 1 in the color space 1 and a color parameter 2 corresponding to the color 2 in the color space; Determining a plurality of progressive colors between the first color and the second color according to the first color parameter and the second color parameter; The target color is determined from the plurality of progressive colors.

3. The method according to claim 2, characterized in that Determining a plurality of progressive colors between the first color and the second color according to the first color parameter and the second color parameter includes: Determine a plurality of candidate asymptotic colors between the first color and the second color using an arithmetic progression calculation method based on the first color parameter and the second color parameter; Correcting the plurality of candidate asymptotic colors using the interpolation of the color parameter one and the interpolation of the color parameter one; converting the corrected multiple candidate asymptotic colors into color space 2; The converted multiple candidate asymptotic colors are used as multiple asymptotic colors between the first color and the second color.

4. The method according to claim 2, characterized in that The color space is a one-dimensional LCH color space, and determining the target color according to the color 1 and the color 2 includes: Convert the color 1 and the color 2 to the LCH color space to obtain the lightness, chroma, and hue angle of the color 1 and the lightness, chroma, and hue angle of the color 2; Determining a plurality of asymptotic colors between the first color and the second color based on the lightness, chroma, and hue angle of the first color and the lightness, chroma, and hue angle of the second color; The target color is determined from the plurality of progressive colors.

5. The method according to claim 4, characterized in that Determining a plurality of asymptotic colors between the first color and the second color based on the lightness, chroma, and hue angle of the first color and the lightness, chroma, and hue angle of the second color includes: Determine a plurality of candidate asymptotic colors between the first color and the second color by calculating the lightness, chroma, and hue angle of the first color and the lightness, chroma, and hue angle of the second color using an arithmetic progression; Correcting the plurality of candidate asymptotic colors by interpolating the three values ​​of lightness, chroma, and hue angle of the first color and the three values ​​of lightness, chroma, and hue angle of the second color; Convert the corrected multiple candidate asymptotic colors into the HSL color space; The converted multiple candidate asymptotic colors are used as multiple asymptotic colors between the first color and the second color.

6. The method according to claim 2 or 4, characterized in that Determining the target color from the plurality of progressive colors comprises: Determine the color of a previous legend adjacent to the target legend in the target product to obtain color three; Each of the approximate colors is compared with the color three to determine the target color from the plurality of approximate colors.

7. The method according to claim 6, characterized in that Comparing each of the plurality of approximate colors with the color three to determine the target color from the plurality of approximate colors includes: comparing the hue value of each asymptotic color with the hue value of the third color to select a candidate target color from the plurality of asymptotic colors; Determining whether a difference between the hue value of the candidate target color and the hue value of each initial legend color is greater than a second preset value; If the difference between the hue value of the candidate target color and the hue value of the color of each initial legend is greater than the second preset value, the candidate target color is used as the target color.

8. The method according to claim 7, characterized in that Comparing the hue value in each of the asymptotic colors with the hue value in the color three to select a candidate target color from the plurality of asymptotic colors includes: Determine whether the difference between the hue value of each progressive color and the hue value of the third color is greater than a first preset value; An asymptotic color whose hue value differs from the hue value of the third color by a value greater than a first preset value is used as a candidate target color.

9. The method according to claim 7, characterized in that If there are multiple candidate target colors, determining whether a difference between a hue value of the candidate target color and a hue value of each initial legend color is greater than a second preset value includes: It is determined whether a difference between the hue value of each candidate target color and the hue value of each initial legend color is greater than a second preset value.

10. The method according to claim 9, characterized in that The method further comprises: When there are multiple candidate target colors whose hue values ​​differ from the hue values ​​in each initial legend by a value greater than the second preset value, the candidate target color with the largest hue value difference between the multiple candidate target colors and the hue value in each initial legend is selected as the target color; or When there is no candidate target color whose hue value differs from the hue value in each initial legend by a value greater than the second preset value, the candidate target color whose hue value among multiple candidate target colors differs the hue value in each initial legend by the largest value is used as the target color.

11. The method according to claim 8, characterized in that After determining whether the difference between the hue value of each progressive color and the hue value of the third color is greater than a first preset value, the method further includes: When there is no asymptotic color whose hue value difference with the hue value in the third color is greater than the first preset value, the asymptotic color whose hue value among multiple asymptotic colors has the largest difference with the hue value in the third color is used as the candidate target color.

12. The method according to claim 8, characterized in that After determining whether the difference between the hue value of each progressive color and the hue value of the third color is greater than a first preset value, the method further includes: If there is an asymptotic color among the multiple asymptotic colors whose hue value difference with the hue value of the third color is less than or equal to the first preset value, and there is an asymptotic color whose hue value difference with the hue value of the third color is greater than the first preset value; Determine the asymptotic color whose hue value differs from the hue value of the third color by less than or equal to the first preset value as a similar visual color of the third color, and delete the similar visual color; The asymptotic color whose hue value differs from the hue value of the third color by more than the first preset value is determined as a non-similar visual color of the third color.

13. The method according to claim 7, characterized in that After determining whether a difference between the hue value of the candidate target color and the hue value of each initial legend color is greater than a second preset value, the method further includes: If there is a candidate target color among the multiple candidate target colors whose hue value difference with the hue value in each initial legend color is greater than the second preset value, and there is a candidate target color whose hue value difference with the hue value in each initial legend color is less than or equal to the second preset value; Determine the candidate target color whose hue value differs from the hue value of each color in the initial legend by less than or equal to the second preset value as a similar visual color of the initial legend, and delete the similar visual color; A candidate target color whose hue value differs from the hue value of each color of the initial illustration by a value greater than the second preset value is determined as a non-similar visual color of the initial illustration.

14. A color matching device, characterized in that: include: a first determining unit, configured to determine a plurality of initial legends pre-configured in a target product and a color of each initial legend; The first detection unit is configured to, when detecting that a new target legend is added to the target product, select two colors of initial legends from a plurality of initial legends in the target product to obtain color one and color two, including: Selecting two adjacent initial legends from a plurality of initial legends in the target product; using the colors of the two adjacent initial legends as the color one and the color two; a second determining unit, configured to determine a target color based on the first color and the second color, wherein the target color is an intermediate color between the two initial legend colors; A first rendering unit is configured to render the target legend in the target product using the target color.

15. A processor, characterized in that: The processor is configured to run a program, wherein the program executes the method according to any one of claims 1 to 13 when running.

16. A computer-readable storage medium, characterized in that The storage medium includes a stored program, wherein the program executes the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Page color adjusting method and device and electronic equipment

    CN110377860A