CN113032063A - Data processing method and related device - Google Patents

Data processing method and related device Download PDF

Info

Publication number
CN113032063A
CN113032063A CN201911349746.2A CN201911349746A CN113032063A CN 113032063 A CN113032063 A CN 113032063A CN 201911349746 A CN201911349746 A CN 201911349746A CN 113032063 A CN113032063 A CN 113032063A
Authority
CN
China
Prior art keywords
color
value
target
determining
level
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.)
Granted
Application number
CN201911349746.2A
Other languages
Chinese (zh)
Other versions
CN113032063B (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911349746.2A priority Critical patent/CN113032063B/en
Publication of CN113032063A publication Critical patent/CN113032063A/en
Application granted granted Critical
Publication of CN113032063B publication Critical patent/CN113032063B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the application discloses a data processing method and a related device, which can determine target color values of main colors and background colors on respective color levels through preset color separation rules when facing massive materials, so that the target materials are dyed after the target colors are obtained, the target materials can be dyed only through the main colors and the background colors, the materials do not need to be manually replaced, the manufacturing cost is reduced, and the manufacturing efficiency is improved. The data processing method provided by the embodiment of the application comprises the following steps: acquiring a dominant color and a background color; determining a first target color value on a first color level of the dominant color and a second target color value on a second color level of the background color according to a preset color separation rule; and determining a first target color according to the first target color value, determining a second target color according to the second target color value, wherein the first target color and the second target color are used for dyeing the target material, so that the dyed target material is made into a theme pack.

Description

Data processing method and related device
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a data processing method and a related device.
Background
The theme pack is used as a data pack for beautifying a system or a software interface, and with the popularization of terminals, themes are widely applied by users, and the requirements of the users for making themes are higher and higher.
In order to meet the theme making requirements of users, users often need to manually select materials meeting the making requirements from a large number of material resources to adapt to the theme for the theme making of a product, that is, the colors of characters, icons and the like are selected and edited through manual operation, and the theme meeting the requirements can be made after repeated selection, replacement and modification.
However, in the current method of creating a theme by replacing individual materials through manual operation of a user, the creation cost is high, and errors are prone to occur when a large amount of materials are faced, thereby resulting in low efficiency of creating the theme.
Disclosure of Invention
The embodiment of the application provides a data processing method and a related device, which are used for determining target color values of main colors and background colors on respective color levels through preset color separation rules when massive materials are faced, so that the target materials are dyed after the target colors are obtained, the target materials can be dyed only through the main colors and the background colors, the materials do not need to be manually replaced, the manufacturing cost is reduced, and the manufacturing efficiency is improved.
In a first aspect, an embodiment of the present application provides a data processing method, including:
acquiring a dominant color and a background color;
determining a first target color value on a first color level of the dominant color and a second target color value on a second color level of the background color according to a preset color separation rule;
and determining a first target color according to the first target color value, determining a second target color according to the second target color value, wherein the first target color and the second target color are used for dyeing the target material, so that the dyed target material is made into a theme pack.
In a second aspect, an embodiment of the present application provides an apparatus for data processing, where the apparatus for data processing includes:
an acquisition unit configured to acquire a dominant color and a background color;
a first determining unit, configured to determine, according to a preset color separation rule, a first target color value on a first color level of the dominant color acquired by the acquiring unit and a second target color value on a second color level of the background color acquired by the acquiring unit;
the second determining unit is used for determining a first target color according to the first target color value determined by the first determining unit, determining a second target color according to the second target color value determined by the first determining unit, and the first target color and the second target color are used for dyeing a target material so that the dyed target material is made into a theme pack.
In one possible design, in a first possible implementation manner of the second aspect of the embodiment of the present application, the first determining unit includes:
a determining module, configured to determine a first color level value of the dominant color and a second color level value of the background color;
the determining module is configured to determine a WCAG value according to the first and second color level values;
the judging module is used for judging whether the WCAG value falls into a preset WCAG interval or not;
the determining module is configured to determine, on the first color level, that a color value corresponding to the preset WCAG interval is the first target color value and determine, on the second color level, that a color value corresponding to the preset WCAG interval is the second target color value when the determining module determines that the WCAG value falls into the preset WCAG interval;
the determining module is configured to determine a first color value and a second color value when the determining module determines that the WCAG value does not fall within the preset WCAG interval, where a color level distance between the first color value and a color value corresponding to the preset WCAG interval on the first color level is minimum, and a color level distance between the second color value and a color value corresponding to the preset WCAG interval on the second color level is minimum;
the determining module is configured to determine that the first color value is the first target color value and determine that the second color value is the second target color value.
In one possible design, in a second possible implementation manner of the second aspect of the embodiment of the present application, the determining module includes:
the calculation submodule is used for calculating a first color level position of the main color and a second color level position of the background color through a distance calculation formula;
and the determining submodule is used for determining the first color level value according to the first color level position and determining the second color level value according to the second color level position.
In one possible design, in a third possible implementation manner of the second aspect of the embodiment of the present application, the obtaining unit includes:
the first acquisition module is used for acquiring an input message, wherein the input message carries a user-defined dominant color and a background color.
In one possible design, in a fourth possible implementation manner of the second aspect of the embodiment of the present application, the obtaining unit includes:
the second acquisition module is used for acquiring a background image uploaded by a user aiming at the target material;
and the identification module is used for identifying the dominant color and the background color in the background image.
In a possible design, in a fifth possible implementation manner of the second aspect of the embodiment of the present application, the data processing apparatus further includes:
and the browsing unit is used for browsing the target material dyed based on the first target color and the second target color through a visual design tool after determining the first target color according to the first target color value and determining the second target color according to the second target color value, wherein the first target color and the second target color are used for dyeing the target material.
In a possible design, in a sixth possible implementation form of the second aspect of the embodiment of the present application, the target material includes text, an icon, a background, a bubble, or a button.
In a third aspect, an embodiment of the present application provides a computer apparatus, including:
the method comprises the following steps: an input/output (I/O) interface, a processor and a memory,
the memory stores program instructions;
the processor is adapted to execute program instructions stored in the memory for implementing the method according to any one of the possible implementations of the first aspect as described above.
A fourth aspect of the present application provides a computer-readable storage medium having stored thereon computer-executable instructions for performing the method according to any one of the possible implementation manners of the first aspect and the first aspect.
A fifth aspect of embodiments of the present application provides a computer program product comprising instructions which, when run on a computer or processor, cause the computer or processor to perform the method of any of the above aspects.
According to the technical scheme, the embodiment of the application has the following advantages:
in the embodiment of the application, after the main color and the background color are obtained, the first target color value is determined on the first color level of the main color and the second target color value is determined on the second color level of the background color through the preset color separation rule, so that the first target color is determined according to the first target color value, the second target color is determined according to the second target color value, so that the target material can be dyed by using the first target color and the second target color, therefore, even when facing a large amount of materials, the target color values of the main color and the background color on the respective color levels can be determined through the preset color separation rule, so that the target material can be dyed after the target color is obtained, the target material can be dyed only through the main color and the background color, the material does not need to be replaced manually, and the manufacturing cost is reduced, and also improves the manufacturing efficiency.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a schematic diagram of an application scenario of data processing in an embodiment of the present application;
FIG. 2 is a schematic diagram of one embodiment of a method of data processing provided in an embodiment of the present application;
FIG. 3 is a schematic diagram of a first color gradation of a dominant color provided in an embodiment of the present application;
FIG. 4 is a second gradation diagram of the background color provided in the embodiment of the present application;
FIG. 5 is a schematic diagram of an embodiment of a data processing apparatus provided in the embodiments of the present application;
FIG. 6 is a schematic diagram of an embodiment of a data processing apparatus provided in the embodiments of the present application;
fig. 7 is a schematic structural diagram of a computer device provided in an embodiment of the present application.
Detailed Description
The embodiment of the application provides a data processing method and a related device, and is used for determining target color values of main colors and background colors on respective color levels through preset color separation rules when massive materials are faced, so that the target materials are dyed after the target colors are obtained, the target materials can be dyed only through the main colors and the background colors, the materials do not need to be manually replaced, the manufacturing cost is reduced, and the manufacturing efficiency is improved.
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, 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, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. The naming or numbering of the steps appearing in the present application does not mean that the steps in the method flow have to be executed in the chronological/logical order indicated by the naming or numbering, and the named or numbered process steps may be executed in a modified order depending on the technical purpose to be achieved, as long as the same or similar technical effects are achieved.
The following introduces a system architecture to which the embodiments of the present application are applicable:
the method provided by the embodiment of the application is mainly applied to scenes for making themes. For example: when a user wants to replace the theme in the terminal equipment with a favorite theme, the favorite color, background and the like are selected to make a favorite theme. However, for the creation of a theme, a user is usually required to manually select a material meeting the creation requirement from a large number of material resources to adapt to the theme, that is, the user selects and edits the color of a character, the color of an icon, and the like through manual operation, and the theme meeting the requirement can be created after repeated selection, replacement, and modification, so that not only is the creation cost high, but also errors are easily caused when a large amount of materials are faced, and the theme creation efficiency is low.
In order to solve the above problem, an embodiment of the present application provides a data processing method, which can be applied to the application scenario diagram shown in fig. 1, please refer to fig. 1, which is an application scenario diagram of data processing in the embodiment of the present application. As can be seen from fig. 1, for the product of QQ, by making a theme using two colors, i.e., yellow and black, where the main color is yellow and the background color is black, the corresponding target color is determined by yellow and black, and texts, buttons, backgrounds, icons, bubbles, and the like in the product of QQ can be quickly dyed by the corresponding target color, so as to make a theme that is preferred by a user.
It should be noted that the fact that the primary color described in fig. 1 is yellow and the background color is black is merely an illustration, and in practical applications, other primary colors such as red, green, and blue, such as white and gray, may also be included, and embodiments of the present application will not be limited specifically. It should be noted that the application scenario described in fig. 1 can be widely applied to products using topics such as WeChat, Enterprise WeChat, desktop, etc. besides the QQ product, and the embodiment of the present application is only described by taking the QQ product as an example to make the topic.
To better understand the proposed solution in the embodiments of the present application, a detailed flow in the embodiments is described below, please refer to fig. 2, which is a schematic diagram of an embodiment of a method for processing data provided in the embodiments of the present application, the method including:
201. the dominant color and the background color are acquired.
In this embodiment, the main color may determine the style of the whole theme to convey correct theme information, and the background color helps the main color to establish a more complete image in the whole theme, so that the picture of the theme is rich and wonderful. Generally, the choice of dominant color will select a color with higher saturation and vivid color as the dominant color in the theme, such as: the background color is generally selected from dark colors such as gray, black, and white. In practical application, the dominant color and the background color in the theme may be specifically determined according to the needs of the user, and the embodiment of the present application is not specifically limited.
Alternatively, the dominant color and the background color may be obtained from two aspects.
The first mode is as follows: and acquiring an input message, wherein the input message carries a user-defined dominant color and a user-defined background color. In this embodiment, for the manufacture of a certain theme, the dominant color and the background color required in the theme can be customized by the user according to the needs of the user, for example, "yellow" is selected as the dominant color, and "black" is selected as the background color, so that the user can obtain the corresponding dominant color and the background color in the input message after directly inputting the dominant color and the background color.
The second mode is as follows: acquiring a background image uploaded by a user aiming at the target material; identifying a dominant color and a background color in the background map. In this embodiment, the background image is any one of pictures uploaded by a user for a target material, and the dominant color and the background color can be identified in the background image according to the color distribution. Such as: the main color with less color and more vivid color can be identified in one picture according to the color distribution, and the background color with more color distribution and dim large picture. Therefore, the user can recognize the main color and the background color only by uploading a background image.
202. And determining a first target color value on a first color level of the dominant color and a second target color value on a second color level of the background color according to a preset color separation rule.
In this embodiment, the preset color separation rule is a rule for separating the main color and the background color after the main color and the background color are obtained.
That is, it is understood that, after the dominant color is obtained, other colors of the same color system with different contrasts can be separated from the dominant color through the preset color separation rule, so that the first target color value of the dominant color is determined on the first color level of the dominant color. For example: please refer to fig. 3, which is a first color gradation diagram of a dominant color provided in the embodiment of the present application. As can be seen from fig. 3, when "yellow" is used as the main color, at least one color of the same color system as "yellow" is separated from the first color level, and the colors are respectively identified by different color numbers, for example, the number # FFC107 represents yellow, the number # FFB300 represents yellow which is a little darker than the number # FFC107, the number # FFCA28 represents yellow which is a little lighter than the number # FFC107, and the number # FF6F00 represents tawny, and the like. In addition, it should be noted that the color numbers described above are only colors that are different for the user to identify, and in practical applications, other identifiers having an identification function may also be used to distinguish different colors, which will not be specifically limited in the embodiments of the present application. The first target color value described above is actually a contrast WCAG value of a dominant color in a corresponding first color gamut, and each contrast WCAG value corresponds to a color, so that the corresponding color number can be called by determining the corresponding WCAG value as long as the first target color value of the dominant color in the first color gamut is determined.
Similarly, as long as the background color is obtained, the background color can be subjected to color separation to obtain other colors of the same color system with different contrasts according to the preset color separation rule. Please refer to fig. 4, which is a second color level diagram of the background color provided in the embodiment of the present application. As can be seen from fig. 4, when "gray" is used as a background color, at least one color of the same color system as "gray" is separated from the second color level, and the colors are respectively identified by different color numbers, where, if the number #9E9E represents gray, the number #757575 identifies gray that is slightly darker than the number #9E9E, the number # BDBDBD identifies gray that is slightly lighter than the number #9E9E, the number #424242 identifies dark gray, the number #000000 identifies black, the number # ffffffffff identifies white that has no gray level, and the like. In addition, it should be noted that the color numbers described above are only colors that are different for the user to identify, and in practical applications, other identifiers having an identification function may also be used to distinguish different colors, which will not be specifically limited in the embodiments of the present application. The second target color value described above is actually a contrast WCAG value of the background color in the corresponding second color level, and each contrast WCAG value corresponds to one color, so that the corresponding color number can be called by determining the corresponding WCAG value as long as the second target color value of the background color in the second color level is determined.
Optionally, in other embodiments, how to determine the target color value by the preset color separation rule may be determined by: determining a first color level value of the dominant color and a second color level value of the background color; determining a WCAG value according to the first color level value and the second color level value; judging whether the WCAG value falls into a preset WCAG interval or not; when the WCAG value falls into the preset WCAG interval, determining a color value corresponding to the WCAG value on the first color level as the first target color value, and determining a color value corresponding to the WCAG value on the second color level as the second target color value; when the WCAG value does not fall into the preset WCAG interval, determining a first color value and a second color value, wherein the color level distance between the first color value and the color value corresponding to the preset WCAG interval on the first color level is minimum, and the color level distance between the second color value and the color value corresponding to the preset WCAG interval on the second color level is minimum; determining the first color value to be the first target color value, and determining the second color value to be the second target color value.
In this embodiment, the first gradation value refers to a gradation value of the acquired main color on the first gradation, and the first gradation value can indicate at which gradation position in the first gradation the acquired main color is located; similarly, the second color level value refers to a color level value of the acquired background color on the second color level, and the second color level value can indicate which color level position in the second color level the acquired background color is mainly located. Therefore, after the first gradation value of the main color and the second gradation value of the background color are determined, the first gradation value and the second gradation value may be compared, and actually, the second gradation value is divided by the first gradation value, so as to obtain the corresponding WCAG value.
The preset Web Content Accessibility Guide (WCAG) interval indicates that the theme made by the color corresponding to the color value in the interval is satisfactory, and the achieved theme effect is satisfied by the user. Therefore, it is necessary to determine whether the calculated WCAG value falls within a preset WCAG interval, and if the calculated WCAG value falls within the preset WCAG interval, directly use the color value corresponding to the WCAG value on the first color level as the described first target color value, and use the color value corresponding to the WCAG value on the second color level as the described second target color value. For example: assuming that the calculated WCAG value is 4.6 and the predetermined WCAG interval is (4.5, 6), it is obvious that the calculated WCAG value falls into the predetermined WCAG interval, and if the color value of the WCAG value of 4.6 corresponds to the color number # FFA000 on the first color level and the color value of the WCAG value corresponds to the color number #6161 on the second color level, the target colors corresponding to the respective color levels are easily obtained. It should be understood that WCAG is a barrier-free design specification defined on the web, and its concept of contrast is mainly used in the embodiments of the present application.
In addition, if the WCAG value is determined not to fall within the preset WCAG interval, a first color value closest to a color value corresponding to the preset WCAG interval may be determined on a first color level, and a second color value closest to the color value corresponding to the preset WCAG interval may be determined on a second color level; determining the first color value to be the first target color value, and determining the second color value to be the second target color value.
In this embodiment, when it is determined that the WCAG value does not fall into the preset WCAG interval, color values need to be determined on respective color levels, that is, a color value closest to the color value of the preset WCAG interval is searched in a traversal manner on the whole first color level, so that the closest color value is used as the first target color value of the dominant color, and in the same manner, a color value closest to the color value of the preset WCAG interval is searched in a traversal manner on the whole second color level, so that the closest color value is used as the second target color value of the background color.
For example: assuming that the calculated WCAG value is 3 and the preset WCAG interval is (4.5, 6), it is obvious that the calculated WCAG value does not fall into the preset WCAG interval, at this time, all color values need to be searched in a traversal manner on the first color rank, and the color rank distance of all color values and the preset WCAG interval is compared, and the smaller the distance is, the more similar the color corresponding to the color value and the color corresponding to the preset WCAG interval is, the more the color is in accordance with the color of the manufacturing subject of the user. Therefore, if the color value with the smallest color rank distance between the searched color value and the preset WCAG interval is 4, the color value may be taken as the first color value, and the first color value may be taken as the first target color value. Similarly, all color values still need to be searched in a traversal manner on the second color rank, and the color rank distances of all color values and the preset WCAG intervals are compared, if the color value with the smallest color rank distance between the searched color value and the preset WCAG interval in the traversal manner on the second color rank is 4.2, the color value with the smallest color rank distance between the searched color value and the preset WCAG interval can be used as the second color value, and the second color value can be used as the second target color value.
Optionally, in further embodiments, determining the first gradation value of the dominant color and the second gradation value of the background color includes: calculating a first color level position of the main color and a second color level position of the background color through a distance calculation formula; determining the first gradation value according to the first gradation position and determining the second gradation value according to the second gradation position.
203. And determining a first target color according to the first target color value, determining a second target color according to the second target color value, wherein the first target color and the second target color are used for dyeing the target material, so that the dyed target material is made into a theme pack.
In this embodiment, the target material may include, but is not limited to, text, an icon, a background, a bubble, or a button, and will not be specifically limited in this embodiment. Each color value corresponds to a color number, and each color number uniquely identifies a color, so that a first target color can be determined according to a first target color value, and a second target color can be determined according to a second target color value, so that the described target material can be dyed by using the first target color and the second target color after the corresponding first target color and the corresponding second target color are obtained, and the dyed target material is made into a theme required by a user.
Optionally, in other embodiments, after determining a first target color according to the first target color value and determining a second target color according to the second target color value, where the first target color and the second target color are used for dyeing the target material, the method further includes: and browsing the target material dyed based on the first target color and the second target color through a visual design tool.
In the embodiment, the dyed target material is browsed in real time through the visual design tool, so that the theme making and processing are more integrated, and the making cost is greatly reduced.
In the embodiment of the application, after the main color and the background color are obtained, the first target color value is determined on the first color level of the main color and the second target color value is determined on the second color level of the background color through the preset color separation rule, so that the first target color is determined according to the first target color value, the second target color is determined according to the second target color value, so that the target material can be dyed by using the first target color and the second target color, therefore, even when facing a large amount of materials, the target color values of the main color and the background color on the respective color levels can be determined through the preset color separation rule, so that the dyeing of the target material is realized after the target color is obtained, the target material can be dyed only through the main color and the background color, the material does not need to be replaced manually, and the manufacturing cost of the theme pack is reduced, and also improves the manufacturing efficiency.
The scheme provided by the embodiment of the application is mainly introduced from the perspective of a method. It is to be understood that the hardware structure and/or software modules for performing the respective functions are included to realize the above functions. Those of skill in the art will readily appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiment of the present application, functional modules of the apparatus may be divided according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
Referring to fig. 5, fig. 5 is a schematic view of an embodiment of a data processing apparatus 50 provided in an embodiment of the present application, where the data processing apparatus 50 may include:
an obtaining unit 501, configured to obtain a dominant color and a background color;
a first determining unit 502, configured to determine, according to a preset color separation rule, a first target color value on a first color level of the dominant color acquired by the acquiring unit 501 and a second target color value on a second color level of the background color acquired by the acquiring unit;
a second determining unit 503, configured to determine a first target color according to the first target color value determined by the first determining unit 502, and determine a second target color according to the second target color value determined by the first determining unit, where the first target color and the second target color are used to dye the target material.
Optionally, on the basis of the embodiment corresponding to fig. 5, referring to fig. 6, for a schematic view of another embodiment of the data processing apparatus 50 provided in the embodiment of the present application, the first determining unit 502 includes:
a determining module 5021, configured to determine a first color level value of the main color and a second color level value of the background color;
a determining module 5021, configured to determine a WCAG value according to the first color level value and the second color level value;
a judging module 5022, configured to judge whether the WCAG value falls within a preset WCAG interval;
a determining module 5021, configured to determine, on a first color level, that a color value corresponding to a preset WCAG interval is a first target color value and determine, on a second color level, that a color value corresponding to a preset WCAG interval is a second target color value when the determining module 5022 determines that the WCAG value falls into the preset WCAG interval;
a determining module 5021, configured to determine a first color value and a second color value when the determining module 5022 determines that the WCAG value does not fall within the preset WCAG interval, where a color rank distance between the first color value on a first color rank and a color value corresponding to the preset WCAG interval is minimum, and a color rank distance between the second color value on the second color rank and a color value corresponding to the preset WCAG interval is minimum;
the determining module 5021 is configured to determine the first color value as a first target color value and determine the second color value as a second target color value.
Optionally, on the basis of the embodiment corresponding to fig. 6, in another embodiment of the data processing apparatus 50 provided in the embodiment of the present application, the determining module 5021 includes:
the calculation submodule is used for calculating a first color level position of the main color and a second color level position of the background color through a distance calculation formula;
and the determining submodule is used for determining a first color level value according to the first color level position and determining a second color level value according to the second color level position.
Optionally, on the basis of one optionally corresponding embodiment of the foregoing 5, fig. 6, and fig. 6, in another embodiment of the data processing apparatus 50 provided in this embodiment of the present application, the obtaining unit 501 includes:
the first acquisition module is used for acquiring an input message, and the input message carries a user-defined dominant color and a background color.
Optionally, on the basis of one optionally corresponding embodiment of the foregoing 5, fig. 6, and fig. 6, in another embodiment of the data processing apparatus 50 provided in this embodiment of the present application, the obtaining unit 501 includes:
the second acquisition module is used for acquiring a background image uploaded by a user aiming at the target material;
and the identification module is used for identifying the dominant color and the background color in the background image.
Optionally, on the basis of the embodiment corresponding to fig. 5, in another embodiment of the data processing apparatus 50 provided in this embodiment of the present application, the data processing apparatus 50 may further include:
and the browsing unit is used for browsing the target material dyed based on the first target color and the second target color through a visual design tool after the first target color and the second target color are used for dyeing the target material.
In the embodiment of the present application, after the dominant color and the background color are obtained by the obtaining unit 501, the first target color value is determined on the first color level of the dominant color and the second target color value is determined on the second color level of the background color by the preset color separation rule, so that the first target color is determined according to the first target color value, the second target color is determined according to the second target color value, and the target material can be dyed by using the first target color and the second target color, therefore, even when facing a large amount of materials, the target color values of the dominant color and the background color on the respective color levels can be determined by the preset color separation rule, so that the target material is dyed after the target color is obtained, so that the target material can be dyed only by the dominant color and the background color without manually replacing the material, thereby not only reducing the manufacturing cost, and also improves the manufacturing efficiency.
The apparatus 50 for data processing in the embodiment of the present application is described above from the perspective of a modular functional entity, and the computer device in the embodiment of the present application is described below from the perspective of hardware processing. Fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present disclosure, where the computer device may include the data processing apparatus 50 described above, and the computer device may have a relatively large difference due to different configurations or performances, and the computer device may include at least one processor 701, a communication line 707, a memory 703, and at least one communication interface 704.
The processor 701 may be a general processing unit (CPU), a microprocessor, an application-specific integrated circuit (server IC), or one or more ICs for controlling the execution of programs in accordance with the present invention.
The communication link 707 may include a path that conveys information between the aforementioned components.
Communication interface 704, using any device such as a transceiver, may be used to communicate with other devices or communication networks, such as an ethernet, a Radio Access Network (RAN), a Wireless Local Area Network (WLAN), etc.
The memory 703 may be a read-only memory (ROM) or other type of static storage device that may store static information and instructions, a Random Access Memory (RAM) or other type of dynamic storage device that may store information and instructions, which may be separate and coupled to the processor via a communication line 707. The memory may also be integral to the processor.
The memory 703 is used for storing computer-executable instructions for executing the present invention, and is controlled by the processor 701 to execute. The processor 701 is configured to execute computer-executable instructions stored in the memory 703, so as to implement the data processing method provided by the above-described embodiment of the present application.
Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application program codes, which are not specifically limited in the embodiments of the present application.
In particular implementations, the computer device may include multiple processors, such as processor 701 and processor 702 in fig. 7, for one embodiment. Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
In particular implementations, the computer device may also include an output device 705 and an input device 706, as one embodiment. An output device 705 is in communication with the processor 701 and may display information in a variety of ways. The input device 706 is in communication with the processor 701 and may receive user input in a variety of ways. For example, the input device 706 may be a mouse, a touch screen device, or a sensing device, among others.
The computer apparatus may be a general-purpose device or a special-purpose device. In particular implementations, the computer device may be a desktop, laptop, nas server, wireless end device, embedded device, or device having a similar structure as in fig. 7. The embodiment of the application does not limit the type of the computer equipment.
In the embodiment of the present application, the processor 701 included in the computer device further has the following functions:
acquiring a dominant color and a background color;
determining a first target color value on a first color level of the dominant color and a second target color value on a second color level of the background color according to a preset color separation rule;
and determining a first target color according to the first target color value, determining a second target color according to the second target color value, wherein the first target color and the second target color are used for dyeing the target material.
In some embodiments of the present application, the processor 701 may also be specifically configured to,
determining a first color level value of the main color and a second color level value of the background color;
determining a WCAG value according to the first color level value and the second color level value;
judging whether the WCAG value falls into a preset WCAG interval or not;
when the WCAG value falls into a preset WCAG interval, determining a color value corresponding to the preset WCAG interval as a first target color value on a first color level, and determining a color value corresponding to the preset WCAG interval as a second target color value on a second color level;
when the WCAG value does not fall into a preset WCAG interval, determining a first color value and a second color value, wherein the color level distance between the first color value and the color value corresponding to the preset WCAG interval on a first color level is the minimum, and the color level distance between the second color value and the color value corresponding to the preset WCAG interval on a second color level is the minimum;
the first color value is determined to be a first target color value, and the second color value is determined to be a second target color value.
In the embodiment of the present application, the processor 701 included in the computer device further has the following functions:
calculating a first color level position of the main color and a second color level position of the background color through a distance calculation formula;
a first gradation value is determined according to the first gradation position and a second gradation value is determined according to the second gradation position.
In the embodiment of the present application, the processor 701 included in the computer device further has the following functions:
and acquiring an input message, wherein the input message carries a user-defined dominant color and a user-defined background color.
In the embodiment of the present application, the processor 701 included in the computer device further has the following functions:
acquiring a background image uploaded by a user aiming at a target material;
the dominant color and the background color in the background map are identified.
In the embodiment of the present application, the processor 701 included in the computer device further has the following functions: and after the first target color and the second target color are used for dyeing the target material, browsing the target material dyed based on the first target color and the second target color through a visual design tool.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A method of data processing, comprising:
acquiring a dominant color and a background color;
determining a first target color value on a first color level of the dominant color and a second target color value on a second color level of the background color according to a preset color separation rule;
and determining a first target color according to the first target color value, determining a second target color according to the second target color value, wherein the first target color and the second target color are used for dyeing the target material, so that the dyed target material is made into a theme pack.
2. The method of claim 1, wherein determining a first target color value at a first level of the dominant color and a second target color value at a second level by a predetermined color separation rule comprises:
determining a first color level value of the dominant color and a second color level value of the background color;
determining a WCAG value according to the first color level value and the second color level value;
judging whether the WCAG value falls into a WCAG interval of a preset network content accessibility guide;
when the WCAG value falls into the preset WCAG interval, determining a color value corresponding to the WCAG value on the first color level as the first target color value, and determining a color value corresponding to the WCA value on the second color level as the second target color value;
when the WCAG value does not fall into the preset WCAG interval, determining a first color value and a second color value, wherein the color level distance between the first color value and the color value corresponding to the preset WCAG interval on the first color level is minimum, and the color level distance between the second color value and the color value corresponding to the preset WCAG interval on the second color level is minimum;
determining the first color value to be the first target color value, and determining the second color value to be the second target color value.
3. The method of claim 2, wherein determining the first level value for the dominant color and the second level value for the background color comprises:
calculating a first color level position of the main color and a second color level position of the background color through a distance calculation formula;
determining the first gradation value according to the first gradation position and determining the second gradation value according to the second gradation position.
4. The method of any of claims 1 to 3, wherein obtaining the dominant and background colors comprises:
and acquiring an input message, wherein the input message carries a user-defined dominant color and a user-defined background color.
5. The method of any of claims 1 to 3, wherein obtaining the dominant and background colors comprises:
acquiring a background image uploaded by a user aiming at the target material;
identifying a dominant color and a background color in the background map.
6. The method of claim 1, wherein after determining a first target color from the first target color value and a second target color from the second target color value, the first target color and the second target color being used to color the target material, the method further comprises:
and browsing the target material dyed based on the first target color and the second target color through a visual design tool.
7. The method of claim 1, wherein the target material comprises text, an icon, a background, a bubble, or a button.
8. An apparatus for data processing, comprising:
an acquisition unit configured to acquire a dominant color and a background color;
a first determining unit, configured to determine, according to a preset color separation rule, a first target color value on a first color level of the dominant color acquired by the acquiring unit and a second target color value on a second color level of the background color acquired by the acquiring unit;
the second determining unit is used for determining a first target color according to the first target color value determined by the first determining unit, determining a second target color according to the second target color value determined by the first determining unit, and the first target color and the second target color are used for dyeing a target material so that the dyed target material is made into a theme pack.
9. A computer device, characterized in that the computer device comprises: an input/output (I/O) interface, a processor and a memory,
the memory has stored therein program instructions;
the processor is configured to execute program instructions stored in the memory to perform the method of any of claims 1 to 7.
10. A computer-readable storage medium comprising instructions that, when executed on a computer device, cause the computer device to perform the method of any of claims 1 to 7.
CN201911349746.2A 2019-12-24 2019-12-24 Data processing method and related device Active CN113032063B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911349746.2A CN113032063B (en) 2019-12-24 2019-12-24 Data processing method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911349746.2A CN113032063B (en) 2019-12-24 2019-12-24 Data processing method and related device

Publications (2)

Publication Number Publication Date
CN113032063A true CN113032063A (en) 2021-06-25
CN113032063B CN113032063B (en) 2024-04-26

Family

ID=76452350

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911349746.2A Active CN113032063B (en) 2019-12-24 2019-12-24 Data processing method and related device

Country Status (1)

Country Link
CN (1) CN113032063B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113862963A (en) * 2021-09-07 2021-12-31 青岛海尔科技有限公司 Washing machine, control method and device of washing machine, storage medium and processor

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035990A (en) * 2009-09-30 2011-04-27 株式会社日立制作所 Method of color customization of content screen
CN107016978A (en) * 2017-04-25 2017-08-04 腾讯科技(深圳)有限公司 A kind of showing interface technology and terminal device
CN109427036A (en) * 2017-08-22 2019-03-05 北京搜狗科技发展有限公司 The treating method and apparatus of skin color
CN110472083A (en) * 2018-05-08 2019-11-19 优酷网络技术(北京)有限公司 Colour gamut recommended method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035990A (en) * 2009-09-30 2011-04-27 株式会社日立制作所 Method of color customization of content screen
CN107016978A (en) * 2017-04-25 2017-08-04 腾讯科技(深圳)有限公司 A kind of showing interface technology and terminal device
CN109427036A (en) * 2017-08-22 2019-03-05 北京搜狗科技发展有限公司 The treating method and apparatus of skin color
CN110472083A (en) * 2018-05-08 2019-11-19 优酷网络技术(北京)有限公司 Colour gamut recommended method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113862963A (en) * 2021-09-07 2021-12-31 青岛海尔科技有限公司 Washing machine, control method and device of washing machine, storage medium and processor
CN113862963B (en) * 2021-09-07 2023-10-24 青岛海尔科技有限公司 Washing machine, control method and device thereof, storage medium and processor

Also Published As

Publication number Publication date
CN113032063B (en) 2024-04-26

Similar Documents

Publication Publication Date Title
CN105511873B (en) User interface control display method and device
CN106503004A (en) A kind of information processing method and device, terminal
CN106406900A (en) Wallpaper display method and device
CN103761110B (en) browser font display processing method and device
JP7130465B2 (en) Maintain the color theme of your presentation
CN104536771A (en) Method and system for showing icon sequencing according to icon colors
US11462002B2 (en) Wallpaper management method, apparatus, mobile terminal, and storage medium
CN105446592A (en) Application icon classification and displaying method and device
US10078436B2 (en) User interface adjusting method and apparatus using the same
CN105867727A (en) Multi-application interface display method and device
CN110084871B (en) Image typesetting method and device and electronic terminal
CN103065338A (en) Method and device providing shadow for foreground image in background image
US20220139000A1 (en) Device and method for coloring sketch image
CN104461614A (en) Method for processing theme resource and electronic device
CN109410295A (en) Color setting method, device, equipment and computer readable storage medium
CN113032063A (en) Data processing method and related device
CN108897541A (en) Vision restoring method, device, storage medium and the terminal of application program
CN107203312A (en) Rendering intent, the storage device of mobile terminal and its picture
CN108234489B (en) Live broadcast recommendation information processing method and device and terminal equipment
CN109032721A (en) A kind of background image switching method and device
Gijsenij et al. Determining key colors from a design perspective using dE‐means color clustering
CN111199138A (en) Method, system, server and storage medium for stroking bullet screen containing Emoji expression by using QML (QML)
CN113837181B (en) Screening method, screening device, computer equipment and computer readable storage medium
US10679383B2 (en) Interface color branding
CN106055229B (en) Display interface adjusting method and display interface adjusting module based on screen reading

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