CN112395030A - Page processing method and device, electronic device and storage medium - Google Patents
Page processing method and device, electronic device and storage medium Download PDFInfo
- Publication number
- CN112395030A CN112395030A CN201910758598.3A CN201910758598A CN112395030A CN 112395030 A CN112395030 A CN 112395030A CN 201910758598 A CN201910758598 A CN 201910758598A CN 112395030 A CN112395030 A CN 112395030A
- Authority
- CN
- China
- Prior art keywords
- color
- image
- theme
- target
- page
- 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.)
- Pending
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 11
- 238000000034 method Methods 0.000 claims abstract description 61
- 239000003086 colorant Substances 0.000 claims description 84
- 238000013507 mapping Methods 0.000 claims description 23
- 238000012545 processing Methods 0.000 abstract description 17
- 238000010586 diagram Methods 0.000 description 27
- 230000008569 process Effects 0.000 description 22
- 235000019642 color hue Nutrition 0.000 description 21
- 238000004590 computer program Methods 0.000 description 9
- 230000004044 response Effects 0.000 description 8
- 230000000007 visual effect Effects 0.000 description 8
- 238000001514 detection method Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 238000006243 chemical reaction Methods 0.000 description 4
- 238000000605 extraction Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 3
- 238000009877 rendering Methods 0.000 description 3
- 241000872198 Serjania polyphylla Species 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 239000000284 extract Substances 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000003064 k means clustering Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 210000003813 thumb Anatomy 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Color Image Communication Systems (AREA)
Abstract
The embodiment of the application discloses a page processing method, a page processing device, an electronic device and a storage medium, wherein the method comprises the following steps: displaying at least one subject color identifier in an application page; responding to a trigger operation aiming at a target theme color identifier, and acquiring a theme color corresponding to the target theme color identifier; the target subject color identification belongs to the at least one subject color identification; and acquiring a page theme control corresponding to the application page, and adjusting the color attribute of the page theme control according to the theme color. By the aid of the method and the device, page theme switching efficiency can be improved.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a page processing method and apparatus, and a related device.
Background
There are tens of thousands of apps (applications) published each day to satisfy various needs of people, and the interface visual effect of apps directly affects the life span of apps, and an interface with good visual effect also increases user stickiness.
Switching the interface theme of the app is a relatively direct means for improving the visual effect of the app interface, and at present, the process of switching the interface theme is as follows: and the user selects the theme to be replaced in the terminal equipment, the terminal equipment downloads the corresponding theme resource data, and the interface theme data of the current app is replaced by the downloaded theme resource data, so that the purpose of switching the interface theme is achieved.
Therefore, the theme switching efficiency is low because the theme resources need to be downloaded first and then the downloaded theme data is replaced with the original theme data when the interface theme is switched.
Disclosure of Invention
The embodiment of the application provides a page processing method, a page processing device and related equipment, and can improve page theme switching efficiency.
An aspect of the present application provides a page processing method, including:
displaying at least one subject color identifier in an application page;
responding to a trigger operation aiming at a target theme color identifier, and acquiring a theme color corresponding to the target theme color identifier; the target subject color identification belongs to the at least one subject color identification;
and acquiring a page theme control corresponding to the application page, and adjusting the color attribute of the page theme control according to the theme color.
The obtaining of the page theme control corresponding to the application page includes:
displaying at least one page control identification corresponding to the application page;
and responding to the selection operation aiming at the at least one page control identification, and taking the page control corresponding to the selected page control identification as the page theme control.
Wherein the displaying of the at least one theme color identifier in the application page includes:
acquiring a target image, and determining the image theme color of the target image;
acquiring the at least one theme color identifier matched with the theme color of the image;
setting the target image as a background image of the application page;
and displaying the at least one theme color identification in an application page with a background image.
Wherein the determining the image subject color of the target image comprises:
acquiring first pixel colors of a plurality of pixel points in the target image; the first pixel color comprises a pixel primary color and a pixel transparency;
combining the average of the plurality of pixel primaries and the average of the plurality of pixel transparencies into the image subject color.
Wherein the obtaining of the at least one subject color identifier matching the subject color of the image comprises:
determining a color distance of the image theme color and an application theme color in the set of application theme colors;
taking the application theme color with the color distance smaller than the distance threshold as the theme color to be recommended;
and acquiring the color identifier of the theme color to be recommended as the theme color identifier.
Wherein the setting of the target image as the background image of the application page includes:
setting the transparency of the target image to obtain an image to be merged;
extracting the image template color of the target image;
determining a background color image according to the color of the image template, and combining the background color image and the image to be combined into a background image of the application page; the image size of the ground color image is the same as the image size of the target image.
Wherein, the setting of the transparency of the target image to obtain the image to be merged comprises:
acquiring an image transparency parameter and an image fuzziness parameter associated with the target image;
adjusting the transparency attribute of the target image according to the image transparency parameter, and adjusting the blur attribute of the target image according to the image blur parameter;
and taking the target image with the transparency attribute and the fuzziness attribute adjusted as the image to be merged.
Wherein the extracting of the image template color of the target image comprises:
combining second pixel colors of a plurality of pixel points in the target image into a pixel color set S;
selecting a center pixel color t from the set S of pixel colorsjJ is a positive integer, j is less than or equal to k, and k is the number of the colors of the central pixel;
determining the set S of pixel colors and the center pixel color tjIf the second pixel color S in the pixel color set SiWith said central pixel color tjThe shortest distance between them, the second pixel color s is definediAdding to the center pixel color tjBelonging cluster C to be processedjI is a positive integer, i is less than or equal to m, m is greater than k, and m is the number of pixel points in the target image;
according to the cluster C to be processedjThe included second pixel color, updating the center pixel color tjUp to the cluster C to be processedjMiddle updated center pixel color tjAnd the color t of the central pixel before updatingjWhen the same, the cluster C to be processed is treatedjThe average value of the second pixel colors contained in (a) is taken as the image template color.
Wherein the image template colors include: n template color hue parameters, N template color saturation parameters and N template color brightness parameters; n is a positive integer;
the determining of the background color image according to the image template color comprises:
if the difference values among the N template color hue parameters are all smaller than a first difference threshold value, the N template color saturation parameters are all larger than a saturation threshold value, and the difference values among the N template color brightness parameters are all smaller than a second difference threshold value, determining background ground color according to the N template color hue parameters, the N template color saturation parameters and the N template color brightness parameters;
and generating the background color image according to the background color.
Wherein, still include:
if the difference value between the hue parameters of the N template colors is not smaller than the first difference threshold value, or the saturation parameters of the N template colors are not larger than the saturation threshold value, or the difference value between the brightness parameters of the N template colors is not smaller than the second difference threshold value, obtaining a basic ground color;
and generating the ground color image according to the basic ground color.
Wherein, still include:
searching the color of the character icon corresponding to the theme color of the image in a character icon color mapping table;
after the step of adjusting the color attribute of the page theme control according to the theme color, the method further includes:
and adjusting the color attribute of the character and the color attribute of the icon corresponding to the application page according to the color of the character icon.
Wherein, still include:
displaying a plurality of pendant identifiers on the application page;
responding to the trigger operation aiming at the target pendant identification, acquiring a pendant image corresponding to the target pendant identification, and displaying the pendant image on the application page.
Wherein the obtaining of the theme color corresponding to the target theme color identifier includes:
acquiring an environment brightness parameter, and acquiring a first color corresponding to the environment brightness parameter;
acquiring a second color corresponding to the target theme color identification;
and combining the first color and the second color to obtain the theme color.
Wherein the obtaining of the second color corresponding to the target subject color identifier includes:
determining an identification index corresponding to the target subject color identification;
searching a red channel parameter, a green channel parameter, a blue channel parameter and a transparency channel parameter corresponding to the identification index in an index color mapping table;
combining the red channel parameter, the green channel parameter, the blue channel parameter, and the transparency channel parameter into the second color.
Wherein the obtaining of the theme color corresponding to the target theme color identifier includes:
when the target subject color identifier is a custom color identifier, displaying a plurality of hue parameters, a plurality of saturation parameters and a plurality of brightness parameters;
and responding to trigger operation aiming at the target hue parameter, the target saturation parameter and the target brightness parameter, and combining the target hue parameter, the target saturation parameter and the target brightness parameter into the theme color.
Another aspect of the embodiments of the present application provides a page processing apparatus, including:
the identification display module is used for displaying at least one theme color identification in the application page;
the response module is used for responding to the trigger operation aiming at the target theme color identification;
the parameter acquisition module is used for acquiring the theme color corresponding to the target theme color identification; the target subject color identification belongs to the at least one subject color identification;
the control acquiring module is used for acquiring a page theme control corresponding to the application page;
and the adjusting module is used for adjusting the color attribute of the page theme control according to the theme color.
Wherein, the control acquisition module includes:
the identification display unit is used for displaying at least one page control identification corresponding to the application page;
and the selecting unit is used for responding to the selection operation aiming at the at least one page control identification and taking the page control corresponding to the selected page control identification as the page theme control.
Wherein, the identification display module comprises:
an image acquisition unit for acquiring a target image;
a color determination unit for determining an image subject color of the target image;
the identification obtaining unit is used for obtaining the at least one theme color identification matched with the theme color of the image;
a setting unit, configured to set the target image as a background image of the application page;
and the display unit is used for displaying the at least one theme color identifier in an application page with a background image.
Wherein the color determination unit includes:
the first obtaining subunit is used for obtaining first pixel colors of a plurality of pixel points in the target image; the first pixel color comprises a pixel primary color and a pixel transparency;
a combination subunit, configured to combine the average value of the plurality of pixel primary colors and the average value of the plurality of pixel transparencies into the image subject color.
Wherein, the identification acquisition unit includes:
a first determining subunit, configured to determine a color distance between the image theme color and an application theme color in the application theme color set;
the second determining subunit is used for taking the application theme color with the color distance smaller than the distance threshold as the theme color to be recommended;
the second determining subunit is further configured to obtain a color identifier of the color of the to-be-recommended subject, and use the color identifier as the subject color identifier.
Wherein, the setting unit includes:
the setting subunit is used for setting the transparency of the target image to obtain an image to be merged;
the extraction subunit is used for extracting the image template color of the target image;
the third determining subunit is used for determining a background color image according to the color of the image template;
the merging subunit is used for merging the background color image and the image to be merged into a background image of the application page; the image size of the ground color image is the same as the image size of the target image.
Wherein the setting subunit includes:
the second acquisition subunit is used for acquiring an image transparency parameter and an image fuzziness parameter which are associated with the target image;
the adjusting subunit is configured to adjust the transparency attribute of the target image according to the image transparency parameter, and adjust the blur attribute of the target image according to the image blur parameter;
and the adjusting subunit is further configured to take the target image with the transparency attribute and the blurriness attribute adjusted as the image to be merged.
Wherein the extraction subunit includes:
the selecting subunit is used for combining second pixel colors of a plurality of pixel points in the target image into a pixel color set S;
the selection subunit is further configured to select a center pixel color t from the pixel color set SjJ is a positive integer, j is less than or equal to k, and k is the number of the colors of the central pixel;
the selection subunitAnd is further configured to determine the pixel color set S and the center pixel color tjIf the second pixel color S in the pixel color set SiWith said central pixel color tjThe shortest distance between them, the second pixel color s is definediAdding to the center pixel color tjBelonging cluster C to be processedjI is a positive integer, i is less than or equal to m, m is greater than k, and m is the number of pixel points in the target image;
an update subunit, configured to update the cluster C to be processed according to the cluster C to be processedjThe included second pixel color, updating the center pixel color tjUp to the cluster C to be processedjMiddle updated center pixel color tjAnd the color t of the central pixel before updatingjWhen the same, the cluster C to be processed is treatedjThe average value of the second pixel colors contained in (a) is taken as the image template color.
Wherein the image template colors include: n template color hue parameters, N template color saturation parameters and N template color brightness parameters; n is a positive integer;
the third determining subunit includes:
a detecting subunit, configured to determine a background ground color according to the N template color hue parameters, the N template color saturation parameters, and the N template color brightness parameters if the differences between the N template color hue parameters are all smaller than a first difference threshold, the N template color saturation parameters are all larger than a saturation threshold, and the differences between the N template color brightness parameters are all smaller than a second difference threshold;
and the generating subunit is used for generating the background color image according to the background color.
Wherein, still include:
a detection module, configured to obtain a basic background color if a difference between the N template color hue parameters is not less than the first difference threshold, or the N template color saturation parameters are not greater than the saturation threshold, or a difference between the N template color brightness parameters is not less than the second difference threshold;
the detection module is further configured to generate the ground color image according to the basic ground color.
Wherein, still include:
the searching module is used for searching the character icon color corresponding to the image theme color in a character icon color mapping table;
the apparatus further comprises:
and the setting module is used for adjusting the color attribute of the character and the color attribute of the icon corresponding to the application page according to the color of the character icon.
Wherein, still include:
the pendant display module is used for displaying a plurality of pendant identifications on the application page;
the pendant display module is further configured to respond to a trigger operation for a target pendant identifier, acquire a pendant image corresponding to the target pendant identifier, and display the pendant image on the application page.
Wherein, the parameter acquisition module includes:
the first merging unit is used for acquiring an environment brightness parameter and acquiring a first color corresponding to the environment brightness parameter;
the parameter acquisition unit is also used for acquiring a second color corresponding to the target theme color identifier;
the first merging unit is further configured to merge the first color and the second color to obtain the theme color.
Wherein, the parameter acquisition unit includes:
the index determining subunit is used for determining an identification index corresponding to the target theme color identification;
the searching subunit is used for searching a red channel parameter, a green channel parameter, a blue channel parameter and a transparency channel parameter corresponding to the identification index in an index color mapping table;
the searching subunit is further configured to combine the red channel parameter, the green channel parameter, the blue channel parameter, and the transparency channel parameter into the second color.
Wherein, the parameter acquisition module includes:
the parameter display unit is used for displaying a plurality of hue parameters, a plurality of saturation parameters and a plurality of brightness parameters when the target subject color identifier is a user-defined color identifier;
and the second merging unit is used for responding to the triggering operation aiming at the target hue parameter, the target saturation parameter and the target brightness parameter and combining the target hue parameter, the target saturation parameter and the target brightness parameter into the theme color.
Another aspect of the embodiments of the present application provides an electronic device, including: a processor and a memory;
the processor is connected with the memory, wherein the memory is used for storing a computer program, and the processor is used for calling the computer program to execute the method in one aspect of the embodiment of the application.
Another aspect of the embodiments of the present application provides a computer storage medium storing a computer program, the computer program comprising program instructions that, when executed by a processor, perform a method as in one aspect of the embodiments of the present application.
According to the method and the device for the theme color identification, the plurality of theme color identifications are displayed on the current page, the user selects any theme color identification from the plurality of theme color identifications, the theme color corresponding to the theme color identification selected by the user is obtained, the page control corresponding to the application page is determined, and the color attribute of the page control is adjusted according to the theme color. Compared with downloading the theme resources and replacing the theme data in the current page, the method and the device have the advantages that the color attribute of the control is directly changed, processes of downloading the theme data, replacing the theme data and the like are not required to be executed, the switching process is simple, the time consumption of theme switching can be reduced, and the switching efficiency is improved; furthermore, in the scheme for replacing the theme data, each theme data is created and generated again by the developer, and the developer does not need to create new theme data for many times, so that the theme development time can be saved, and the software development efficiency can be improved.
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 system architecture diagram of a page processing provided by an embodiment of the present application;
2 a-2 d are schematic views of a page processing scenario provided by an embodiment of the present application;
fig. 3 is a schematic flowchart of a page processing method according to an embodiment of the present application;
4 a-4 d are schematic diagrams of a page theme control provided by an embodiment of the present application;
5 a-5 d are schematic diagrams of a custom page theme control provided by an embodiment of the present application;
6 a-6 c are schematic diagrams of a custom theme color provided by an embodiment of the present application;
FIG. 7 is a schematic view of a pendant display provided in embodiments of the present application;
FIG. 8 is a schematic diagram illustrating a subject color identification provided by an embodiment of the present application;
FIG. 9 is a schematic flow chart for determining a color identification of a subject according to an embodiment of the present application;
10 a-10 f are schematic diagrams of determining a background image according to an embodiment of the present disclosure;
FIGS. 11 a-11 d are schematic diagrams of another background image determination provided by an embodiment of the present application;
12 a-12 h are schematic diagrams of a setting background image provided by an embodiment of the present application;
FIG. 13 is a diagram illustrating a color mapping table for a character icon according to an embodiment of the present disclosure;
FIG. 14a is a schematic diagram illustrating a method for determining a color of a character icon according to an embodiment of the present disclosure;
FIG. 14b is a schematic diagram of another example of determining the color of a character icon provided in the present application;
fig. 15 is a schematic structural diagram of a page processing apparatus according to an embodiment of the present application;
fig. 16 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
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.
Fig. 1 is a system architecture diagram of page processing according to an embodiment of the present application. The application relates to a background server 10d and a terminal device cluster, and the terminal device cluster may include: terminal device 10a, terminal device 10 b.
Taking the terminal device 10a as an example, the terminal device 10a displays a plurality of theme color identifiers on the current page, and after the user clicks any theme color identifier, the terminal device 10a sends the theme color identifier selected by the user to the background server 10 d. The background server 10d searches for the theme color corresponding to the theme color identifier selected by the user, and searches for the control identifier of the page theme control corresponding to the current page. The background server 10d issues the searched theme color and control identifier to the terminal device 10 a. The terminal device 10a identifies the color attribute of the corresponding page theme control according to the theme color modification control.
The determination of the page theme control and the search for the theme color identified by the theme color selected by the user can also be completed by the terminal device.
The terminal device 10a, the terminal device 10b,. the terminal device 10c, etc. shown in fig. 1 may include a mobile phone, a tablet computer, a notebook computer, a palm computer, a Mobile Internet Device (MID), a wearable device (e.g., a smart watch, a smart band, etc.), etc.
2 a-2 d below are specifically described by taking an example of how the terminal device determines the page theme control and finds the theme color identified by the theme color selected by the user.
Please refer to fig. 2 a-2 d, which are schematic views of a page processing scenario provided in an embodiment of the present application. As shown in fig. 2a, the current display page of the instant messaging APP is a message list page, and a topic selection identifier 20a is displayed in the message list page.
The user clicks the theme selection indicator 20a, as shown in fig. 2b, the terminal device jumps from the message list page to the selection page, and displays a plurality of theme color indicators on the selection page, as can be seen from fig. 2b, the plurality of theme color indicators include: a theme red logo 20b, a theme blue logo 20c, and a theme cyan logo 20 d.
The user clicks on the theme red indicator 20b, i.e., the user selects red as the theme color. The terminal device finds that the theme color corresponding to the theme red mark 20b is: (255,0,0), visually, the theme color is a positive red.
As shown in fig. 2c-2d, the terminal device searches for the page control associated with the topic in the instant messaging APP, and the searching for the page control associated with the topic includes: a title bar 20e, an icon 20f, and a message text box 20 g; and the title bar 20e and the icon 20f belong to the message list page corresponding to fig. 2c, and the message text box 20g belongs to the conversation page corresponding to fig. 2 d.
As shown in fig. 2c, the terminal device jumps back to the message list page from the selection page, and during rendering the message list page, the terminal device sets the attribute value of the color attribute of the title bar 20e in the message list page to (255,0,0), and visually adjusts the color of the title bar 20e to be positive red; similarly, the terminal device sets the attribute value of the color attribute of the icon 20f to (255,0,0), i.e., adjusts the color of the icon 20f to positive red from the visual point of view. Thus, the title bar 20e and the icon 20f of the message list page shown in fig. 2c are in a positive red color.
As can be seen from fig. 2a, the color of the icon 20f before adjustment is black, and the color of the icon 20f after adjustment is positive red.
As shown in fig. 2c, if the user selects to have a conversation with the friend "queen", the terminal device jumps from the message list page corresponding to fig. 2c to the conversation page of the friend "queen" corresponding to fig. 2d, and since the message text box 20g is also a page control associated with the theme, when rendering the conversation page, the terminal device sets the attribute value of the color attribute of the message text box 20g to (255,0,0), and visually adjusts the color of the message text box 20g to be positive red. Thus, the message text box 20g of the conversation page displayed in FIG. 2d is colored a positive red.
The specific processes of finding the theme color (such as the theme color (255,0,0) in the embodiment corresponding to fig. 2a to fig. 2 d), and determining the page theme control (such as the title bar 20e, the icon 20f, and the message text box 20g in the embodiment corresponding to fig. 2a to fig. 2 d) can be referred to the embodiment corresponding to fig. 3 to fig. 14b described below.
Please refer to fig. 3, which is a flowchart illustrating a page processing method according to an embodiment of the present application, and as shown in fig. 3, the method may include:
step S101, at least one theme color identifier is displayed in an application page.
Specifically, the terminal device refers to all pages governed by the APP where the currently displayed page is located (e.g., the instant messaging APP in the embodiment corresponding to fig. 2a to fig. 2 d) as application pages (e.g., the message list page corresponding to fig. 2a, the selection page corresponding to fig. 2b, and the session page corresponding to fig. 2 d). The application pages may include a selection page related to topic switching (e.g., the selection page corresponding to fig. 2 b) and a content page related to app content (e.g., the message list page corresponding to fig. 2a, the session page corresponding to fig. 2 d).
The terminal device obtains a plurality of preset theme color identifiers (such as the theme red identifier 20b, the theme blue identifier 20c, and the theme cyan identifier 20d in the embodiments corresponding to fig. 2a to fig. 2 d), and displays the plurality of theme color identifiers in a selection page in an application page.
The theme color identification is a page identification with a page theme color switching function, the page theme color switching function is to adjust the color of a page control associated with a theme in an application page, and the color corresponding to the theme color identification is the color to be switched of a page theme.
For example, the color corresponding to the theme color identification is positive red, and the function of the theme color identification is to adjust the color of the page control associated with the theme in the application page to positive red.
The subject color mark can be a figure filled with color, a character and the like.
Step S102, responding to a trigger operation aiming at a target theme color identifier, and acquiring a theme color corresponding to the target theme color identifier; the target subject color identification belongs to the at least one subject color identification.
Specifically, the user selects the theme color identifier from the plurality of theme color identifiers at will, and the terminal device responds to the selection operation of the user and takes the theme color identifier selected by the user as the target theme color identifier.
When the target subject color identification belongs to the system color identification, the terminal device determines an identification index corresponding to the target subject color identification, and looks up a color corresponding to the identification index in the index color mapping table, referred to as a subject color (e.g., subject color (255,0,0) in the corresponding embodiments of fig. 2 a-2 d described above), which may include R, G, B, A4 channel component parameters belonging to an RGBA (Red Green Blue Alpha) color space.
The system color identification is a color identification which is corresponding to the color channel component parameters, a user-defined color identification is corresponding to the system color identification, the user-defined color identification is that the hue, the saturation and the brightness are respectively set by a user, and then the parameters set by the user are combined into a theme color, wherein the hue, the saturation and the brightness are basic three elements of the color.
Wherein, the RGBA color space is a color model which is added with transparency information on the basis of the RGB color space; the RGB color space is based on three basic colors of R (Red), G (Green) and B (Blue) and is superposed to different degrees to generate a color model of abundant and wide colors.
The specific process of determining the subject color may be: in the index color mapping table, a parameter on the red channel (referred to as a red channel parameter), a parameter on the green channel (referred to as a green channel parameter), a parameter on the blue channel (referred to as a blue channel parameter), and a parameter on the transparency channel (referred to as a transparency channel parameter) corresponding to the identification index are found.
And the terminal equipment combines the searched red channel parameter, green channel parameter, blue channel parameter and transparency channel parameter into a subject color, wherein the subject color belongs to an RGBA color space.
The above process of determining the theme color based on the target theme color identification may be performed by a color profile manager. The specific strategy is that an index color mapping table is maintained in the color manager, and when a user selects a certain theme color identifier, the color manager records the corresponding identifier index. And simultaneously, providing an interface in the color manager, wherein the interface has the function of searching the color of the currently selected identification index in the index color mapping table, and externally calling the interface to acquire the corresponding color.
Optionally, the above is to find the channel component parameter in the RGBA color space corresponding to the identification index, so that the obtained subject color belongs to the RGBA color space. Or in the index color mapping table, 3-channel component parameters in the HSL color space corresponding to the identification index, or 3-channel component parameters in the RGB color space, or 3-channel component parameters in the YCbCr color space may be searched, so that the obtained theme color belongs to the HSL color space, or the RGB color space, or the YCbCr color space.
The HSL color space is a color standard in the industry, and is a color model for obtaining various colors by changing three color channels of hue (H), saturation (S), and brightness (L) and superimposing them on each other.
The R, G, B, A4 channel component parameter corresponding to the target subject color identifier is directly used as the subject color, and the R, G, B, A4 channel component parameter corresponding to the target subject color identifier can be further harmonized based on the environment brightness parameter of the current environment where the terminal device is located, so as to obtain the subject color.
Briefly, the subject color is determined according to the color selected by the user and the brightness of the current environment, for example, the user selects a magenta subject color identifier, and the subject color is currently in a high brightness environment, so that the color corresponding to the determined subject color may be positive red.
The specific process of harmonizing the color corresponding to the target theme color identification based on the environment brightness parameter of the current environment where the terminal device is located is as follows: determining a brightness parameter (called an environment brightness parameter) of an environment where the current terminal device is located based on a light sensor of the terminal device, and acquiring a color corresponding to the environment brightness parameter as a first color, where the first color is also a 4-dimensional vector, and 4 components in the first parameter may be positive numbers or negative numbers.
The R, G, B, A4 channel component parameters corresponding to the target color identifier are obtained and combined into a second color (it can be known that the second color is the subject color in the foregoing description), and the first color and the second color are added to obtain a subject color, where the subject color also belongs to the RGBA color space.
It should be noted that the value range of the R, G, B component in the theme color is 0-255, the value range of the a component is 0-100, and if the value obtained by adding the first color and the second color exceeds the value range, the upper limit (or the lower limit) of the value range may be used as the theme color.
For example, the first color corresponding to the ambient brightness parameter is: (33, -33, -20,0), the second color corresponding to the target subject color identification being: (207,175,189,0) and the second color is pink from a visual perspective. Adding the first color "(33, -33, -20, 0)" and the second color "(207, 175,189, 0)" yields the subject color: (240,142,169,0) the theme color is positive red from a visual point of view.
And when the target subject color identifier is the custom color identifier, displaying a plurality of hue parameters, saturation parameters and brightness parameters in a selection page in the application page. It can be known that the Hue parameter, the Saturation parameter, and the luminance parameter are 3-channel component parameters belonging to an HSL (Hue), Saturation, and brightness) color space.
The displaying of the plurality of hue parameters, the saturation parameters and the brightness parameters can be performed by a scroll bar, and a user can perform a selection operation among the plurality of hue parameters, the plurality of saturation parameters and the plurality of brightness parameters only by sliding a scroll block in the scroll bar.
A user randomly selects a hue parameter from the hue parameters as a target hue parameter; arbitrarily selecting a saturation parameter from the plurality of saturation parameters as a target saturation parameter; a luminance parameter is arbitrarily selected from among a plurality of luminance parameters as a target luminance parameter. The terminal device may directly combine the target hue parameter, the target saturation parameter, and the target brightness parameter into the theme color.
Optionally, in order to be uniform with the RGBA color space in the foregoing, the terminal device may convert the 3 parameters into the RGB color space based on the formula (1) after obtaining the target hue parameter, the target saturation parameter, and the target brightness parameter:
wherein h, s, l in the formula (1) respectively correspond to a target hue parameter, a target saturation parameter and a target brightness parameter, ColorR,ColorG,ColorBRespectively an R channel component, a G channel component, and a B channel component. The terminal device sets 0% of the A channel component, i.e. completely opaque, and converts the above to a post-ColorR,ColorG,ColorBAnd the A channel component "0%" is combined into a theme color, which at this time belongs to the RGBA color space.
As can be seen from the above description, the same color may be mapped to R, G, B components of the RGB color space or H, L, S components of the HSL color space, and the colors of different color spaces may be transformed to each other.
Subsequently, the terminal device may further generate a theme color identifier according to the theme color determined by the user selection, so that the user can determine the theme color by directly selecting the theme color identifier next time without selecting the hue parameter, the saturation parameter, and the brightness parameter again.
When the target theme is that the color identification is the custom color identification, the hue, saturation and brightness are shown to the user instead of the red channel, the green channel and the blue channel because the hue, saturation and brightness are defined from the viewpoint of human vision and R, G, B is defined from the viewpoint of the wavelength of light, so that the hue, saturation and brightness can be shown to the user to directly visually feel the color corresponding to the selected three parameters.
Step S103, acquiring a page theme control corresponding to the application page, and adjusting the color attribute of the page theme control according to the theme color.
Specifically, the terminal device may search, as a page theme control, a page control associated with a theme in all page controls corresponding to the application page (e.g., the title bar 20e, the icon 20f, and the message text box 20g in the embodiments corresponding to fig. 2a to fig. 2 d).
Wherein, the page theme control can include: title bar, icon pressed state, default chat bubble, tab, check control, button, switch, text, page background, etc.
And modifying the color attribute of the page theme control according to the theme color, namely setting the attribute value of the color attribute of the page theme control as the theme color, so that the color of the modified page theme control is the same as the theme color.
It should be noted that, if the determined theme color does not belong to the RGBA color space, the terminal device further needs to convert the theme color to the RGBA color space through a conversion formula, because all the color-related parameters default to the RGBA color space when rendering the page.
Please refer to fig. 4a to 4d, which are schematic diagrams of a page theme control provided in an embodiment of the present application, and as shown in fig. 4a to 4d, the page theme control may include: a page title bar 30z, an icon 30a (the page shown in fig. 4a is the page corresponding to the icon 30a, so the icon 30a is currently in the icon-pressed state), a message text box 30b, a message text box 30c, a page label 30d, a pointing control 30e, a pointing control 30f, a button 30x, and a plurality of switches in a switch set 30 g. That is, after the theme color is determined, the attribute values of the color attributes of the page title bar 30z, the icon 30a, the message text box 30b, the message text box 30c, the page tab 30d, the check control 30e, the check control 30f, the button 30x, and the switches in the switch set 30g are all set to the theme color, so that the color of the page theme control is the same as the theme color.
Optionally, the page theme control is preset in advance by the terminal device, the user only needs to select the color, the color attribute of the page theme control can be directly adjusted based on the selection of the user, and the theme switching process can reduce the operation difficulty of the user.
The user can also select the page theme control by self-definition, the flexibility of theme setting is improved, and the specific process is as follows: and displaying a plurality of page control identifications, wherein each page control identification uniquely corresponds to a page control of one application page.
The page controls may be title bars, pressed states of icons, default chat bubbles, tabs, check controls, buttons, switches, text page backgrounds, and the like. The page control identification can be graph, text and the like.
And the terminal equipment takes the page control corresponding to the selected page control identification as a page theme control.
Please refer to fig. 5a to 5d, which are schematic diagrams of a custom page theme control provided in an embodiment of the present application, and as shown in fig. 5a, a page control may include: the title, icon, character and background show the page control identifiers of the 4 page controls in the selection page corresponding to fig. 5 a.
As shown in fig. 5b, when the user selects the "icon" page control identifier, the terminal device may use the "icon" page control corresponding to the "icon" page control identifier as the page theme control.
As shown in fig. 5c, the user selects the "cyan" subject color identifier as the target subject color identifier from the "red" subject color identifier, the "blue" subject color identifier, the "cyan" subject color identifier, and the "orange" subject color identifier, and determines that the subject color corresponding to the target subject color identifier "cyan" is: (224, 254, 225, 0%), the theme color "(224, 254, 225, 0%) is visually cyan.
As shown in fig. 5d, the terminal device sets the attribute values of the color attributes of the icons 30p, 30q, and 30s to (224, 254, 225, 0%), i.e., sets the colors of the icons 30p, 30q, and 30s to cyan.
Please refer to fig. 6 a-6 c, which are schematic diagrams illustrating a custom theme color according to an embodiment of the present application. As shown in fig. 6a, the custom color identifier 30h is shown in the selection page, and the user selects the custom color identifier 30h, so that the custom color identifier 30h is the instant target subject color identifier 30 h.
As shown in fig. 6b, a plurality of hue parameters are presented to the user by a hue scroll bar, a plurality of saturation parameters are presented to the user by a saturation scroll bar, and a plurality of brightness parameters are presented to the user by a brightness scroll bar. The user may select the target hue parameter, the target saturation parameter, and the target brightness parameter by sliding a scroll box on the scroll bar.
As shown in fig. 6c, the color attributes of the page theme control (the page theme control includes the page title bar 30k, the icon 30m) are adjusted according to the target hue parameter, the target saturation parameter and the target brightness parameter selected by the user. Subsequently, the terminal device determines that the color is purple according to the target hue parameter, the target saturation parameter and the target brightness parameter, and the terminal device can generate a theme color identifier 30n 'purple' related to the purple so as to facilitate next display.
Optionally, a plurality of pendant identifiers are displayed on the application page, and each pendant identifier uniquely corresponds to one pendant image. The user can randomly select the pendant identifier from the plurality of pendant identifiers, and the terminal device responds to the selection operation of the user and takes the pendant identifier selected by the user as the target pendant identifier. The terminal equipment acquires a pendant image corresponding to the target pendant identifier, displays the pendant image on an application page to dress the application page, wherein the pendant image can be displayed on the top or the bottom of the application page, and can be a static image or a dynamic image. The user can adjust the transparency of the pendant image, and the shielding of the application page when the pendant image is placed on the top layer of the application page is avoided.
Referring to fig. 7, which is a schematic diagram of a pendant display provided in an embodiment of the present application, as shown in fig. 7, after a user selects a target pendant identifier, a terminal device obtains a pendant image 70a corresponding to the target pendant identifier, and the terminal device displays the pendant image 70a on an application page.
Please refer to fig. 8, which is a schematic diagram illustrating a color identifier of a display theme according to an embodiment of the present application, where the color identifier of the display theme includes the following steps S201 to S204, and the steps S201 to S204 are specific embodiments of the step S101 in the embodiment corresponding to fig. 3:
step S201, acquiring a target image, and determining the image theme color of the target image.
Specifically, the page theme can be replaced by modifying the color attribute of the page theme control, and the background image of the application page can also be replaced.
And acquiring an image selected by a user as a target image, wherein the terminal equipment can directly set the target image as a background image of the application page.
It should be noted that the application page may include a selection page related to theme switching and a content page related to app content, and when setting a background image of the application page based on the target image, if a content page is to be set currently, the background image of the entire content page is set as the target image; if the selected page is to be set currently, setting a background image of a preset area in the selected page as a target image, wherein the preset area is an area containing a content window, and the content in the content window is the same as the content in the content page, which can be understood as that the content window is a mini content page contained in the selected page.
For example, fig. 2a corresponds to a content page, fig. 2b corresponds to a selection page, and a content window (which may be understood as a mini content page) is included in the selection page corresponding to fig. 2b, and the content in the content window is the same as that of the content page corresponding to fig. 2 a.
The plurality of subject color indicators presented to the user may be color indicators of colors similar to the color style of the target image, on the basis of the background image.
The terminal device extracts an image subject color of the target image, the image subject color being an average tone of the target image. The specific process for determining the theme color of the image is as follows: the color of each pixel point in the RGBA color space (referred to as a first color space) in the target image is obtained as a first pixel color, and it can be known from the foregoing analysis that the first pixel color may include R, G, B, A4 channel component parameters, R, G, B components may be referred to as pixel primary colors, and a components are referred to as pixel transparency, that is, each first pixel color includes a pixel primary color and a pixel transparency. The terminal device calculates an average value of all pixel primary colors, calculates an average value of all pixel transparencies, and combines the average value of the pixel primary colors and the average value of the pixel transparencies into an image subject color. Wherein the average value of the pixel primaries comprises: the average value of the R component of all pixels, the average value of the G component of all pixels, and the average value of the B component of all pixels.
Step S202, obtaining the at least one subject color identification matched with the subject color of the image.
Specifically, the terminal device selects a color identifier of a color similar to the image theme color from the application theme color set as the theme color identifier.
Please refer to fig. 9, which is a schematic flowchart of a process for determining a color identifier of a theme according to an embodiment of the present application, where the process for determining the color identifier of the theme includes the following steps:
in step S2021, the target image selected by the user is acquired.
Step S2022, determine the mean values of the red channel, the green channel, the blue channel, and the transparency channel of all the pixel points of the target image.
Specifically, the terminal device combines the average values of the red channel, the green channel, the blue channel and the transparency channel of all the pixel points of the target image into the image theme color.
Step S2023, determining subject color identification according to the red channel, green channel, blue channel and transparency channel mean values of all pixel points of the target image.
Specifically, the terminal device obtains an application theme color set, and the terminal device calculates a distance (referred to as a color distance) between each application theme color and an image theme color in the application theme color set. Each application theme color may be expressed as a 4-channel component parameter corresponding to the RGBA color space, and a distance between the application theme color and the image theme color, which is a difference between an R component in the application theme color and an R component in the image theme color + a difference between a G component in the application theme color and a G component in the image theme color + a difference between a B component in the application theme color and a B component in the image theme color + a difference between an a component in the application theme color and an a component in the image theme color.
And the terminal equipment takes the application theme color corresponding to the color distance smaller than the distance threshold value as the theme color to be recommended from the plurality of color distances. And acquiring a color identifier of the color of the subject to be recommended, and taking the color identifier of the color of the subject to be recommended as the color identifier of the subject, wherein the color identifier of the subject is a color identifier of a color similar to the color style of the target image.
In step S2025, the color manager records that a mapping relationship between the theme color identification and the identification index is established for each theme color identification.
Step S203, setting the target image as a background image of the application page.
Specifically, the terminal device may directly set the target image as a background image of the application page.
It should be noted that the setting of the background image and the determination of the theme color identifier by the terminal device may be completed in parallel, the execution sequence is not limited, and as long as the target image is obtained, the terminal device may immediately use the target image as the background image of the application page, and at the same time, use the color identifier of the color similar to the image theme color of the target image as the theme color identifier.
The terminal equipment can also adjust the transparency attribute of the target image to obtain the image to be merged. Detecting the number of colors contained in the target image, and if the number of colors is more than one, the terminal device extracts the image template colors of the target image, wherein the image template colors are a plurality of main colors contained in the target image, the image subject color in the image is one color, and the image template colors contain a plurality of colors.
Determining the image template color may be based on a K-Means algorithm, an octree algorithm, or the like. The following is a detailed description of determining the image template color of a target image based on the K-Means algorithm: the terminal device obtains a color (referred to as a second pixel color) of each pixel point in a color space (where the color space may be an RGB color space, an HSL color space, or an RGBA color space, and certainly, if the color space is the RGBA color space, a second pixel color is equal to the first pixel color) of the target image, and combines the obtained second pixel color of each pixel point into a pixel color set S. Arbitrarily selecting k second pixel colors from the set S of pixel colors as a center pixel color tjJ is a positive integer, and j is less than or equal to k, k being the number of center pixel colors.
And (3) first circulation: calculating the distance between each second pixel color in the pixel color set S and any central pixel color if the second pixel colorsiAnd the center pixel color tjThe shortest distance between them, the second pixel color siAdded to the central pixel color tjBelonging cluster C to be processedj. i is a positive integer, i is less than or equal to m, m is greater than k, m is the number of pixel points in the target image, and m is the number of second pixel colors in the pixel color set S. And each second pixel color performs the above process, namely, each second pixel color is divided into the corresponding cluster to be processed. At each cluster C to be processedjIn the method, the second pixel color at the center is used as the new center pixel color tjAgain, k new center pixel colors are obtained.
And (3) second circulation: and calculating the distance between each second pixel color and the new central pixel color again, dividing each second pixel color into the cluster to be processed to which the central pixel color closest to the second pixel color belongs according to the distance, and updating the central pixel color again.
Continuously circulating when any one cluster C to be processedjMiddle updated center pixel color tjAnd the color t of the central pixel before updatingjWhen the number of the auxiliary colors included in the image template color is equal to the number of the central pixel colors, the average value of the second pixel colors included in each cluster to be processed is used as the auxiliary color, and all the auxiliary colors are combined into the image template color.
When the second pixel color is a color belonging to the HSL color space, the image template colors may include: n hue parameters (called template color hue parameters), N saturation parameters (called template color saturation parameters), and N brightness parameters (called template color brightness parameters), where N is the number of clusters to be processed in the foregoing description.
And when the color of the second pixel is not the color belonging to the HSL color space, after k-means clustering, taking the average value of the cluster to be processed as the color to be adjusted. Converting the color to be adjusted in the non-HSL color space into an image template color belonging to the HSL color space by using a color space conversion formula, where the obtained image template color may include: n template color hue parameters, N template color saturation parameters and N template color brightness parameters.
Calculating the difference value between N template color hue parameters, calculating the difference value between N template color brightness parameters, if the difference values between the N template color hue parameters are all smaller than a first difference threshold value, and N template color saturation parameters are all larger than a saturation threshold value, and the difference values between the N template color brightness parameters are all smaller than a second difference threshold value, taking the average value of the N template color hue parameters as an average hue parameter, taking the average value of the N template color saturation parameters as an average saturation parameter, and taking the average value of the N template color brightness parameters as an average brightness parameter. And combining the average hue parameter, the average saturation parameter and the average brightness parameter into a background color.
And the terminal equipment generates a background color image according to the background color, wherein the filling color of the background color image is the background color, and the size of the background color image is the same as that of the target image.
If there is a first difference greater than or equal to a first difference threshold in the differences between the N template color hue parameters (each referred to as a first difference), or there is a color saturation parameter greater than or equal to a saturation threshold in the N template color saturation parameters, or there is a second difference greater than or equal to a second difference threshold in the differences between the N template color brightness parameters (each referred to as a second difference), the terminal device acquires a base undertone, which may be black (which may be represented as (0,0,0) in the RGB color space) or white (which may be represented as (255,255,255) in the RGB color space) or gray (which may be represented as (192,192,192) in the RGB color space). And generating a background color image according to the basic background color, wherein the filling color of the background color image is the basic background color, and the size of the background color image is the same as that of the target image.
Alternatively, if the number of colors included in the target image is one, that is, the target image is a pure color image, the terminal device acquires a basic background color, which may be black (the black may be represented as (0,0,0) in the RGB color space) or white (the white may be represented as (255,255,255) in the RGB color space) or gray (the gray may be represented as (192,192,192) in the RGB color space). And generating a base color image according to the base color, wherein the filling color of the base color image is the base color, and the size of the base color image is the same as that of the target image.
And the terminal equipment merges the image to be merged and the ground color image after the transparency is adjusted, namely, the image to be merged is covered on the ground color image, and the image obtained after covering is set as the background image of the application page.
And for pictures with close hue, high saturation and close brightness, the ground color image can be optimized according to the color of the image template, and the color purity effect of the target image is reserved.
The visual effect of the background image determined by the background color image of different colors is illustrated below in two examples:
please refer to fig. 10a to fig. 10f, which are schematic diagrams illustrating determining a background image according to an embodiment of the present application. As shown in fig. 10a, the image 50a is a target image, and the transparency of the target image 50a is adjusted to obtain an image to be merged 50b (as shown in fig. 10 b).
As shown in fig. 10c, the image 50c is a ground color image 50c generated by "black" as the basic ground color, and if the image 50b to be merged is overlaid on the ground color image 50c, the color appears dirty and the viewing angle effect is poor.
As shown in fig. 10d, the image 50d is an under-color image 50d generated by "white" of the base under color, and if the image to be merged 50b is overlaid on the under-color image 50d, although the color is not "dirty", the readability of the white control in the interface is reduced.
In summary, no matter whether black or white is used to generate the background image, the combined image has a less than ideal visual effect.
Therefore, the background color needs to be determined by the image template color of the image 50a, and the background color image is generated. As can be seen from fig. 10a, the image 50a includes 2 image template colors, which are respectively an image template color 1 and an image template color 2, and a difference between a hue parameter of the image template color 1 and a hue parameter of the image template color 2 is smaller than a first difference threshold, and both a saturation parameter of the image template color 1 and a saturation parameter of the image template color 2 are larger than the saturation threshold, and a difference between a brightness parameter of the image template color 1 and a brightness parameter of the image template color 2 is smaller than a second difference threshold, so that an average color of the image template color 1 and the image template color 2 is used as a background color, and a background image 50e is generated according to the background color (as shown in fig. 10 e).
The image to be merged 50b is overlaid on the ground color image 50e, and as shown in fig. 10f, an image 50f may be generated, and the image 50f is set as a background image of the application page.
Please refer to fig. 11a to fig. 11d, which are schematic diagrams of another background image determination method according to an embodiment of the present application. As shown in fig. 11a, the image 60a is a target image, and the transparency of the target image 60a is adjusted to obtain an image 60b to be merged (as shown in fig. 11 b).
As can be seen from fig. 11a, the image 60a contains 2 image template colors, namely an image template color 1 and an image template color 2, and the difference between the hue parameter of the image template color 1 and the hue parameter of the image template color 2 is greater than the first difference threshold, so that the ground color image 60c can be generated from the base ground color "black".
As shown in fig. 11c, the image to be merged 60b is overlaid on the ground color image 60c, and as shown in fig. 11d, an image 60d may be generated, with the image 60d set as a background image of the application page.
After the terminal device determines the target image, the transparency of the target image is set according to the preset transparency parameter, so as to obtain the image to be merged.
The user can also self-define and adjust the transparency and the fuzziness of the target image to obtain the image to be merged. The specific process is as follows: the terminal equipment receives a transparency parameter and a fuzziness parameter input by a user, wherein the transparency parameter is used for adjusting the transparency attribute of the target image, and the fuzziness parameter is used for adjusting the fuzziness parameter attribute of the target image.
The terminal equipment sets the transparency parameter of the attribute value of the transparency attribute of the target image and sets the attribute value of the fuzziness attribute of the target image as the fuzziness parameter, and the terminal equipment takes the target image with the transparency attribute and the fuzziness attribute as an image to be merged. And subsequently, determining a background color image based on the color of the image template, and combining the background color image and the image to be combined into a background image of the application page.
It can be known that the higher the transparency of the image to be merged is, the more transparent the content in the target image is, i.e. the stronger the bottom color image is perceived by the user; the higher the blur degree of the image to be merged is, the more blurred the content in the target image is, and the less detailed the content is. The user can make the page content (including text, images, various page controls, etc.) on the application page more prominent by adjusting the transparency and the ambiguity of the target image.
Please refer to fig. 12a to fig. 12h, which are schematic diagrams illustrating a background image according to an embodiment of the present disclosure. As shown in fig. 12a, the user may click on the "replace background picture" flag on the selection page in the application page to replace the background image of the application page. As shown in fig. 12b, the terminal device displays multiple pictures, where the multiple pictures may be pictures in a local file of the terminal device, or pictures taken by the user instantly.
The user selects a target image from a plurality of pictures, and as can be seen from fig. 12b, the target image selected by the user is an image whose image content is a five-pointed star and whose background is white.
For simplicity of explanation, the ground color image is generated from the base ground color "gray", as shown in fig. 12c, the ground color image 40a is generated from the base ground color "gray", and the target image 40b is overlaid on the ground color image 40 a. As shown in fig. 12d, an image 40c may be obtained after the overlay. The image 40c is taken as the background image of the application page, and as shown in fig. 12e, the image 40c is taken as the background image of the content window 40d in the selected page.
The user may adjust the transparency of the target image 40b by sliding the scroll thumb of the transparency scroll bar across the selected page, as shown in fig. 12e, to increase the transparency of the target image 40 b. As shown in fig. 12f, the image 40e is the image with the increased transparency of the target image 40b, i.e. the image to be merged 40e, and as can be seen from fig. 12f, the five-pointed star in the image to be merged 40e is more transparent than the five-pointed star in the target image 40b, whether the line or the contour.
The terminal device overlays the image to be merged 40e on the ground color image 40 a. As shown in fig. 12g, an image 40g can be obtained after the overlay. The image 40g is taken as the background image of the application page, and as shown in fig. 12h, the image 40g is taken as the background image of the content window 40h in the selected page.
Step S204, the at least one theme color identifier is displayed in an application page with the target image as a background image.
Specifically, the terminal device displays a plurality of theme color identifiers in a selection page having a background image (the background image may be a target image, or an image obtained by combining the target image and a background image).
Optionally, human eyes perceive saturation and brightness differently for different hues. For example, high saturation yellow and white, both of which are perceived by the human eye as bright, not strongly contrasted, but high saturation red and white, which are perceived by the human eye as sharp contrasts. And the yellow and black with high saturation can obviously sense the contrast of the color by human eyes, and the red and black with high saturation can reduce the contrast sensed by human eyes. Therefore, for target images with different color hues, saturation and brightness, proper character colors and icon colors need to be adjusted to enhance the contrast between the background image and the characters and icons and ensure the readability of the interface.
The specific process is as follows: determining the image subject color of the target image, wherein the specific process of determining the image subject color can be referred to the above step S201, and will not be described in detail here.
The image subject color in the foregoing is a color of the RGBA color space, and thus the image subject color belonging to the RGBA color space can be converted into a color belonging to the HSL color space according to the following formula (2):
wherein R, G, B are R channel component, G channel component and B channel component in the image subject color, respectively; max, min are the maximum and minimum of r, g, b, respectively; h, L, S are a hue component (H), a luminance component (L), and a saturation component (S) belonging to the HSL color space.
And the terminal equipment combines the converted h, l and s belonging to the HSL color space into the color to be searched.
As can be seen from equations (1) and (2), colors belonging to the RGB color space and colors belonging to the HSL color space may be converted into each other.
The terminal device searches for a character icon color corresponding to the color to be searched in the character icon color mapping table, where the character icon color may include: white (which may be expressed as (255,255,255, 0%)), black (which may be expressed as (0,0,0, 0%)), etc. And adjusting the color attribute of the characters contained in the application page and the color attribute of the icons contained in the application page according to the colors of the character icons, so that the colors of the adjusted characters and icons are the same as the colors of the character icons.
For example, when a yellow image with high saturation is uploaded by the user as the background image, the icon color and the character color may recommend black by default, that is, the character icon color is black. When the user uploads a green color with high saturation but low brightness, the icon color and the character color may default to the recommended white color, i.e., the character icon color is white.
Please refer to fig. 13, which is a schematic diagram of a color mapping table for a character icon provided in the embodiment of the present application, where fig. 13 includes 7 color blocks, each color block corresponds to 1 color phase, a middle line of each color block is taken as a reference line, the reference line is upward, and the saturation is continuously reduced; with the baseline down, the brightness is decreasing.
A curve 40k in fig. 13 is a color dividing line 40k, and if the color to be searched after the color conversion of the image subject is located below the color dividing line 40k, the color of the character icon corresponding to the color to be searched is white; if the color to be searched after the color conversion of the image subject is located above the color dividing line 40k or on the color dividing line, the color of the character icon corresponding to the color to be searched is black.
Please refer to fig. 14a, which is a schematic diagram of determining colors of character icons according to an embodiment of the present application, as shown in fig. 14a, a target image is used as a background image of an application page, as can be seen from fig. 14a, the color of the target image is yellow with low saturation, and by looking up a character icon color mapping table (see fig. 13 for the character icon color mapping table), it can be determined that the color of the character icon corresponding to yellow with low saturation is black, so that the characters in the application page in fig. 14a and icons (the icons include a "message" icon, a "contact" icon, and a "dynamic" icon) are set to be black.
Please refer to fig. 14b, which is another schematic diagram for determining the color of the character icon provided in the embodiment of the present application, as shown in fig. 14b, the target image is used as a background image of the application page, as can be seen from fig. 14b, the color of the target image is blue with low brightness, and by looking up the character icon color mapping table (see fig. 13 for the character icon color mapping table), it can be determined that the color of the character icon corresponding to the blue with low brightness is white, so that the characters in the application page in fig. 14b and the icons (the icons include a "message" icon, a "contact" icon, and a "dynamic" icon) are set to be white.
Compared with downloading the theme resources and replacing the theme data in the current page, the method and the device have the advantages that the color attribute of the control is directly changed, processes of downloading the theme data, replacing the theme data and the like are not required to be executed, the switching process is simple, the time consumption of theme switching can be reduced, and the switching efficiency is improved; furthermore, in the scheme for replacing the theme data, each theme data is created and generated again by the developer, and the developer does not need to create new theme data for many times, so that the theme development time can be saved, and the software development efficiency can be improved.
Further, please refer to fig. 15, which is a schematic structural diagram of a page processing apparatus according to an embodiment of the present application. As shown in fig. 15, the page processing apparatus 1 may be applied to the terminal device in the corresponding embodiment of fig. 1-14 b, and the page processing apparatus 1 may include: the system comprises an identification display module 11, a response module 12, a parameter acquisition module 13, a control acquisition module 14 and an adjustment module 15.
The identification display module 11 is used for displaying at least one theme color identification in an application page;
a response module 12, configured to respond to a trigger operation for the target subject color identification;
a parameter obtaining module 13, configured to obtain a theme color corresponding to the target theme color identifier; the target subject color identification belongs to the at least one subject color identification;
a control obtaining module 14, configured to obtain a page theme control corresponding to the application page;
and the adjusting module 15 is configured to adjust the color attribute of the page theme control according to the theme color.
For specific functional implementation manners of the identifier display module 11, the response module 12, the parameter obtaining module 13, the control obtaining module 14, and the adjustment module 15, reference may be made to steps S101 to S103 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring to fig. 15, the control acquiring module 14 may include: the mark display unit 141 and the selection unit 142.
An identifier presentation unit 141, configured to present at least one page control identifier corresponding to the application page;
a selecting unit 142, configured to respond to a selection operation for the at least one page control identifier, and use a page control corresponding to the selected page control identifier as the page theme control.
The specific functional implementation manners of the identifier displaying unit 141 and the selecting unit 142 may refer to step S103 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring to fig. 15, the identifier display module 11 may include: an image acquisition unit 111, a color determination unit 112, an identification acquisition unit 113, a setting unit 114, and a display unit 115.
An image acquisition unit 111 for acquiring a target image;
a color determining unit 112 for determining an image subject color of the target image;
an identification obtaining unit 113, configured to obtain the at least one subject color identification matching the subject color of the image;
a setting unit 114, configured to set the target image as a background image of an application to which the application page belongs;
a display unit 115, configured to display the at least one subject color identifier in an application page having a background image.
For specific functional implementation manners of the image obtaining unit 111, the color determining unit 112, the identifier obtaining unit 113, the setting unit 114, and the display unit 115, reference may be made to steps S301 to S304 in the embodiment corresponding to fig. 8, which is not described herein again.
Referring to fig. 15, the color determination unit 112 may include: a first acquisition sub-unit 1121, a combining sub-unit 1122.
A first obtaining subunit 1121, configured to obtain first pixel colors of multiple pixel points in the target image; the first pixel color comprises a pixel primary color and a pixel transparency;
a combining subunit 1122 for combining the average value of the plurality of pixel primary colors and the average value of the plurality of pixel transparencies into the image subject color.
For specific functional implementation manners of the first obtaining sub-unit 1121 and the combining sub-unit 1122, reference may be made to step S301 in the embodiment corresponding to fig. 8, which is not described herein again.
Referring to fig. 15, the identifier acquiring unit 113 may include: a first determining subunit 1131, and a second determining subunit 1132.
A first determining subunit 1131, configured to determine a color distance between the image theme color and an application theme color in the application theme color set;
the second determining subunit 1132 is configured to use the application theme color of which the color distance is smaller than the distance threshold as the theme color to be recommended;
the second determining subunit 1132 is further configured to obtain a color identifier of the color of the to-be-recommended subject, where the color identifier is used as the subject color identifier.
For specific functional implementation manners of the first determining subunit 1131 and the second determining subunit 1132, reference may be made to step S302 in the embodiment corresponding to fig. 8, which is not described herein again.
Referring to fig. 15, the setting unit 114 may include: a setting sub-unit 1141, an extracting sub-unit 1142, a third determining sub-unit 1143, and a merging sub-unit 1144.
A setting subunit 1141, configured to set a transparency of the target image, so as to obtain an image to be merged;
an extracting subunit 1142, configured to extract an image template color of the target image;
a third determining subunit 1143, configured to determine a background color image according to the color of the image template;
a merging subunit 1144, configured to merge the background color image and the image to be merged into a background image of the application program of the application page; the image size of the ground color image is the same as the image size of the target image.
The specific functional implementation manners of the setting sub-unit 1141, the extracting sub-unit 1142, the third determining sub-unit 1143, and the merging sub-unit 1144 may refer to step S303 in the embodiment corresponding to fig. 8.
Referring to fig. 15, the setting subunit 1141 may include: a second acquiring sub-unit 11411 and an adjusting sub-unit 11412.
A second acquiring subunit 11411, configured to acquire an image transparency parameter and an image blur parameter associated with the target image;
an adjusting subunit 11412, configured to adjust a transparency attribute of the target image according to the image transparency parameter, and adjust a blur attribute of the target image according to the image blur parameter;
the adjusting subunit 11412 is further configured to use the target image with the adjusted transparency attribute and the adjusted blurriness attribute as the image to be merged.
The specific functional implementation manners of the second obtaining sub-unit 11411 and the adjusting sub-unit 11412 may refer to step S303 in the embodiment corresponding to fig. 8, which is not described herein again.
Referring to fig. 15, the extraction subunit 1142 may include: select sub-element 11421, update sub-element 11422.
A selecting subunit 11421, configured to combine second pixel colors of multiple pixel points in the target image into a pixel color set S;
the selecting subunit 11421 is further configured to select a center pixel color t from the pixel color set SjJ is a positive integer, j is less than or equal to k, and k is the number of the colors of the central pixel;
the selecting subunit 11421 is further configured to determine the pixel color set S and the center pixel color tjIf the second pixel color S in the pixel color set SiWith said central pixel color tjThe shortest distance between them, the second pixel color s is definediAdding to the center pixel color tjBelonging cluster C to be processedjI is a positive integer, i is less than or equal to m, m is greater than k, and m is the number of pixel points in the target image;
an update subunit 11422, configured to update the cluster C to be processed according to the cluster C to be processedjThe included second pixel color, updating the center pixel color tjUp to the cluster C to be processedjMiddle updated center pixel color tjAnd the color t of the central pixel before updatingjWhen the same, the cluster C to be processed is treatedjThe average value of the second pixel colors contained in (a) is taken as the image template color.
The specific functional implementation manners of the selecting sub-unit 11421 and the updating sub-unit 11422 may refer to step S302 in the embodiment corresponding to fig. 8, which is not described herein again.
Referring to fig. 15, the image template colors include: n template color hue parameters, N template color saturation parameters and N template color brightness parameters; n is a positive integer;
the third determining subunit 1143 may include: a detection subunit 11431 and a generation subunit 11432.
A detecting subunit 11431, configured to determine a background ground color according to the N template color hue parameters, the N template color saturation parameters, and the N template color brightness parameters if the differences between the N template color hue parameters are all smaller than a first difference threshold, the N template color saturation parameters are all larger than a saturation threshold, and the differences between the N template color brightness parameters are all smaller than a second difference threshold;
a generating subunit 11432, configured to generate the ground color image according to the background ground color.
The specific functional implementation manners of the detecting sub-unit 11431 and the generating sub-unit 11432 may refer to step S303 in the embodiment corresponding to fig. 8, which is not described herein again.
Referring to fig. 15, the page processing apparatus 1 may include: the system comprises an identification display module 11, a response module 12, a parameter acquisition module 13, a control acquisition module 14 and an adjustment module 15; the method can also comprise the following steps: a detection module 16.
A detection module 16, configured to obtain a basic ground color if a difference between the N template color hue parameters is not less than the first difference threshold, or the N template color saturation parameters are not greater than the saturation threshold, or a difference between the N template color brightness parameters is not less than the second difference threshold;
the detecting module 16 is further configured to generate the ground color image according to the basic ground color.
The specific functional implementation manner of the detection module 16 may refer to step S303 in the embodiment corresponding to fig. 8, which is not described herein again.
Referring to fig. 15, the page processing apparatus 1 may include: the system comprises an identification display module 11, a response module 12, a parameter acquisition module 13, a control acquisition module 14 and an adjustment module 15; the method can also comprise the following steps: a lookup module 17.
The searching module 17 is configured to search a character icon color corresponding to the image theme color in a character icon color mapping table;
the page processing apparatus 1 may include: the system comprises an identification display module 11, a response module 12, a parameter acquisition module 13, a control acquisition module 14, an adjustment module 15 and a search module 17; the method can also comprise the following steps: a module 18 is provided.
And the setting module 18 is configured to adjust the color attribute of the character and the color attribute of the icon corresponding to the application page according to the color of the character icon.
The specific functional implementation manner of the search module 17 and the setting module 18 may refer to step S304 in the embodiment corresponding to fig. 8, which is not described herein again.
Referring to fig. 15, the page processing apparatus 1 may include: the system comprises an identification display module 11, a response module 12, a parameter acquisition module 13, a control acquisition module 14 and an adjustment module 15; the method can also comprise the following steps: and a pendant display module 19.
The pendant display module 19 is used for displaying a plurality of pendant identifications on the application page;
the pendant display module 19 is further configured to respond to a trigger operation for a target pendant identifier, acquire a pendant image corresponding to the target pendant identifier, and display the pendant image on the application page.
The specific function implementation manner of the pendant display module 19 may refer to step S103 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring to fig. 15, the parameter obtaining module 13 may include: a first merging unit 131 and a parameter obtaining unit 132.
A first merging unit 131, configured to obtain an ambient brightness parameter, and obtain a first color corresponding to the ambient brightness parameter;
the parameter obtaining unit 132 is further configured to obtain a second color corresponding to the target subject color identifier;
the first merging unit 131 is further configured to merge the first color and the second color to obtain the theme color.
The specific functional implementation manners of the first merging unit 131 and the parameter obtaining unit 132 may refer to step S102 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring to fig. 15, the parameter obtaining unit 132 may include: index determination subunit 1321, lookup subunit 1322.
An index determination subunit 1321, configured to determine an identification index corresponding to the target subject color identification;
a searching subunit 1322, configured to search, in an index color mapping table, a red channel parameter, a green channel parameter, a blue channel parameter, and a transparency channel parameter that correspond to the identifier index;
the search subunit 1322 is further configured to combine the red channel parameter, the green channel parameter, the blue channel parameter, and the transparency channel parameter into the second color.
The specific functional implementation manners of the index determining subunit 1321 and the searching subunit 1322 can refer to step S102 in the embodiment corresponding to fig. 3, which is not described herein again.
Referring to fig. 15, the parameter obtaining module 13 may include: a parameter display unit 133 and a second merging unit 134.
A parameter display unit 133, configured to display a plurality of hue parameters, a plurality of saturation parameters, and a plurality of brightness parameters when the target subject color identifier is a custom color identifier;
the second merging unit 134 is configured to respond to a trigger operation for a target hue parameter, a target saturation parameter, and a target brightness parameter, and combine the target hue parameter, the target saturation parameter, and the target brightness parameter into the theme color.
The specific functional implementation manners of the parameter display unit 133 and the second merging unit 134 may refer to step S102 in the embodiment corresponding to fig. 3, which is not described herein again.
Compared with downloading the theme resources and replacing the theme data in the current page, the method and the device have the advantages that the color attribute of the control is directly changed, processes of downloading the theme data, replacing the theme data and the like are not required to be executed, the switching process is simple, the time consumption of theme switching can be reduced, and the switching efficiency is improved; furthermore, in the scheme for replacing the theme data, each theme data is created and generated again by the developer, and the developer does not need to create new theme data for many times, so that the theme development time can be saved, and the software development efficiency can be improved.
Further, please refer to fig. 16, which is a schematic structural diagram of an electronic device according to an embodiment of the present application. The terminal device in the embodiments corresponding to fig. 1 to fig. 14b may be an electronic device 1000, and as shown in fig. 16, the electronic device 1000 may include: a user interface 1002, a processor 1004, an encoder 1006, and a memory 1008. Signal receiver 1016 is used to receive or transmit data via cellular interface 1010, WIFI interface 1012. The encoder 1006 encodes the received data into a computer-processed data format. The memory 1008 has stored therein a computer program by which the processor 1004 is arranged to perform the steps of any of the method embodiments described above. The memory 1008 may include volatile memory (e.g., dynamic random access memory DRAM) and may also include non-volatile memory (e.g., one time programmable read only memory OTPROM). In some examples, the memory 1008 can further include memory located remotely from the processor 1004, which can be connected to the electronic device 1000 via a network. The user interface 1002 may include: a keyboard 1018, and a display 1020.
In the electronic device 1000 shown in fig. 16, the processor 1004 may be configured to call the memory 1008 to store a computer program to implement:
displaying at least one subject color identifier in an application page;
responding to a trigger operation aiming at a target theme color identifier, and acquiring a theme color corresponding to the target theme color identifier; the target subject color identification belongs to the at least one subject color identification;
and acquiring a page theme control corresponding to the application page, and adjusting the color attribute of the page theme control according to the theme color.
In an embodiment, when the processor 1004 executes to acquire the page theme control corresponding to the application page, the following steps are specifically executed:
displaying at least one page control identification corresponding to the application page;
and responding to the selection operation aiming at the at least one page control identification, and taking the page control corresponding to the selected page control identification as the page theme control.
In one embodiment, when the processor 1004 displays at least one theme color identifier in an application page, the following steps are specifically performed:
acquiring a target image, and determining the image theme color of the target image;
acquiring the at least one theme color identifier matched with the theme color of the image;
setting the target image as a background image of the application page;
and displaying the at least one theme color identification in an application page with a background image.
In one embodiment, the processor 1004, when determining the image subject color of the target image, specifically performs the following steps:
acquiring first pixel colors of a plurality of pixel points in the target image; the first pixel color comprises a pixel primary color and a pixel transparency;
combining the average of the plurality of pixel primaries and the average of the plurality of pixel transparencies into the image subject color.
In one embodiment, when the processor 1004 executes the step of obtaining the at least one subject color identifier matching with the image subject color, the following steps are specifically executed:
determining a color distance of the image theme color and an application theme color in the set of application theme colors;
taking the application theme color with the color distance smaller than the distance threshold as the theme color to be recommended;
and acquiring the color identifier of the theme color to be recommended as the theme color identifier.
In one embodiment, when the processor 1004 executes setting of the target image as the background image of the application page, specifically, the following steps are executed:
setting the transparency of the target image to obtain an image to be merged;
extracting the image template color of the target image;
determining a background color image according to the color of the image template, and combining the background color image and the image to be combined into a background image of the application page; the image size of the ground color image is the same as the image size of the target image.
In an embodiment, when the processor 1004 sets the transparency of the target image to obtain the image to be merged, the following steps are specifically performed:
acquiring an image transparency parameter and an image fuzziness parameter associated with the target image;
adjusting the transparency attribute of the target image according to the image transparency parameter, and adjusting the blur attribute of the target image according to the image blur parameter;
and taking the target image with the transparency attribute and the fuzziness attribute adjusted as the image to be merged.
In one embodiment, when the processor 1004 performs the extraction of the image template color of the target image, the following steps are specifically performed:
combining second pixel colors of a plurality of pixel points in the target image into a pixel color set S;
selecting a center pixel color t from the set S of pixel colorsjJ is a positive integer, j is less than or equal to k, and k is the number of the colors of the central pixel;
determining the set S of pixel colors and the center pixel color tjIf the second pixel color S in the pixel color set SiWith said central pixel color tjThe shortest distance between them, the second pixel color s is definediAdding to the center pixel color tjBelonging cluster C to be processedjI is a positive integer, and i is less than or equal toM is equal to m, m is larger than k, and m is the number of pixel points in the target image;
according to the cluster C to be processedjThe included second pixel color, updating the center pixel color tjUp to the cluster C to be processedjMiddle updated center pixel color tjAnd the color t of the central pixel before updatingjWhen the same, the cluster C to be processed is treatedjThe average value of the second pixel colors contained in (a) is taken as the image template color.
In one embodiment, the image template colors include: n template color hue parameters, N template color saturation parameters and N template color brightness parameters; n is a positive integer;
when the processor 1004 determines the background color image according to the image template color, the following steps are specifically executed:
if the difference values among the N template color hue parameters are all smaller than a first difference threshold value, the N template color saturation parameters are all larger than a saturation threshold value, and the difference values among the N template color brightness parameters are all smaller than a second difference threshold value, determining background ground color according to the N template color hue parameters, the N template color saturation parameters and the N template color brightness parameters;
and generating the background color image according to the background color.
In one embodiment, the processor 1004 further performs the following steps:
if the difference value between the hue parameters of the N template colors is not smaller than the first difference threshold value, or the saturation parameters of the N template colors are not larger than the saturation threshold value, or the difference value between the brightness parameters of the N template colors is not smaller than the second difference threshold value, obtaining a basic ground color;
and generating the ground color image according to the basic ground color.
In one embodiment, the processor 1004 further performs the following steps:
searching the color of the character icon corresponding to the theme color of the image in a character icon color mapping table;
after the step of adjusting the color attribute of the page theme control according to the theme color, the method further includes:
and adjusting the color attribute of the character and the color attribute of the icon corresponding to the application page according to the color of the character icon.
In one embodiment, the processor 1004 further performs the following steps:
displaying a plurality of pendant identifiers on the application page;
responding to the trigger operation aiming at the target pendant identification, acquiring a pendant image corresponding to the target pendant identification, and displaying the pendant image on the application page.
In one embodiment, when the processor 1004 executes the obtaining of the theme color corresponding to the target theme color identifier, the following steps are specifically executed:
acquiring an environment brightness parameter, and acquiring a first color corresponding to the environment brightness parameter;
acquiring a second color corresponding to the target theme color identification;
and combining the first color and the second color to obtain the theme color.
In one embodiment, when the processor 1004 executes the step of obtaining the second color corresponding to the target subject color identifier, the following steps are specifically executed:
determining an identification index corresponding to the target subject color identification;
searching a red channel parameter, a green channel parameter, a blue channel parameter and a transparency channel parameter corresponding to the identification index in an index color mapping table;
combining the red channel parameter, the green channel parameter, the blue channel parameter, and the transparency channel parameter into the second color.
In one embodiment, when the processor 1004 executes the obtaining of the theme color corresponding to the target theme color identifier, the following steps are specifically executed:
when the target subject color identifier is a custom color identifier, displaying a plurality of hue parameters, a plurality of saturation parameters and a plurality of brightness parameters;
and responding to trigger operation aiming at the target hue parameter, the target saturation parameter and the target brightness parameter, and combining the target hue parameter, the target saturation parameter and the target brightness parameter into the theme color.
It should be understood that the electronic device 1000 described in this embodiment may perform the description of the page processing method in the embodiment corresponding to fig. 1 to fig. 14b, and may also perform the description of the page processing apparatus 1 in the embodiment corresponding to fig. 15, which is not described herein again. In addition, the beneficial effects of the same method are not described in detail.
Further, here, it is to be noted that: an embodiment of the present application further provides a computer storage medium, and the computer storage medium stores the aforementioned computer program executed by the page processing apparatus 1, and the computer program includes program instructions, and when the processor executes the program instructions, the description of the page processing method in the embodiment corresponding to fig. 1 to 14b can be performed, so that details are not repeated here. In addition, the beneficial effects of the same method are not described in detail. For technical details not disclosed in the embodiments of the computer storage medium referred to in the present application, reference is made to the description of the embodiments of the method of the present application.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present application and is not to be construed as limiting the scope of the present application, so that the present application is not limited thereto, and all equivalent variations and modifications can be made to the present application.
Claims (15)
1. A page processing method is characterized by comprising the following steps:
displaying at least one subject color identifier in an application page;
responding to a trigger operation aiming at a target theme color identifier, and acquiring a theme color corresponding to the target theme color identifier; the target subject color identification belongs to the at least one subject color identification;
and acquiring a page theme control corresponding to the application page, and adjusting the color attribute of the page theme control according to the theme color.
2. The method of claim 1, wherein the obtaining a page theme control corresponding to the application page comprises:
displaying at least one page control identification corresponding to the application page;
and responding to the selection operation aiming at the at least one page control identification, and taking the page control corresponding to the selected page control identification as the page theme control.
3. The method of claim 1, wherein said presenting at least one theme color identification in an application page comprises:
acquiring a target image, and determining the image theme color of the target image;
acquiring the at least one theme color identifier matched with the theme color of the image;
setting the target image as a background image of the application page;
and displaying the at least one theme color identification in an application page with a background image.
4. The method of claim 3, wherein the determining the image subject color of the target image comprises:
acquiring first pixel colors of a plurality of pixel points in the target image; the first pixel color comprises a pixel primary color and a pixel transparency;
combining the average of the plurality of pixel primaries and the average of the plurality of pixel transparencies into the image subject color.
5. The method of claim 3, wherein said obtaining the at least one subject color identification matching the subject color of the image comprises:
determining a color distance of the image theme color and an application theme color in the set of application theme colors;
taking the application theme color with the color distance smaller than the distance threshold as the theme color to be recommended;
and acquiring the color identifier of the theme color to be recommended as the theme color identifier.
6. The method of claim 3, wherein the setting the target image as a background image of the application page comprises:
setting the transparency of the target image to obtain an image to be merged;
extracting the image template color of the target image;
determining a background color image according to the color of the image template, and combining the background color image and the image to be combined into a background image of the application page; the image size of the ground color image is the same as the image size of the target image.
7. The method according to claim 6, wherein the setting of the transparency of the target image to obtain the image to be merged comprises:
acquiring an image transparency parameter and an image fuzziness parameter associated with the target image;
adjusting the transparency attribute of the target image according to the image transparency parameter, and adjusting the blur attribute of the target image according to the image blur parameter;
and taking the target image with the transparency attribute and the fuzziness attribute adjusted as the image to be merged.
8. The method of claim 6, wherein extracting the image template color of the target image comprises:
combining second pixel colors of a plurality of pixel points in the target image into a pixel color set S;
selecting a center pixel color t from the set S of pixel colorsjJ is a positive integer, j is less than or equal to k, and k is the number of the colors of the central pixel;
determining the set S of pixel colors and the center pixel color tjIf the second pixel color S in the pixel color set SiWith said central pixel color tjThe shortest distance between them, the second pixel color s is definediAdding to the center pixel color tjBelonging cluster C to be processedjI is a positive integer, i is less than or equal to m, m is greater than k, and m is the number of pixel points in the target image;
according to the cluster C to be processedjThe included second pixel color, updating the center pixel color tjUp to the cluster C to be processedjMiddle updated center pixel color tjAnd the color t of the central pixel before updatingjWhen the same, the cluster C to be processed is treatedjThe average value of the second pixel colors contained in (a) is taken as the image template color.
9. The method of claim 6, wherein the image template colors comprise: n template color hue parameters, N template color saturation parameters and N template color brightness parameters; n is a positive integer;
the determining of the background color image according to the image template color comprises:
if the difference values among the N template color hue parameters are all smaller than a first difference threshold value, the N template color saturation parameters are all larger than a saturation threshold value, and the difference values among the N template color brightness parameters are all smaller than a second difference threshold value, determining background ground color according to the N template color hue parameters, the N template color saturation parameters and the N template color brightness parameters;
and generating the background color image according to the background color.
10. The method of claim 9, further comprising:
if the difference value between the hue parameters of the N template colors is not smaller than the first difference threshold value, or the saturation parameters of the N template colors are not larger than the saturation threshold value, or the difference value between the brightness parameters of the N template colors is not smaller than the second difference threshold value, obtaining a basic ground color;
and generating the ground color image according to the basic ground color.
11. The method of claim 3, further comprising:
searching the color of the character icon corresponding to the theme color of the image in a character icon color mapping table;
after the step of adjusting the color attribute of the page theme control according to the theme color, the method further includes:
and adjusting the color attribute of the character and the color attribute of the icon corresponding to the application page according to the color of the character icon.
12. The method of claim 1, further comprising:
displaying a plurality of pendant identifiers on the application page;
responding to the trigger operation aiming at the target pendant identification, acquiring a pendant image corresponding to the target pendant identification, and displaying the pendant image on the application page.
13. The method of claim 1, wherein the obtaining of the subject color corresponding to the target subject color identification comprises:
acquiring an environment brightness parameter, and acquiring a first color corresponding to the environment brightness parameter;
acquiring a second color corresponding to the target theme color identification;
and combining the first color and the second color to obtain the theme color.
14. The method of claim 13, wherein obtaining the second color corresponding to the target subject color identification comprises:
determining an identification index corresponding to the target subject color identification;
searching a red channel parameter, a green channel parameter, a blue channel parameter and a transparency channel parameter corresponding to the identification index in an index color mapping table;
combining the red channel parameter, the green channel parameter, the blue channel parameter, and the transparency channel parameter into the second color.
15. The method of claim 1, wherein the obtaining of the subject color corresponding to the target subject color identification comprises:
when the target subject color identifier is a custom color identifier, displaying a plurality of hue parameters, a plurality of saturation parameters and a plurality of brightness parameters;
and responding to trigger operation aiming at the target hue parameter, the target saturation parameter and the target brightness parameter, and combining the target hue parameter, the target saturation parameter and the target brightness parameter into the theme color.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910758598.3A CN112395030A (en) | 2019-08-16 | 2019-08-16 | Page processing method and device, electronic device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910758598.3A CN112395030A (en) | 2019-08-16 | 2019-08-16 | Page processing method and device, electronic device and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112395030A true CN112395030A (en) | 2021-02-23 |
Family
ID=74602057
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910758598.3A Pending CN112395030A (en) | 2019-08-16 | 2019-08-16 | Page processing method and device, electronic device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112395030A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113742025A (en) * | 2021-09-17 | 2021-12-03 | 北京字跳网络技术有限公司 | Page generation method, device, equipment and storage medium |
CN113961112A (en) * | 2021-10-22 | 2022-01-21 | 维沃移动通信有限公司 | Icon display method and device and electronic equipment |
CN114489411A (en) * | 2021-12-28 | 2022-05-13 | 永中软件股份有限公司 | Interface icon processing method, computing device and readable medium |
WO2023045857A1 (en) * | 2021-09-24 | 2023-03-30 | 维沃移动通信有限公司 | Image processing method and apparatus, electronic device and storage medium |
CN117593217A (en) * | 2023-09-23 | 2024-02-23 | 深圳市大我云读写科技有限公司 | PDF quick brightening method and device, electronic equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150205505A1 (en) * | 2014-01-17 | 2015-07-23 | Jeremy B. Conn | Dynamic adjustment of a user interface |
CN105915687A (en) * | 2015-02-25 | 2016-08-31 | 宏达国际电子股份有限公司 | User Interface Adjusting Method And Apparatus Using The Same |
US20160364888A1 (en) * | 2015-06-09 | 2016-12-15 | Samsung Electronics Co., Ltd. | Image data processing method and electronic device supporting the same |
CN106855797A (en) * | 2015-12-09 | 2017-06-16 | 阿里巴巴集团控股有限公司 | The method to set up and device of a kind of interface element color |
CN107133038A (en) * | 2017-04-28 | 2017-09-05 | 广州阿里巴巴文学信息技术有限公司 | A kind of application program changes the method and its device of skin |
CN107977999A (en) * | 2017-12-04 | 2018-05-01 | 北京百度网讯科技有限公司 | Intelligence takes color method and device |
CN109783178A (en) * | 2019-01-24 | 2019-05-21 | 北京字节跳动网络技术有限公司 | A kind of color adjustment method of interface assembly, device, equipment and medium |
-
2019
- 2019-08-16 CN CN201910758598.3A patent/CN112395030A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150205505A1 (en) * | 2014-01-17 | 2015-07-23 | Jeremy B. Conn | Dynamic adjustment of a user interface |
CN105915687A (en) * | 2015-02-25 | 2016-08-31 | 宏达国际电子股份有限公司 | User Interface Adjusting Method And Apparatus Using The Same |
US20160364888A1 (en) * | 2015-06-09 | 2016-12-15 | Samsung Electronics Co., Ltd. | Image data processing method and electronic device supporting the same |
CN106855797A (en) * | 2015-12-09 | 2017-06-16 | 阿里巴巴集团控股有限公司 | The method to set up and device of a kind of interface element color |
CN107133038A (en) * | 2017-04-28 | 2017-09-05 | 广州阿里巴巴文学信息技术有限公司 | A kind of application program changes the method and its device of skin |
CN107977999A (en) * | 2017-12-04 | 2018-05-01 | 北京百度网讯科技有限公司 | Intelligence takes color method and device |
CN109783178A (en) * | 2019-01-24 | 2019-05-21 | 北京字节跳动网络技术有限公司 | A kind of color adjustment method of interface assembly, device, equipment and medium |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113742025A (en) * | 2021-09-17 | 2021-12-03 | 北京字跳网络技术有限公司 | Page generation method, device, equipment and storage medium |
WO2023045857A1 (en) * | 2021-09-24 | 2023-03-30 | 维沃移动通信有限公司 | Image processing method and apparatus, electronic device and storage medium |
CN113961112A (en) * | 2021-10-22 | 2022-01-21 | 维沃移动通信有限公司 | Icon display method and device and electronic equipment |
CN114489411A (en) * | 2021-12-28 | 2022-05-13 | 永中软件股份有限公司 | Interface icon processing method, computing device and readable medium |
CN117593217A (en) * | 2023-09-23 | 2024-02-23 | 深圳市大我云读写科技有限公司 | PDF quick brightening method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12014663B2 (en) | Dark mode display interface processing method, electronic device, and storage medium | |
CN112395030A (en) | Page processing method and device, electronic device and storage medium | |
CN110865856B (en) | Interface element color display method and device | |
CN108701351B (en) | Image display enhancement method and device | |
CN106780635B (en) | Picture adaptation method and system of intelligent terminal | |
CN112328345B (en) | Method, apparatus, electronic device and readable storage medium for determining theme colors | |
CN111784568A (en) | Face image processing method and device, electronic equipment and computer readable medium | |
CN109859283B (en) | Color taking method, color taking device, electronic equipment and storable medium | |
CN113808120B (en) | Image processing method, device, electronic equipment and storage medium | |
CN108200420B (en) | Image adjusting method and device, readable storage medium and terminal | |
WO2022068293A1 (en) | Page display method and apparatus | |
CN110149550B (en) | Image data processing method and device and storage medium | |
CN113132696A (en) | Image tone mapping method, device, electronic equipment and storage medium | |
US20140101614A1 (en) | Theme display method and related apparatus | |
CN111562955B (en) | Method and device for configuring theme colors of terminal equipment and terminal equipment | |
JP2024099753A (en) | Display method, apparatus, and storage medium | |
CN112541955B (en) | Image processing method, device and equipment | |
CN111968605A (en) | Exposure adjusting method and device | |
CN113360820B (en) | Page display method, system, equipment and storage medium | |
CN115115503A (en) | Image display method, device, processor and nonvolatile storage medium | |
CN115484345A (en) | Display mode switching method and device, electronic equipment and medium | |
CN113542494A (en) | Information display method, device, terminal and storage medium | |
CN117290026A (en) | Page background image generation method and device, electronic equipment and storage medium | |
CN115271848A (en) | Commodity information flow display method and device and electronic equipment | |
CN115167858A (en) | Application interface adjusting method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40038287 Country of ref document: HK |
|
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |