Color matching method, device, equipment and storage medium for mind map

By comparing the colors in the target color plate of the mind map, determining the background color and generating a color matching strategy, the problem of fixed color matching themes in the existing technology is solved, and the visual effect of the mind map is improved.

CN114565691BActive Publication Date: 2025-05-16XMIND(CHINA) LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210062992.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-19
Publication Date
2025-05-16
Estimated Expiration
2042-01-19

AI Technical Summary

Technical Problem

The existing mind map color matching theme has fixed colors and lacks scalability, resulting in poor visual effects.

Method used

By color comparison of multiple first colors in the target color plate composed of the user selected colors, the background color of the mind map is determined, and the target color matching strategy is generated based on the background color, and the color matching is performed.

Benefits of technology

It improves the scalability of the color scheme, making the color matching between node colors and background colors and between multiple node colors more holistic and consistent, thereby enhancing the visual effect of mind maps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114565691B_ABST
    Figure CN114565691B_ABST
Patent Text Reader

Abstract

The present application discloses a mind map color matching method, device, equipment and storage medium. By comparing the colors of multiple first colors in a target color palette composed of colors selected by a user, the background color of the mind map is determined to meet the user's needs for matching any color without the need to match the color of each node separately, so that the color theme has higher scalability; then, according to the background color, a target color matching strategy is generated, and the mind map is matched with the target color matching strategy, so that the color matching between the node color and the background color and between multiple node colors has a more holistic and consistent feeling, thereby enhancing the visual effect of the mind map.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a mind map color matching method, device, equipment and storage medium. Background Art

[0002] In the process of generating a mind map, in order to facilitate user reference, each entity object in the mind map is usually intelligently colored. Specifically, the mind map is colored according to the color scheme in the color theme selected by the user by presetting the color theme.

[0003] However, currently, there are relatively few color themes that users can choose from, and the colors of each color theme are relatively fixed, and their scalability is poor. For example, if a user selects a color theme from multiple color themes with fixed colors, and the color scheme of the color theme stipulates that the background color is yellow and the node color is blue, then in the subsequent color matching process of the mind map, no matter what color adjustment occurs, the color scheme will use the background color and node color, resulting in poor visual effects of the mind map in some cases. Summary of the invention

[0004] The present application provides a mind map color matching method, device, equipment and storage medium, which can improve the scalability of the color matching scheme, thereby enhancing the visual effect of the mind map.

[0005] In order to solve the above technical problems, in a first aspect, an embodiment of the present application provides a mind map color matching method, comprising:

[0006] Performing color comparison on multiple first colors in the target color palette to determine the background color of the mind map, where the first color is the color selected by the user;

[0007] Generate target color matching strategy based on background color;

[0008] Use the target color matching strategy to color the mind map.

[0009] In this embodiment, the background color of the mind map is determined by comparing the colors of multiple first colors in the target color palette composed of the colors selected by the user to meet the user's needs for matching any color without the need to match the color of each node separately, so that the color theme has higher scalability; then according to the background color, a target color matching strategy is generated, and the mind map is matched with the target color matching strategy, so that the color matching between the node color and the background color and between multiple node colors has a more integrated and consistent feel, thereby enhancing the visual effect of the mind map.

[0010] As a preferred embodiment, comparing a plurality of first colors in the target color palette to determine the background color of the mind map includes:

[0011] Calculating first contrast ratios between first colors based on a preset colorimetric model;

[0012] Determine a first label value and a second label value for each first color according to the first contrast ratio corresponding to each first color, wherein the first label value is used to represent the number of first contrast ratios greater than a preset contrast ratio, and the second label value is used to represent the number of first contrast ratios not greater than the preset contrast ratio;

[0013] A background color of the mind map is determined according to a first tag value and a second tag value of a first color.

[0014] This embodiment determines the color with the largest contrast ratio difference by combining contrast ratio with mark value, so as to highlight the color difference between the background color and objects such as nodes and line segments, thereby enhancing the visual effect.

[0015] As an optional embodiment, determining the background color of the mind map according to the first mark value and the second mark value of the first color includes:

[0016] Selecting a second color with the largest first mark value from among the plurality of first colors;

[0017] If the second mark value of the second color is greater than the preset mark value, the background color is determined to be the preset background color.

[0018] This embodiment ensures that the visual effect of the mind map can be optimized by using the preset background color as a fallback solution for the background color when the contrast ratio difference of the target color palette is small.

[0019] As an optional embodiment, after selecting the second color with the largest first mark value from the multiple first colors, the method further includes:

[0020] If the second mark value of the second color is not greater than the preset mark value, detecting the color type of the second color;

[0021] If the color type of the second color is light color, the background color is determined to be the second color.

[0022] As an optional embodiment, after detecting the color type of the second color, the method further includes:

[0023] If the color type of the second color is dark, then the difference between the first mark sum and the second mark sum is calculated, the first mark sum is the sum of the first mark values ​​corresponding to the color type being light, and the second mark sum is the sum of the first mark values ​​corresponding to the color type being dark;

[0024] If the difference is not less than the preset difference, the background color is determined to be the second color;

[0025] If the difference is less than the preset difference, the background color is determined to be the first color in the target color palette whose color type is light color and whose first mark value is the largest.

[0026] This embodiment is based on the principle of light color priority, and uses light colors to be closer to the color of real writing paper. At the same time, light colors as background colors can better highlight the colors of objects such as nodes and line segments, which can meet the user's visual habits and enhance the visual effect.

[0027] As a preferred embodiment, the mind map includes a plurality of node objects and line segment objects for connecting the node objects; according to the background color, a target color matching strategy is generated, including:

[0028] According to the background color, determine the node color of the node object and the segment color of the line segment object;

[0029] According to the node hierarchy relationship of the node object, preset color matching conditions are added to the background color, node color and line segment color to generate a target color matching strategy.

[0030] This embodiment determines the color of node objects and line segment objects at each node level by background color, and adds color matching conditions to generate a complete set of target color matching strategies, so that when subsequent color modifications are performed, overall adjustments can be made based on the target color matching strategy.

[0031] As a preferred embodiment, determining the node color of the node object and the line segment color of the line segment object according to the background color includes:

[0032] Performing a color comparison between a first color in the target color palette and a background color to obtain a second comparison ratio of the first color;

[0033] According to the second comparison ratio and the node hierarchy relationship of the node object, the first color is assigned to nodes to obtain the node color of the node object and the line segment color of the line segment object.

[0034] As a preferred embodiment, after color matching the mind map using the target color matching strategy, the method further includes:

[0035] Obtaining a color modification instruction input by a user, wherein the node color modification instruction carries a target object and a target color, and the target object includes a node object, a line segment object, or a text object;

[0036] In response to the color modification instruction, the target object is modified to the target color according to the target color matching strategy, and the object color of the associated object of the target object is adjusted.

[0037] This embodiment can automatically make adaptive adjustments to other objects of the mind map when modifying the color. For example, after changing the node color, the text color is automatically adjusted without the user having to manually adjust other objects, thereby improving operating efficiency and meeting the need to enhance visual effects.

[0038] In a second aspect, an embodiment of the present application provides a color matching device for a mind map, comprising:

[0039] A comparison module, used for performing color comparison on a plurality of first colors in a target color palette to determine a background color of a mind map, wherein the first color is a color selected by a user, and the mind map includes a plurality of node objects and line segment objects for connecting the node objects;

[0040] A determination module, used for determining the node color of the node object and the line segment color of the line segment object according to the background color;

[0041] A generation module, used to generate a target color matching strategy based on background color, node color and line segment color;

[0042] The color matching module is used to match the colors of mind maps using the target color matching strategy.

[0043] In a third aspect, an embodiment of the present application provides a computer device, including a processor and a memory, the memory being used to store a computer program, and when the computer program is executed by the processor, the color matching method of the mind map of the first aspect is implemented.

[0044] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the color matching method of the mind map as in the first aspect.

[0045] It should be noted that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A flowchart of a method for color matching a mind map according to an embodiment of the present application is shown;

[0047] Figure 2 A schematic diagram of a mind map shown in an embodiment of the present application;

[0048] Figure 3 A schematic diagram of a target color palette shown in an embodiment of the present application;

[0049] Figure 4 A schematic diagram of a process for determining a background color shown in an embodiment of the present application;

[0050] Figure 5A schematic diagram of another mind map shown in an embodiment of the present application;

[0051] Figure 6 This is a schematic diagram of the structure of a color matching device for a mind map according to an embodiment of the present application;

[0052] Figure 7 A schematic diagram of the structure of a computer device shown in an embodiment of the present application. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0054] As the relevant technical records, such as Figure 2 The mind map shown in the figure is an effective graphic thinking tool for expressing divergent thinking. Each node on the mind map represents a connection with the central theme, and each connection can become another central theme, and then radiate outward to form thousands of nodes, presenting a radial three-dimensional structure. For example, the boxes containing texts such as "MerryChristmas" and "Maintopic" are nodes. By coloring the nodes, users can quickly distinguish the contents of different nodes, improving browsing efficiency and visual effects. However, if Figure 2 The color of the mind map shown in the figure is relatively fixed, and its scalability is poor. If the color scheme of the color scheme specifies that the background color is green and the node color of "MerryChristmas" is red, then in the subsequent color matching process of the mind map, no matter what color adjustment occurs, the color scheme will continue to use the background color and node color, resulting in a single color scheme for the mind map and failure to achieve the best visual effect.

[0055] To this end, an embodiment of the present application provides a color matching method for a mind map, which determines the background color of the mind map by comparing the multiple first colors in the target color palette composed of the colors selected by the user, so as to meet the user's needs for matching any color without the need to match the color of each node separately, so that the color theme has higher scalability; then, based on the background color, a target color matching strategy is generated, and the mind map is matched with the target color matching strategy, so that the color matching between the node color and the background color and between multiple node colors has a more integrated and consistent feel, thereby enhancing the visual effect of the mind map.

[0056] Please refer to Figure 1 , Figure 1The flowchart of a method for color matching of a mind map provided in an embodiment of the present application is shown below. The method for color matching of a mind map in an embodiment of the present application can be applied to computer devices, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, etc. that are equipped with or connected to a display unit. Figure 1 As shown, the mind map color matching method of this embodiment includes steps S101 to S103, which are described in detail as follows:

[0057] Step S101, performing color comparison on a plurality of first colors in a target color palette to determine a background color of a mind map, wherein the first color is a color selected by a user.

[0058] In this step, color contrast is a process of comparing multiple colors based on one or more attributes of color, including but not limited to chroma, brightness, contrast and saturation. For example, the chroma a of color A and the chroma b of color B are calculated respectively, and the chroma difference between color A and color B is compared, that is, chroma difference = chroma a - chroma b. For another example, the chroma a of color A and the brightness L1 are weighted summed to obtain the comprehensive attribute C of color A. Similarly, the chroma b of color B and the brightness L2 are weighted summed to obtain the comprehensive attribute D of color B. The attribute difference between color A and color B is compared, that is, attribute difference = comprehensive attribute C - comprehensive attribute D. It can be understood that there can be many ways to compare colors, which are not limited here.

[0059] Optionally, the mind map includes but is not limited to a plurality of node objects, line segment objects for connecting the node objects, and text objects within the node objects. Figure 2 As shown, the text box where "Merry Christmas" is located is a node object, "Merry Christmas" is a text object, and the line connecting the "Merry Christmas" box and the "Maintopic" box is a line segment object.

[0060] Alternatively, if Figure 2 The target color palette shown includes 6 colors, that is, the target color palette is a color set consisting of a plurality of first colors selected by the user from a plurality of optional colors. Preferably, the number of colors in the target color palette is 6, which is sufficient to form a color matching theme without causing a messy or similar color, and is more in line with the user's visual experience.

[0061] Optionally, the user selects a number of colors from the selectable colors that are the same as the number of colors in the target color palette. For example, if the number of colors in the target color palette is 6, the number of colors selected by the user is also 6. It is understandable that when the number of colors selected by the user is less than 6, new colors can be obtained by performing color transformation on the colors selected by the user to make up to 6 colors, or preset colors can be used to make up to 6 colors. The specific color supplement method is not limited to the above method and will not be repeated here.

[0062] Step S102: generating a target color matching strategy according to the background color.

[0063] In this step, the target color matching strategy is the color matching logic for matching the mind map, which includes but is not limited to the color matching logic for matching the node objects of different node levels, the color matching logic for matching the text objects, the color matching logic for matching the line segment objects, and the color matching logic for the node objects, text objects or line segment objects of the association relationship. For example, the central node is blue, the first-level nodes under the central node are green, the nodes belonging to the same level as the first-level node are red, the text objects in the first-level node are black, and the line segment object connecting the central node and the first-level node is green.

[0064] Optionally, the background color is used as the central color, and the color matching priority of other first colors in the target color palette is determined according to the contrast ratio between the colors, and the target color matching strategy is generated according to the priority. For example, the target color palette includes red, green, blue, white, black and yellow, and white is used as the background color. The priority is determined to be black>red>green>blue>yellow. When generating the target color matching strategy, the color matching strategy for the central node is to use the color with the highest priority, that is, black is used as the node color of the central node, and so on, which will not be repeated.

[0065] Step S103, using the target color matching strategy to color the mind map.

[0066] In this step, the target color matching strategy provides an expert-level serialized color matching combination for the mind map color matching. Figure 5 The mind map shown, with Figure 2 Compared with the mind map, Figure 5 The mind map has richer color features and more distinct and diverse color themes, which avoids the monotonous and boring feeling of the mind map color matching and increases the fun and agility.

[0067] As a preferred embodiment, Figure 1 Based on the embodiment shown, Figure 4 The following is a schematic diagram of the process of determining the background color of the present application. Figure 1The same steps as those in the illustrated embodiment will not be described in detail here. Figure 4 As shown, the above step S101 includes:

[0068] Calculating a first contrast ratio between each of the first colors based on a preset colorimetric model;

[0069] Determine a first label value and a second label value for each of the first colors according to the first contrast ratio corresponding to each of the first colors, wherein the first label value is used to represent the number of the first contrast ratios that are greater than a preset contrast ratio, and the second label value is used to represent the number of the first contrast ratios that are not greater than the preset contrast ratio;

[0070] The background color of the mind map is determined according to the first mark value and the second mark value of the first color.

[0071] In this embodiment, the colorimetric model is a contrast model constructed based on colorimetric theory. Optionally, the colorimetric model is deployed on the computer device. When the computer device executes the colorimetric model, steps including but not limited to format conversion, data linearization, and spectral weighting can be implemented to finally obtain color brightness L, and the color brightness L between multiple colors is compared in pairs to obtain a first contrast ratio.

[0072] Exemplarily, an 8-bit integer (int) is converted into a floating point number (float), that is: R′float=R′8bit / 255.0, G′float=G′8bit / 255.0, B′float=B′8bit / 255.0; the data is linearized to delete the encoded transfer curve, that is, Rlin=sRGBtoLin(R′float), Glin=sRGBtoLin(G′float), Blin=sRGBtoLin(B′float); the brightness is spectrally weighted using the sRGB coefficients, each linearized color channel is multiplied by their coefficients, and then they are added to obtain the brightness Y, that is, Y=Rlin*0.2126+Glin*0.7152+Blin*0.0722.

[0073] It should be noted that each first contrast ratio corresponds to two colors. For example, yellow and blue are contrasted to obtain a contrast ratio X, and the contrast ratio X corresponds to yellow and blue. When the first mark value or the second mark value is counted, if the contrast ratio X is greater than the preset contrast ratio, the first mark value of yellow is accumulated as 1, and the first mark value of blue is also accumulated as 1. Similarly, if the contrast ratio X is not greater than the preset contrast ratio, the second mark value of yellow is accumulated as 1, and the second mark value of blue is accumulated as 1. It can be understood that the larger the first mark value of a color, the greater the difference between the color and other colors, and the larger the second mark value of a color, the greater the difference between the color and other colors.

[0074] As an optional embodiment, Figure 4 As shown, determining the background color of the mind map according to the first tag value and the second tag value of the first color includes:

[0075] Selecting a second color with the largest first mark value from among the plurality of first colors;

[0076] If the second mark value of the second color is greater than the preset mark value, the background color is determined to be the preset background color.

[0077] In this optional embodiment, a second color with the largest difference from other first colors is selected from multiple first colors, but if the second mark value of the second color is greater than the preset mark value, it means that the second color is not much different from other colors in actual situations, so the preset background color is used as a fallback color as the background color. Optionally, the preset mark value can be 1, and the preset background color is white or black.

[0078] As an optional embodiment, Figure 4 As shown, after selecting the second color with the largest first mark value from the plurality of first colors, the method further includes:

[0079] If the second mark value of the second color is not greater than the preset mark value, detecting the color type of the second color;

[0080] If the color type of the second color is a light color, the background color is determined to be the second color.

[0081] In this optional embodiment, the first color in the target color palette is divided into light color, dark color and color. For example, for a given color, the HSL color space is used for processing to obtain its brightness L value. If L is greater than or equal to 80, it is considered to be a light color; if L is less than or equal to 20, it is considered to be a dark color; if L is between 20 and 80, it is considered to be a color.

[0082] As an optional embodiment, Figure 4 As shown, after detecting the color type of the second color, the method further includes:

[0083] If the color type of the second color is dark, then calculate the difference between the first mark sum and the second mark sum, the first mark sum being the sum of the first mark values ​​corresponding to the color type being light, and the second mark sum being the sum of the first mark values ​​corresponding to the color type being dark;

[0084] If the difference is not less than a preset difference, determining that the background color is the second color;

[0085] If the difference is less than the preset difference, the background color is determined to be the first color in the target color palette whose color type is light color and whose first mark value is the largest.

[0086] In this optional embodiment, the light color priority principle is used to further determine the second color. The reason for using light color priority is that light color as the background color will not make the color of the entire mind map too dark, so that some users will not be uncomfortable, and light color is closer to the color of writing paper in reality, which is more in line with visual habits. At the same time, dark color as an embellishment color in the subsequent color matching strategy can highlight the node characteristics. Optionally, the above preset difference is 1.

[0087] As a preferred embodiment, a target color matching strategy is generated according to the background color, including:

[0088] According to the background color, determine the node color of the node object and the segment color of the line segment object;

[0089] According to the node hierarchy relationship of the node object, preset color matching conditions are added to the background color, node color and line segment color to generate a target color matching strategy.

[0090] In this embodiment, optionally, a color contrast is performed between the first color in the target color palette and the background color to obtain a second contrast ratio of the first color; based on the second contrast ratio and the node hierarchy relationship of the node object, the first color is assigned nodes to obtain the node color of the node object and the segment color of the line segment object.

[0091] Exemplarily, the color of each branch of the node object follows the color of its line segment object, such as Figure 5 As shown in the figure, the color of "Main Topic" is the same as the line object connecting it and "Merry Christmas", and its text color is black or white. The color of "Subtopic Fill" is also the color of the line object, and a color matching condition is added to it: change the transparency to 20%.

[0092] As a preferred embodiment, after using the target color matching strategy to match the color of the mind map, the method further includes:

[0093] Acquire a color modification instruction input by a user, wherein the node color modification instruction carries a target object and a target color, and the target object includes the node object, the line segment object or a text object;

[0094] In response to the color modification instruction, the target object is modified to the target color according to the target color matching strategy, and the object color of the object associated with the target object is adjusted.

[0095] In this embodiment, the automatic font color matching enables the user to change the color of the node object and automatically change the text color to a color matching the node object, thus saving the user the trouble of adjusting the font color.

[0096] In order to implement the color matching method of the mind map corresponding to the above method embodiment, to achieve the corresponding functions and technical effects. Figure 6 , Figure 6 The structural block diagram of a color matching device for a mind map provided in an embodiment of the present application is shown. For the sake of convenience, only the parts related to the present embodiment are shown. The color matching device for a mind map provided in an embodiment of the present application includes:

[0097] A comparison module 601 is used to compare the colors of a plurality of first colors in the target color palette to determine the background color of the mind map, wherein the first color is a color selected by a user, and the mind map includes a plurality of node objects and line segment objects for connecting the node objects;

[0098] A generating module 602, used to generate a target color matching strategy according to the background color;

[0099] The color matching module 604 is used to match the color of the mind map using the target color matching strategy.

[0100] As a preferred embodiment, the comparison module 601 includes:

[0101] a calculation unit, configured to calculate a first contrast ratio between each of the first colors based on a preset colorimetric model;

[0102] a first determining unit, configured to determine a first label value and a second label value for each of the first colors according to the first contrast ratio corresponding to each of the first colors, wherein the first label value is used to represent the number of the first contrast ratios that are greater than a preset contrast ratio, and the second label value is used to represent the number of the first contrast ratios that are not greater than the preset contrast ratio;

[0103] A second determining unit is configured to determine a background color of the mind map according to a first tag value and a second tag value of the first color.

[0104] As an optional embodiment, the second determining unit includes:

[0105] a selection subunit, configured to select a second color having the largest first mark value from among the plurality of first colors;

[0106] The first determination subunit is configured to determine that the background color is a preset background color if the second mark value of the second color is greater than a preset mark value.

[0107] As an optional embodiment, the second determining unit further includes:

[0108] a detection subunit, configured to detect a color type of the second color if the second mark value of the second color is not greater than a preset mark value;

[0109] The second determination subunit is configured to determine that the background color is the second color if the color type of the second color is a light color.

[0110] As an optional embodiment, the second determining unit further includes:

[0111] a calculation subunit, configured to calculate a difference between a first mark sum and a second mark sum if the color type of the second color is a dark color, wherein the first mark sum is a sum of first mark values ​​corresponding to when the color type is a light color, and the second mark sum is a sum of first mark values ​​corresponding to when the color type is a dark color;

[0112] a third determination subunit, configured to determine that the background color is the second color if the difference is not less than a preset difference;

[0113] The fourth determination subunit is configured to determine that the background color is the first color in the target color palette whose color type is a light color and whose first mark value is the largest if the difference is less than the preset difference.

[0114] As a preferred embodiment, the generating module 602 includes:

[0115] A third determining unit, used to determine the node color of the node object and the line segment color of the line segment object according to the background color;

[0116] Add a unit to add preset color matching conditions to the background color, node color and line segment color according to the node hierarchy relationship of the node object to generate a target color matching strategy.

[0117] As a preferred embodiment, the third determining unit includes:

[0118] a contrast subunit, configured to perform color contrast between a first color in the target color palette and the background color to obtain a second contrast ratio of the first color;

[0119] The allocation subunit is used to perform node allocation on the first color according to the second comparison ratio and the node hierarchy relationship of the node object to obtain the node color of the node object and the line segment color of the line segment object.

[0120] As a preferred embodiment, the color matching device of the mind map further includes:

[0121] An acquisition module, used for acquiring a color modification instruction input by a user, wherein the node color modification instruction carries a target object and a target color, wherein the target object includes the node object, the line segment object or a text object;

[0122] The response module is used to respond to the color modification instruction, modify the target object to the target color according to the target color matching strategy, and adjust the object color of the associated object of the target object.

[0123] The color matching device of the mind map described above can implement the color matching method of the mind map of the method embodiment described above. The options in the method embodiment described above are also applicable to this embodiment and will not be described in detail here. The rest of the contents of the embodiment of this application can refer to the contents of the method embodiment described above and will not be described in detail in this embodiment.

[0124] Figure 7 This is a schematic diagram of the structure of a computer device provided in one embodiment of the present application. Figure 7 As shown, the computer device 7 of this embodiment includes: at least one processor 70 ( Figure 7 Only one is shown in the figure) a processor, a memory 71, and a computer program 72 stored in the memory 71 and executable on the at least one processor 70, and when the processor 70 executes the computer program 72, the steps in any of the above method embodiments are implemented.

[0125] The computer device 7 may be a computing device such as a smart phone, a tablet computer, a desktop computer, a cloud server, etc. The computer device may include but is not limited to a processor 70 and a memory 71. Those skilled in the art will appreciate that Figure 7 It is only an example of the computer device 7 and does not constitute a limitation on the computer device 7. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0126] The processor 70 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0127] In some embodiments, the memory 71 may be an internal storage unit of the computer device 7, such as a hard disk or memory of the computer device 7. In other embodiments, the memory 71 may also be an external storage device of the computer device 7, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 7. Further, the memory 71 may also include both an internal storage unit and an external storage device of the computer device 7. The memory 71 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 71 may also be used to temporarily store data that has been output or is to be output.

[0128] In addition, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0129] An embodiment of the present application provides a computer program product. When the computer program product is run on a computer device, the computer device implements the steps in the above-mentioned method embodiments when executing the computer device.

[0130] In several embodiments provided in the present application, it is understood that each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved.

[0131] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device to execute all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0132] The specific embodiments described above further describe the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only a specific embodiment of the present application and is not intended to limit the scope of protection of the present application. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims

1. A color matching method for a mind map, characterized in that: include: Based on a preset colorimetric model, performing color comparison on a plurality of first colors in a target color palette, and calculating a first contrast ratio between each of the first colors; According to the first contrast ratio corresponding to each of the first colors, a first label value and a second label value of each of the first colors are determined, wherein the first label value is used to represent the number of the first contrast ratios that are greater than a preset contrast ratio, and the second label value is used to represent the number of the first contrast ratios that are not greater than the preset contrast ratio; wherein each first contrast ratio corresponds to two first colors to be compared, and when the first label value or the second label value is counted, the two first colors corresponding to the first contrast ratio are accumulated; Determining the background color of the mind map according to the first tag value and the second tag value of the first color, wherein the first color is a color selected by a user; The step of determining the background color of the mind map according to the first tag value and the second tag value of the first color includes: Selecting a second color with the largest first mark value from among the plurality of first colors; If the second mark value of the second color is greater than the preset mark value, determining that the background color is the preset background color; If the second mark value of the second color is not greater than the preset mark value, detecting the color type of the second color; If the color type of the second color is a light color, determining that the background color is the second color; If the color type of the second color is dark, the difference between the first mark sum and the second mark sum is calculated, the first mark sum is the sum of the first mark values ​​corresponding to the color type being light, and the second mark sum is the sum of the first mark values ​​corresponding to the color type being dark; if the difference is not less than the preset difference, the background color is determined to be the second color; if the difference is less than the preset difference, the background color is determined to be the first color in the target color palette whose color type is light and whose first mark value is the largest; Generate a target color matching strategy according to the background color; The mind map is colored using the target color matching strategy.

2. The color matching method of mind map according to claim 1, characterized in that: The mind map includes a plurality of node objects and line segment objects for connecting the node objects. The target color matching strategy is generated according to the background color, including: Determine the node color of the node object and the line segment color of the line segment object according to the background color; According to the node hierarchy relationship of the node object, preset color matching conditions are added to the background color, the node color and the line segment color to generate the target color matching strategy.

3. The color matching method of mind map according to claim 2, characterized in that: The step of determining the node color of the node object and the line segment color of the line segment object according to the background color includes: Performing a color comparison between a first color in the target color palette and the background color to obtain a second contrast ratio of the first color; According to the second comparison ratio and the node hierarchy relationship of the node object, the first color is assigned to a node to obtain a node color of the node object and a line segment color of the line segment object.

4. The color matching method of mind map according to claim 3, characterized in that: After the mind map is color matched by using the target color matching strategy, the method further includes: Acquire a color modification instruction input by a user, wherein the color modification instruction carries a target object and a target color, and the target object includes a node object, a line segment object, or a text object; In response to the color modification instruction, the target object is modified to the target color according to the target color matching strategy, and the object color of the object associated with the target object is adjusted.

5. A color matching device for a mind map, characterized in that: include: A comparison module, configured to perform color comparison on a plurality of first colors in a target color palette based on a preset colorimetric model, and calculate a first contrast ratio between each of the first colors; According to the first contrast ratio corresponding to each of the first colors, a first label value and a second label value of each of the first colors are determined, wherein the first label value is used to represent the number of the first contrast ratios that are greater than a preset contrast ratio, and the second label value is used to represent the number of the first contrast ratios that are not greater than the preset contrast ratio; wherein each first contrast ratio corresponds to two first colors to be compared, and when the first label value or the second label value is counted, the two first colors corresponding to the first contrast ratio are accumulated; according to the first label value and the second label value of the first color, a background color of the mind map is determined, wherein the first color is a color selected by a user, and the mind map includes a plurality of node objects and line segment objects for connecting the node objects; The step of determining the background color of the mind map according to the first tag value and the second tag value of the first color includes: Selecting a second color with the largest first mark value from among the plurality of first colors; If the second mark value of the second color is greater than the preset mark value, determining that the background color is the preset background color; If the second mark value of the second color is not greater than the preset mark value, detecting the color type of the second color; If the color type of the second color is a light color, determining that the background color is the second color; If the color type of the second color is dark, the difference between the first mark sum and the second mark sum is calculated, the first mark sum is the sum of the first mark values ​​corresponding to the color type being light, and the second mark sum is the sum of the first mark values ​​corresponding to the color type being dark; if the difference is not less than the preset difference, the background color is determined to be the second color; if the difference is less than the preset difference, the background color is determined to be the first color in the target color palette whose color type is light and whose first mark value is the largest; A generation module, used to generate a target color matching strategy according to the background color; A color matching module is used to match the color of the mind map using the target color matching strategy.

6. A computer device, characterized in that: The invention comprises a processor and a memory, wherein the memory is used to store a computer program, and when the computer program is executed by the processor, the mind map color matching method according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the mind map color matching method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Desktop color matching method, desktop color matching apparatus and intelligent terminal

    CN104965631A

  • Method and apparatus for determining color scheme

    CN109117135A