CN113031941B - Color template generation method and color template generation device - Google Patents

Color template generation method and color template generation device Download PDF

Info

Publication number
CN113031941B
CN113031941B CN201911359910.8A CN201911359910A CN113031941B CN 113031941 B CN113031941 B CN 113031941B CN 201911359910 A CN201911359910 A CN 201911359910A CN 113031941 B CN113031941 B CN 113031941B
Authority
CN
China
Prior art keywords
color
target
component values
preset
color component
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911359910.8A
Other languages
Chinese (zh)
Other versions
CN113031941A (en
Inventor
曹坤玉
周晶晶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Pixelhue Technology Ltd
Original Assignee
Pixelhue Technology Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Pixelhue Technology Ltd filed Critical Pixelhue Technology Ltd
Priority to CN201911359910.8A priority Critical patent/CN113031941B/en
Publication of CN113031941A publication Critical patent/CN113031941A/en
Application granted granted Critical
Publication of CN113031941B publication Critical patent/CN113031941B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The present invention relates to a color template generation method and a color template generation device; the color template generation method includes, for example: the method comprises the steps of obtaining an initial color template, obtaining a target theme color, obtaining a plurality of color component values of the target color of each element in a target color space, determining the target colors of the plurality of elements, and generating a new color template. The invention can generate the required new color template in the full color domain based on the initial color template, solves the problem of incomplete information display caused by the conflict of the main tone, the character color and other project colors when the color template is generated, and realizes the generation of the color template in the full color domain.

Description

Color template generation method and color template generation device
Technical Field
The invention relates to the technical field of human-computer interaction interfaces, in particular to a color template generation method and a color template generation device.
Background
The webpage interface switching theme can realize the business requirements of the user under different use scenes, for example: the eye protection method comprises the steps of using a yellowish theme to protect eyes, using a gray black theme to protect eyes at late night, using a reddish theme to highlight festive celebration in holidays such as national celebration, new spring and the like, and using different theme color templates according to personal requirements of users. The existing color template custom schemes are two, one is to support a plurality of fixed custom schemes, and the color template custom scheme has the advantages that the preset color theme does not have color conflict, and the disadvantage that custom colors are less; the other is a theme self-defining scheme of the full color gamut, but only the main tone adjustment is supported, the items such as the text color and the like cannot be adjusted and changed, otherwise, the problem of incomplete information display caused by the conflict of the main tone and the items such as the text color and the like can occur.
Disclosure of Invention
Therefore, the embodiment of the invention provides a color template generation method, a color template device, a color template generation system and a computer storage medium, which can realize the generation of the color template of the full color gamut and can solve the problem of incomplete information display caused by the conflict of the main tone, the character color and other project colors when the color template is generated.
Specifically, an embodiment of the present invention provides a color template generating method, where the color template generating method includes: acquiring an initial color template, wherein the initial color template comprises a comparison relation table of initial theme colors and initial colors of a plurality of elements, and the initial theme colors and the initial colors are characterized by a plurality of color component values of a target color space; responding to a user instruction to acquire a target theme color; obtaining a plurality of color component values of the target color of each element in the target color space based on the relative relation between the target theme color and the plurality of color component values of the initial theme color in the target color space and the comparison relation table; correcting color component values exceeding a preset color range in the target color of each element to determine the target color of the plurality of elements under the condition that at least part of the color component values in the target color of each element are judged to be located outside the preset color range; and generating a new color template based on the target theme color and the target colors of the plurality of elements.
In the prior art, when the webpage interface switches the theme color templates, only a few fixed color templates are generally supported for selection, but when the full-color domain selects the theme templates, only the main tone adjustment is supported, the items such as the font color and the like cannot be adjusted and changed, otherwise, the problem of incomplete information display caused by conflict of the main tone and the item color such as the text color and the like can occur. According to the embodiment of the invention, the initial color template is obtained, the initial color template comprises the comparison relation table of the initial theme colors and the initial colors of the plurality of elements, the initial theme colors and the initial colors of the plurality of elements are respectively represented by the plurality of color components of the color space, the target theme colors are obtained, and the target colors of the plurality of elements are obtained based on the relative relation between the initial theme colors and the plurality of color components of the initial theme colors, so that a user can realize the color template generation of the full color gamut only by selecting the theme colors. Furthermore, by judging whether the plurality of color component values of the target color of each element are within the preset color range and correcting the color component values exceeding the preset color range, the problem of incomplete information display caused by the conflict of the main tone, the character color and other project colors when the color template is generated can be avoided.
In one embodiment of the present invention, the relative relationship specifically includes: a difference operational relationship or a ratio operational relationship. In one embodiment of the invention, the plurality of elements includes a font color and a background color, and the background color is the same as the target theme color.
In one embodiment of the present invention, the correcting the color component value of the target color of the element beyond the preset color range if it is determined that at least some of the color component values of the target color of each of the elements are located outside the preset color range specifically includes: and under the condition that at least partial color component values in the plurality of color component values of the target color of the font are respectively located outside the preset color range, reversely taking the value of the color component value exceeding the preset color range.
In one embodiment of the present invention, in a case where it is determined that at least some of the plurality of color component values of the target color of each of the elements are located outside a preset color range, correcting the color component values of the target color of the element that are outside the preset color range, further includes: and correcting the color component values exceeding the preset color range to be boundary values of the preset color range under the condition that at least partial color component values in the plurality of color component values of the target color of each element except the font in the plurality of elements are respectively positioned outside the preset color range.
In one embodiment of the present invention, the color template generating method further includes: and under the condition that at least partial color component values in the plurality of color component values of the target color of each element are judged to be in a preset color range, if the deviation between the plurality of color component values of the target color of the font color and the plurality of color component values of the target color of the background color is not more than a preset threshold value, reversely taking the color component values of the target color of the font which are not more than the preset threshold value.
In addition, an embodiment of the present invention provides a color template generating device, including: the system comprises a template acquisition module, a theme color acquisition module, an element color component acquisition module, an element color determination module and a template generation module. The template acquisition module is used for acquiring an initial color template, wherein the initial color template comprises a comparison relation table of initial theme colors and initial colors of a plurality of elements, and the initial theme colors and the initial colors are characterized by a plurality of color component values of a target color space. The theme-color acquisition module is used for responding to the user instruction to acquire the target theme color. The element color component obtaining module is configured to obtain a plurality of color component values of a target color of each element in the target color space based on a relative relationship between the target theme color and the plurality of color component values of the initial theme color in the target color space and the comparison relationship table. The element color determining module is used for correcting color component values exceeding a preset color range in the target colors of the elements to determine the target colors of the elements under the condition that at least part of the color component values in the target colors of the elements are judged to be outside the preset color range. The template generation module is used for generating a new color template based on the target theme color and the target colors of the plurality of elements.
In one embodiment of the present invention, the element color determining module is specifically configured to: and under the condition that at least partial color component values in the plurality of color component values of the target color of the font are respectively located outside the preset color range, reversely taking the value of the color component value exceeding the preset color range.
In one embodiment of the invention, the element color determination module is further configured to: and correcting the color component values exceeding the preset color range to be boundary values of the preset color range under the condition that at least partial color component values in the plurality of color component values of the target color of each element except the font in the plurality of elements are respectively positioned outside the preset color range.
In one embodiment of the invention, the element color determination module is further configured to: and under the condition that at least partial color component values in the plurality of color component values of the target color of each element are judged to be in a preset color range, if the difference value between the plurality of color component values of the target color of the font color and the plurality of color component values of the target color of the background color is not larger than a preset threshold value, reversely taking the color component values of the target color of the font which are not larger than the preset threshold value.
Furthermore, an embodiment of the present invention provides a color template generating system, including: a processor and a memory; wherein the memory stores instructions for execution by the processor and the instructions cause the processor to perform operations to perform the color template generation method of any one of the embodiments described above.
Furthermore, an embodiment of the present invention proposes a computer-readable storage medium storing computer-executable instructions for performing the color template generation method according to any one of the embodiments described above.
From the above, the technical solution of the present invention may have one or more of the following beneficial effects: a) The method comprises the steps of obtaining an initial color template, wherein the initial color template comprises a comparison relation table of initial theme colors and initial colors of a plurality of elements, the initial theme colors and the initial colors of the plurality of elements are respectively represented by a plurality of color components of a color space, obtaining a target theme color, and obtaining the target colors of the plurality of elements based on the relative relation between the target theme colors and the plurality of color components of the initial theme colors and the initial colors of the plurality of elements, so that the color template generation of a full color gamut can be realized; b) By judging whether a plurality of color component values of the target color of each element are in a preset range or not, the color component values of the font color exceeding the preset color range and having a color component value difference with the background color smaller than a preset threshold are reversely valued, and the color component values of the other elements except the font color are boundary values, so that the problem of incomplete information display caused by the conflict of the main tone, the character color and other project colors when a color template is generated can be avoided.
Other aspects of the features of the invention will become apparent from the following detailed description, which refers to the accompanying drawings. It is to be understood, however, that the drawings are designed solely for the purposes of illustration and not as a definition of the limits of the invention. It should be further understood that the drawings are not necessarily drawn to scale and that, unless otherwise indicated, they are merely intended to conceptually illustrate the structures and procedures described herein.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a flowchart of a color template generation method according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of initial theme colors and initial colors of a plurality of elements in an initial color template of a color template generation method according to a first embodiment of the present invention;
FIG. 3 is a flowchart showing a color template generating method according to a first embodiment of the present invention;
fig. 4 is a schematic structural diagram of a color template generating apparatus according to a second embodiment of the present invention;
FIG. 5 is a schematic diagram of a color template generating system according to a third embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computer-readable storage medium according to a fourth embodiment of the present invention.
Description of the reference numerals
S11-S19: a step of a color template generation method;
30: color template generating means; 301: a template acquisition module; 303: a theme color acquisition module; 305: an element color component acquisition module; 307: an element color determination module; 309: a template generation module;
40: a color template generation system; 41: a processor; 42: a memory;
50: computer readable storage media.
Detailed Description
It should be noted that, without conflict, the embodiments of the present invention and features of the embodiments may be combined with each other. The invention will be described below with reference to the accompanying drawings in combination with embodiments.
In order to enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, but not all embodiments of the embodiments are all within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the above figures are applicable to distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, it is possible to provide a device for the treatment of a disease. The terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be further noted that the division of the embodiments in the present invention is only for convenience of description, and should not be construed as a specific limitation, and features in the various embodiments may be combined and mutually referenced without contradiction.
[ first embodiment ]
Referring to fig. 1 to 3, a color template generating method according to a first embodiment of the present invention includes, for example, steps S11 to S19.
As shown in fig. 1, step S11: acquiring an initial color template, wherein the initial color template comprises a comparison relation table of initial theme colors and initial colors of a plurality of elements, and the initial theme colors and the initial colors are characterized by a plurality of color component values of a target color space;
step S13: responding to a user instruction to acquire a target theme color;
step S15: obtaining a plurality of color component values of the target color of each element in the target color space based on the relative relation between the target theme color and the plurality of color component values of the initial theme color in the target color space and the comparison relation table;
step S17: correcting color component values exceeding a preset color range in the target color of each element to determine the target color of the plurality of elements under the condition that at least part of the color component values in the target color of each element are judged to be located outside the preset color range; and
step S19: a new color template is generated based on the target theme color and the target colors of the plurality of elements.
As shown in fig. 3, in step S11, the mentioned table of the comparison of the initial theme colors with the initial colors of the plurality of elements is used, for example, to characterize the comparison of the initial theme colors with the initial colors of the plurality of elements in the initial color template shown in fig. 2. In fig. 2, where the initial theme colors are represented in the drop-down boxes, each box below represents the initial colors of a different element. The plurality of elements include, for example: the main background color, the module ground color, the label selected color, the screen selected color, the frame color, the background color, the font color and the like. In the look-up table, the initial subject color and the initial color of each element are each characterized by a plurality of color components of a target color space, such as the RGBA four-channel color space, then each of the initial subject color and the initial color of the plurality of elements may be represented as, for example, R, G, B, A four color components. Of course, the target color space may also be an RGB three-channel color space, and then each of the initial subject color and the initial colors of the plurality of elements is represented as R, G, B color components, respectively.
In step S13, the mentioned user instruction is, for example: the user selects the required theme colors through a drop-down box shown in fig. 2 and issues corresponding instructions, and the upper computer acquires the instructions to obtain the theme colors selected by the user as target theme colors.
In step S15, based on the relative relation between the target theme color and the plurality of color component values of the initial theme color in the target color space and the comparison relation table, a plurality of color component values of the target color of each element in the target color space are obtained, for example, as follows: obtaining a transformation coefficient corresponding to each color component value according to the relative relation between the color component values of the target theme color in the target color space and the color component values of the initial theme color in the target color space, and transforming the color component values of the initial color of each element in the comparison relation table through the transformation coefficient to obtain the color component values of the target color of each element in the target color space.
Further, the mentioned relative relationships include, for example, a difference operation relationship and a ratio operation relationship, and of course, the relative relationships may also be a multiplication and division operation and a combination operation by a fixed coefficient, which is not limited in the present invention.
In step S17, it is determined whether at least some of the color component values of the target color of each element are within a preset color range, and color component values exceeding the preset color range in the target color of the element are corrected. The preset color range mentioned is, for example, 0-255, and it is determined whether the obtained target colors of the plurality of elements are within the preset color range of 0-255 in R, G, B of the RGBA color space, and the color component values exceeding the preset color range are corrected to determine the target colors of the plurality of elements.
Further, when it is determined that the target color of the font has a color component value exceeding the color range of 0-255 in the R, G, B color component values of the RGBA color space, for example, the color component value is reversely valued, for example, when a certain color component value of the target color of the font exceeds 255, the color component value is subtracted by the color range boundary value 255 to realize the correction of the color component value.
Further, when it is judged that the target color of each of the plurality of elements other than the font color has a color component value exceeding a color range of 0 to 255 in R, G, B of the RGBA color space, for example, the color component value is corrected to a boundary value 255 of a preset color range.
Further, the color template generating method of the present invention further includes: and under the condition that at least partial color component values in the plurality of color component values of the target color of each element are judged to be in a preset color range, if the difference value between the plurality of color component values of the target color of the font and the plurality of color component values of the target color of the background color is not larger than a preset threshold value, reversely taking the color component values of the target color of the font which are not larger than the preset threshold value.
Specifically, for example, when the target color of each element is within a preset color range of 0-255 in R, G, B color component values of the RGBA color space, and the difference between a certain color component value of the target color of the font and the corresponding color component value of the target color of the background color is smaller than a preset threshold value, for example 128, the color component value of the target color of the font is reversely valued. For example, the R color component value of the target color of the font is 200, the R color component value of the target color of the background color is 256, the difference between the R color component value and the R color component value is smaller than the preset value 128, and the R color component value of the target color of the font is far from 256 by a certain value between 0 and 128, so that the difference between the R color component value and the R color component value is larger than 128.
In step S19, a new color template may be generated according to the target theme color selected by the user and the target colors of the plurality of elements obtained. The color template generation method is applied to a browser end, a software end and the like, and a user can select the theme of the full color gamut according to the needs.
In summary, in the color template generating method provided in this embodiment, by obtaining an initial color template, which includes a comparison relation table of initial theme colors and initial colors of a plurality of elements, and characterizing the initial theme colors and the initial colors of the plurality of elements by a plurality of color components in a color space, respectively, obtaining a target theme color and obtaining the target colors of the plurality of elements based on the relative relation between the target theme colors and the plurality of color components of the initial theme colors and the initial colors of the plurality of elements, the color template generation of the full color gamut can be realized; and by judging whether a plurality of color component values of the target color of each element are in a preset range or not, reversely taking values of the color component values of the font color exceeding the preset color range and having a color component value difference with the background color smaller than a preset threshold value and taking boundary values of the color component values of the other elements except the font color, the problem of incomplete information display caused by the conflict of the main tone, the character color and other project colors when the color template is generated can be avoided.
[ second embodiment ]
As shown in fig. 4, a second embodiment of the present invention provides a color template generating apparatus. The color template generating device 30 includes: a template acquisition module 301, a theme color acquisition module 303, an element color component acquisition module 305, an element color determination module 307, and a template generation module 309.
The template obtaining module 301 is configured to obtain an initial color template, where the initial color template includes a table of a comparison relationship between an initial theme color and initial colors of a plurality of elements, and the initial theme color is characterized by a plurality of color component values of a target color space. The theme-color acquisition module 303 is configured to acquire a target theme color in response to a user instruction. The element color component obtaining module 305 is configured to obtain a plurality of color component values of the target color of each element in the target color space based on the relative relationship between the target theme color and the plurality of color component values of the initial theme color in the target color space and the comparison relationship table. The element color determining module 307 is configured to, if it is determined that at least some color component values of the plurality of color component values of the target color of each element are located outside a preset color range, correct color component values of the target color of the element that exceed the preset color range, so as to determine target colors of the plurality of elements. The template generation module 309 is configured to generate a new color template based on the target theme color and the target colors of the plurality of elements.
As for the specific functional details of the template obtaining module 301, the theme color obtaining module 303, the element color component obtaining module 305, the element color determining module 307, and the template generating module 309, reference is made to the related descriptions of steps S11, S13, S15, S17, and S19 in the foregoing first embodiment, and the description thereof will not be repeated here. Further, it is worth mentioning that the template acquisition module 301, the theme color acquisition module 303, the element color component acquisition module 305, the element color determination module 307, and the template generation module 309 may be software modules, stored in a nonvolatile memory and executed by a processor to perform the relevant operations in steps S11, S13, S15, S17, and S19 in the foregoing first embodiment.
Further, the element color determining module is specifically configured to: and under the condition that at least partial color component values in the plurality of color component values of the target color of the font are respectively located outside the preset color range, reversely taking the value of the color component value exceeding the preset color range.
Further, the element color determination module is further configured to: and correcting the color component values exceeding the preset color range to be boundary values of the preset color range under the condition that at least partial color component values in the plurality of color component values of the target color of each element except the font in the plurality of elements are respectively positioned outside the preset color range.
The element color determination module is further configured to: and under the condition that at least partial color component values in the plurality of color component values of the target color of each element are judged to be in a preset color range, if the difference value between the plurality of color component values of the target color of the font color and the plurality of color component values of the target color of the background color is not larger than a preset threshold value, reversely taking the color component values of the target color of the font which are not larger than the preset threshold value.
In summary, according to the color template generating device provided by the second embodiment of the present invention, by obtaining an initial color template, which includes a comparison relation table of initial theme colors and initial colors of a plurality of elements, and characterizing the initial theme colors and the initial colors of the plurality of elements by a plurality of color components in a color space, respectively, obtaining a target theme color and obtaining the target colors of the plurality of elements based on the relative relation between the target theme colors and the plurality of color components of the initial theme colors and the initial colors of the plurality of elements, the color template generation of the full color gamut can be realized; and by judging whether a plurality of color component values of the target color of each element are in a preset range or not, reversely taking values of the color component values of the font color exceeding the preset color range and having a color component value difference with the background color smaller than a preset threshold value and taking boundary values of the color component values of the other elements except the font color, the problem of incomplete information display caused by the conflict of the main tone, the character color and other project colors when the color template is generated can be avoided.
[ third embodiment ]
Fig. 5 is a diagram of a color template generating system according to a third embodiment of the present invention. As shown in fig. 5, the color template generation system 40 includes: a memory 42 and one or more processors 41 coupled to the memory. The memory 42 stores a computer program, and the processor 41 is configured to execute the computer program to implement the color template generating method according to the first embodiment, which is not described herein for brevity, and the beneficial effects of the color template generating system 40 provided in this embodiment are the same as those of the color template generating method provided in the first embodiment.
[ fourth embodiment ]
Fig. 6 is a computer readable storage medium according to a fifth embodiment of the present invention. As shown in fig. 5, the computer-readable storage medium 50 is a nonvolatile memory and stores program code that, when executed by one or more processors, for example, causes the one or more processors to perform the color template generation method described in the foregoing first embodiment. The specific color template generating method may refer to the method described in the first embodiment, which is not described herein for brevity, and the beneficial effects of the computer readable storage medium 50 provided in this embodiment are the same as those of the color template generating method provided in the first embodiment.
In addition, it should be understood that the foregoing embodiments are merely exemplary illustrations of the present invention, and the technical solutions of the embodiments may be arbitrarily combined and matched without conflict in technical features, contradiction in structure, and departure from the purpose of the present invention.
In the several embodiments provided herein, it should be understood that the disclosed systems, devices, and/or methods may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and the division of the units/modules is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or modules may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units/modules described as separate units may or may not be physically separate, and units/modules may or may not be physically units, may be located in one place, or may be distributed on multiple network units. Some or all of the units/modules may be selected according to actual needs to achieve the purpose of the embodiment.
In addition, each functional unit/module in the embodiments of the present invention may be integrated in one processing unit/module, or each unit/module may exist alone physically, or two or more units/modules may be integrated in one unit/module. The integrated units/modules may be implemented in hardware or in hardware plus software functional units/modules.
The integrated units/modules implemented in the form of software functional units/modules described above may be stored in a computer readable storage medium. The software functional units described above are stored in a storage medium and include instructions for causing one or more processors of a computer device (which may be a personal computer, a server, or a network device, etc.) to perform some steps of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (6)

1. A color template generation method, comprising:
acquiring an initial color template, wherein the initial color template comprises a comparison relation table of initial theme colors and initial colors of a plurality of elements, and the initial theme colors and the initial colors are characterized by a plurality of color component values of a target color space;
responding to a user instruction to obtain a target theme color, wherein the target theme color is selected from a full color gamut;
obtaining a plurality of color component values of the target color of each element in the target color space based on the relative relation between the target theme color and the plurality of color component values of the initial theme color in the target color space and the comparison relation table;
correcting color component values exceeding a preset color range in the target color of each element to determine the target color of the plurality of elements under the condition that at least part of the color component values in the target color of each element are judged to be located outside the preset color range; and
generating a new color template based on the target theme color and the target colors of the plurality of elements;
wherein, when it is determined that at least some color component values of the plurality of color component values of the target color of each element are located outside a preset color range, correcting the color component value exceeding the preset color range in the target color of the element specifically includes:
under the condition that at least partial color component values in the plurality of color component values of the target color of the font are respectively located outside the preset color range, reversely taking values of the color component values exceeding the preset color range; or (b)
And correcting the color component values exceeding the preset color range to be boundary values of the preset color range under the condition that at least partial color component values in the plurality of color component values of the target color of each element except the fonts in the plurality of elements are respectively positioned outside the preset color range.
2. The color template generation method according to claim 1, wherein the relative relationship specifically includes: a difference operational relationship or a ratio operational relationship.
3. The color template generation method according to claim 1, wherein the plurality of elements include a font color and a background color, and an initial color of the background color is the same as the initial theme color.
4. The color template generation method according to claim 3, further comprising:
and under the condition that at least partial color component values in the plurality of color component values of the target color of each element are judged to be in a preset color range, if the difference value between the plurality of color component values of the target color of the font and the plurality of color component values of the target color of the background color is not larger than a preset threshold value, reversely taking the color component values of the target color of the font which are not larger than the preset threshold value.
5. A color template generating apparatus, comprising:
the template acquisition module is used for acquiring an initial color template, wherein the initial color template comprises a comparison relation table of initial theme colors and initial colors of a plurality of elements, and the initial theme colors and the initial colors are characterized by a plurality of color component values of a target color space;
the theme color acquisition module is used for responding to a user instruction to acquire a target theme color, wherein the target theme color is selected from a full color gamut;
an element color component obtaining module, configured to obtain a plurality of color component values of a target color of each element in the target color space based on a relative relationship between the target theme color and a plurality of color component values of the initial theme color in the target color space and the comparison relationship table;
an element color determination module, configured to, if it is determined that at least some color component values of the plurality of color component values of the target color of each element are located outside a preset color range, correct color component values of the target color of the element that exceed the preset color range, so as to determine target colors of the plurality of elements; and
a template generation module for generating a new color template based on the target theme color and the target colors of the plurality of elements;
the element color determining module is specifically configured to:
under the condition that at least partial color component values in the plurality of color component values of the target color of the font are respectively located outside the preset color range, reversely taking values of the color component values exceeding the preset color range; or (b)
And correcting the color component values exceeding the preset color range to be boundary values of the preset color range under the condition that at least partial color component values in the plurality of color component values of the target color of each element except the fonts in the plurality of elements are respectively positioned outside the preset color range.
6. The color template generation apparatus of claim 5, wherein the element color determination module is further configured to:
and under the condition that at least partial color component values in the plurality of color component values of the target color of each element are judged to be in a preset color range, if the difference value between the plurality of color component values of the target color of the font color and the plurality of color component values of the target color of the background color is not larger than a preset threshold value, reversely taking the color component values of the target color of the font which are not larger than the preset threshold value.
CN201911359910.8A 2019-12-25 2019-12-25 Color template generation method and color template generation device Active CN113031941B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911359910.8A CN113031941B (en) 2019-12-25 2019-12-25 Color template generation method and color template generation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911359910.8A CN113031941B (en) 2019-12-25 2019-12-25 Color template generation method and color template generation device

Publications (2)

Publication Number Publication Date
CN113031941A CN113031941A (en) 2021-06-25
CN113031941B true CN113031941B (en) 2023-06-30

Family

ID=76458302

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911359910.8A Active CN113031941B (en) 2019-12-25 2019-12-25 Color template generation method and color template generation device

Country Status (1)

Country Link
CN (1) CN113031941B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262539A (en) * 2007-03-05 2008-09-10 株式会社理光 Method and device for processing image and computer program products
CN106780635A (en) * 2016-12-30 2017-05-31 深圳创维-Rgb电子有限公司 The picture adapting method and system of a kind of intelligent terminal
CN106873959A (en) * 2016-07-12 2017-06-20 阿里巴巴集团控股有限公司 A kind of software interface color matching method and device
CN107025464A (en) * 2017-04-13 2017-08-08 深圳市金立通信设备有限公司 A kind of colour selecting method and terminal
CN108287744A (en) * 2018-02-09 2018-07-17 腾讯科技(深圳)有限公司 Character displaying method, device and storage medium
CN109739496A (en) * 2018-11-08 2019-05-10 深圳壹账通智能科技有限公司 A kind of display methods and device of the invoking page of application program
CN109857401A (en) * 2019-01-28 2019-06-07 华为技术有限公司 Display methods, graphic user interface and the electronic equipment of electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070028178A1 (en) * 2005-07-26 2007-02-01 Gibson Becky J Method and system for providing a fully accessible color selection component in a graphical user interface

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262539A (en) * 2007-03-05 2008-09-10 株式会社理光 Method and device for processing image and computer program products
CN106873959A (en) * 2016-07-12 2017-06-20 阿里巴巴集团控股有限公司 A kind of software interface color matching method and device
CN106780635A (en) * 2016-12-30 2017-05-31 深圳创维-Rgb电子有限公司 The picture adapting method and system of a kind of intelligent terminal
CN107025464A (en) * 2017-04-13 2017-08-08 深圳市金立通信设备有限公司 A kind of colour selecting method and terminal
CN108287744A (en) * 2018-02-09 2018-07-17 腾讯科技(深圳)有限公司 Character displaying method, device and storage medium
CN109739496A (en) * 2018-11-08 2019-05-10 深圳壹账通智能科技有限公司 A kind of display methods and device of the invoking page of application program
CN109857401A (en) * 2019-01-28 2019-06-07 华为技术有限公司 Display methods, graphic user interface and the electronic equipment of electronic equipment

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Latent Dirichlet Allocation for Text, Images, and Music;Hu D J;《University of California》;20091231;全文 *
利用Photoshop制作数控浮雕的若干问题;杨珍;《上海工程技术大学学报》;20090331;第23卷(第01期);全文 *

Also Published As

Publication number Publication date
CN113031941A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
CN105204807B (en) Method and device for adjusting color of display content at front end of screen
CN104714827B (en) Update of plug-in method and device
CN106940721B (en) Data processing method and system for user-defined selection box
US11462002B2 (en) Wallpaper management method, apparatus, mobile terminal, and storage medium
CN105528408A (en) Page display method and apparatus
CN109241009B (en) Method for preventing file from being repeatedly uploaded and control method and device thereof
CN101243436A (en) Gamut shape dependent color management system
CN109101309B (en) Method and apparatus for updating user interface
CN113031941B (en) Color template generation method and color template generation device
US10313561B2 (en) Image processing apparatus that executes color conversion on object data in target file
CN104954568A (en) Mobile phone font dynamic control system and method
US10701225B2 (en) User interface definition for information processing apparatus, control method, and storage medium
WO2018145536A1 (en) Method and device for adapting application notification color in android system and computing equipment
JP2009296545A (en) Image processing apparatus and method
US10679383B2 (en) Interface color branding
CN107368376B (en) Message sending method and device, expansion method and terminal
CN108304118B (en) Screenshot method and device
US10572693B2 (en) Method for hiding personal information on call screen, and device
CN107545062A (en) Entrance recalls method, apparatus, storage medium and electronic equipment
CN106055229B (en) Display interface adjusting method and display interface adjusting module based on screen reading
CN106610806B (en) Page information display method and device
US10977836B2 (en) Color wheel interface
CN109145263B (en) Document processing method and device and computer readable storage medium
CN110134867A (en) Corporation information query method and Related product
CN109062882A (en) A kind of electronic spreadsheet generation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant