A page processing method, device, electronic device and storage medium

By displaying multiple theme color identifiers in the application and directly adjusting the color attributes of the page control, the problem of inefficient interface theme switching in the existing technology is solved, and fast switching and efficient development are achieved.

CN112395030BActive Publication Date: 2024-11-12TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910758598.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-08-16
Publication Date
2024-11-12
Estimated Expiration
2039-09-15

AI Technical Summary

Technical Problem

In the prior art, switching application interface topics is inefficient, requiring downloading and replacing topic resource data, resulting in time-consuming and complex development.

Method used

By displaying multiple theme color identifiers in the application page, the user selects the corresponding theme color and directly adjusts the color attributes of the page control to avoid the process of downloading and replacing theme resource data.

Benefits of technology

Simplifies the theme switching process, reduces the switching time, saves developers time to create new theme data, and improves software development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112395030B_ABST
    Figure CN112395030B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a page processing method, device, electronic setting and storage medium, the method comprising: displaying at least one theme color identifier in an application page; responding to a trigger operation for a target theme color identifier, obtaining a theme color corresponding to the target theme color identifier; the target theme color identifier belongs to the at least one theme color identifier; obtaining 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 present application can improve the efficiency of page theme switching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a page processing method, apparatus and related equipment. Background Art

[0002] Nowadays, tens of thousands of apps (applications) are released every day to meet people's various needs. The visual effects of the app interface will directly affect the lifespan of the app, and an interface with good visual effects will also increase user stickiness.

[0003] Switching the interface theme of an app is a relatively direct means of improving the visual effect of the app interface. Currently, the process of switching the interface theme is as follows: the user selects the theme to be replaced in the terminal device, the terminal device downloads the corresponding theme resource data, and replaces the interface theme data of the current app with the downloaded theme resource data to achieve the purpose of switching the interface theme.

[0004] As can be seen from the above, switching the interface theme first requires downloading the theme resources, and then replacing the downloaded theme data with the original theme data, resulting in low efficiency in theme switching. Summary of the invention

[0005] The embodiments of the present application provide a page processing method, apparatus, and related equipment, which can improve the efficiency of page theme switching.

[0006] On the one hand, an embodiment of the present application provides a page processing method, including:

[0007] Display at least one theme color logo on the application page;

[0008] In response to a trigger operation on a target theme color identifier, obtaining a theme color corresponding to the target theme color identifier; the target theme color identifier belongs to the at least one theme color identifier;

[0009] A page theme control corresponding to the application page is obtained, and a color attribute of the page theme control is adjusted according to the theme color.

[0010] Wherein, the acquiring of a page theme control corresponding to the application page includes:

[0011] Displaying at least one page control identifier corresponding to the application page;

[0012] In response to a selection operation on the at least one page control identifier, a page control corresponding to the selected page control identifier is used as the page theme control.

[0013] The displaying of at least one theme color logo in the application page includes:

[0014] Acquire a target image, and determine an image theme color of the target image;

[0015] Acquire the at least one theme color identifier that matches the theme color of the image;

[0016] Setting the target image as the background image of the application page;

[0017] In an application page having a background image, the at least one theme color identifier is displayed.

[0018] Wherein, determining the image theme color of the target image includes:

[0019] Acquire a first pixel color of a plurality of pixel points in the target image; the first pixel color includes a pixel primary color and a pixel transparency;

[0020] An average value of multiple pixel primary colors and an average value of multiple pixel transparency are combined into the image theme color.

[0021] Wherein, the acquiring of the at least one theme color identifier matching the theme color of the image includes:

[0022] Determine a color distance between the image theme color and an application theme color in an application theme color set;

[0023] The application theme color whose color distance is less than the distance threshold is used as the theme color to be recommended;

[0024] The color identifier of the theme color to be recommended is obtained as the theme color identifier.

[0025] The step of setting the target image as the background image of the application page includes:

[0026] Setting the transparency of the target image to obtain the image to be merged;

[0027] Extracting the image template color of the target image;

[0028] A background image is determined according to the color of the image template, and the background image and the image to be merged are merged into a background image of the application page; the image size of the background image is the same as the image size of the target image.

[0029] The step of setting the transparency of the target image to obtain the image to be merged includes:

[0030] Acquire an image transparency parameter and an image blur parameter associated with the target image;

[0031] 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;

[0032] The target image after adjusting the transparency attribute and the blur attribute is used as the image to be merged.

[0033] Wherein, extracting the image template color of the target image includes:

[0034] Combining the second pixel colors of a plurality of pixel points in the target image into a pixel color set S;

[0035] Select the center pixel color t from the pixel color set S j , j is a positive integer, and j is less than or equal to k, and k is the number of colors of the central pixel;

[0036] Determine the pixel color set S and the center pixel color t j If the second pixel color s in the pixel color set S i With the center pixel color t j The distance between them is the shortest, then the second pixel color s i Add to the center pixel color t j The pending cluster C j , i is a positive integer, and i is less than or equal to m, m is greater than k, and m is the number of pixels in the target image;

[0037] According to the cluster C to be processed j The second pixel color included updates the center pixel color t j , until the to-be-processed cluster C j The updated center pixel color t j The center pixel color t before updating j If the same, the to-be-processed cluster C j The average value of the second pixel colors contained in is used as the image template color.

[0038] Wherein, the image template color includes: N template color hue parameters, N template color saturation parameters and N template color brightness parameters; N is a positive integer;

[0039] The step of determining the background color image according to the color of the image template comprises:

[0040] If the differences between the N template color hue parameters are all less than the first difference threshold, and the N template color saturation parameters are all greater than the saturation threshold, and the differences between the N template color brightness parameters are all less than the second difference threshold, then determine the background base color according to the N template color hue parameters, the N template color saturation parameters, and the N template color brightness parameters;

[0041] The background color image is generated according to the background color.

[0042] Among them, it also includes:

[0043] If the difference between the hue parameters of the N template colors is not less than the first difference threshold, or the saturation parameters of the N template colors are not greater than the saturation threshold, or the difference between the brightness parameters of the N template colors is not less than the second difference threshold, obtain the basic background color;

[0044] The base color image is generated according to the basic base color.

[0045] Among them, it also includes:

[0046] In a character icon color mapping table, searching for a character icon color corresponding to the image theme color;

[0047] After the step of adjusting the color attribute of the page theme control according to the theme color, the method further includes:

[0048] According to the color of the character icon, the color attribute of the character and the color attribute of the icon corresponding to the application page are adjusted.

[0049] Among them, it also includes:

[0050] Displaying multiple widget logos on the application page;

[0051] In response to a trigger operation on a target widget identifier, a widget image corresponding to the target widget identifier is acquired, and the widget image is displayed on the application page.

[0052] Wherein, the acquiring of the theme color corresponding to the target theme color identifier includes:

[0053] Acquire an ambient brightness parameter, and acquire a first color corresponding to the ambient brightness parameter;

[0054] Acquire a second color corresponding to the target theme color identifier;

[0055] The first color and the second color are combined to obtain the theme color.

[0056] Wherein, the acquiring of the second color corresponding to the target theme color identifier includes:

[0057] Determine the identification index corresponding to the target theme color identification;

[0058] In the index color mapping table, searching for the red channel parameter, the green channel parameter, the blue channel parameter and the transparency channel parameter corresponding to the identification index;

[0059] The red channel parameter, the green channel parameter, the blue channel parameter, and the transparency channel parameter are combined into the second color.

[0060] Wherein, the acquiring of the theme color corresponding to the target theme color identifier includes:

[0061] When the target theme color identifier is a custom color identifier, multiple hue parameters, multiple saturation parameters, and multiple brightness parameters are displayed;

[0062] In response to a triggering operation on a target hue parameter, a target saturation parameter, and a target brightness parameter, the target hue parameter, the target saturation parameter, and the target brightness parameter are combined into the theme color.

[0063] Another aspect of the present application provides a page processing device, including:

[0064] A logo display module, used to display at least one theme color logo in the application page;

[0065] A response module, used for responding to a trigger operation for a target theme color identifier;

[0066] A parameter acquisition module, used to acquire a theme color corresponding to the target theme color identifier; the target theme color identifier belongs to the at least one theme color identifier;

[0067] A control acquisition module, used to acquire a page theme control corresponding to the application page;

[0068] The adjustment module is used to adjust the color attribute of the page theme control according to the theme color.

[0069] Wherein, the control acquisition module includes:

[0070] An identification display unit, used to display at least one page control identification corresponding to the application page;

[0071] The selection unit is used to respond to the selection operation on the at least one page control identifier and use the page control corresponding to the selected page control identifier as the page theme control.

[0072] Wherein, the identification display module includes:

[0073] An image acquisition unit, used for acquiring a target image;

[0074] A color determination unit, used to determine the image theme color of the target image;

[0075] an identification acquisition unit, configured to acquire at least one theme color identification matching the theme color of the image;

[0076] A setting unit, used to set the target image as the background image of the application page;

[0077] The display unit is used to display the at least one theme color identifier in an application page having a background image.

[0078] Wherein, the color determination unit includes:

[0079] A first acquisition subunit is used to acquire first pixel colors of a plurality of pixel points in the target image; the first pixel colors include pixel primary colors and pixel transparency;

[0080] The combining subunit is used to combine the average value of multiple pixel primary colors and the average value of multiple pixel transparency into the image theme color.

[0081] Wherein, the identification acquisition unit includes:

[0082] A first determining subunit, configured to determine a color distance between the image theme color and an application theme color in an application theme color set;

[0083] A second determining subunit is used to use the application theme color whose color distance is less than a distance threshold as the theme color to be recommended;

[0084] The second determining subunit is further configured to obtain a color identifier of the theme color to be recommended as the theme color identifier.

[0085] Wherein, the setting unit includes:

[0086] A setting subunit is used to set the transparency of the target image to obtain an image to be merged;

[0087] An extraction subunit, used for extracting the image template color of the target image;

[0088] A third determining subunit, configured to determine a background color image according to the color of the image template;

[0089] The merging subunit is used to merge the background image and the image to be merged into the background image of the application page; the image size of the background image is the same as the image size of the target image.

[0090] Wherein, the setting subunit includes:

[0091] A second acquisition subunit, used to acquire an image transparency parameter and an image blur parameter associated with the target image;

[0092] an adjusting subunit, configured to adjust the transparency attribute of the target image according to the image transparency parameter, and to adjust the blur attribute of the target image according to the image blur parameter;

[0093] The adjustment subunit is further configured to use the target image after the transparency attribute and the blur attribute are adjusted as the image to be merged.

[0094] Wherein, the extraction subunit comprises:

[0095] A selection subunit, configured to combine second pixel colors of a plurality of pixel points in the target image into a pixel color set S;

[0096] The selection subunit is further used to select a central pixel color t from the pixel color set S. j , j is a positive integer, and j is less than or equal to k, and k is the number of colors of the central pixel;

[0097] The selection subunit is also used to determine the pixel color set S and the center pixel color t j If the second pixel color s in the pixel color set S i With the center pixel color t j The distance between them is the shortest, then the second pixel color s i Add to the center pixel color t j The pending cluster C j , i is a positive integer, and i is less than or equal to m, m is greater than k, and m is the number of pixels in the target image;

[0098] The updating subunit is used to update the cluster C to be processed according to the j The second pixel color included updates the center pixel color t j , until the to-be-processed cluster C j The updated center pixel color t j The center pixel color t before updating j If the same, the to-be-processed cluster C j The average value of the second pixel colors contained in is used as the image template color.

[0099] Wherein, the image template color includes: N template color hue parameters, N template color saturation parameters and N template color brightness parameters; N is a positive integer;

[0100] The third determining subunit comprises:

[0101] a detection subunit, configured to determine the background 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 less than a first difference threshold, and the N template color saturation parameters are all greater than a saturation threshold, and the differences between the N template color brightness parameters are all less than a second difference threshold;

[0102] A generating subunit is used to generate the background color image according to the background color.

[0103] Among them, it also includes:

[0104] A detection module, configured to obtain a basic background color if the difference between the hue parameters of the N template colors is not less than the first difference threshold, or the saturation parameters of the N template colors are not greater than the saturation threshold, or the difference between the brightness parameters of the N template colors is not less than the second difference threshold;

[0105] The detection module is further used to generate the background color image according to the basic background color.

[0106] Among them, it also includes:

[0107] A search module, used to search for a character icon color corresponding to the image theme color in a character icon color mapping table;

[0108] Then the device further comprises:

[0109] The setting module is used to adjust the color attributes of the characters and the color attributes of the icons corresponding to the application page according to the color of the character icons.

[0110] Among them, it also includes:

[0111] A widget display module, used to display multiple widget logos on the application page;

[0112] The widget display module is further used to respond to a trigger operation on a target widget identifier, obtain a widget image corresponding to the target widget identifier, and display the widget image on the application page.

[0113] Wherein, the parameter acquisition module includes:

[0114] A first merging unit, used to obtain an ambient brightness parameter, and obtain a first color corresponding to the ambient brightness parameter;

[0115] The parameter acquisition unit is further used to acquire a second color corresponding to the target theme color identifier;

[0116] The first merging unit is further configured to merge the first color and the second color to obtain the theme color.

[0117] Wherein, the parameter acquisition unit includes:

[0118] An index determination subunit, used to determine an identification index corresponding to the target theme color identification;

[0119] A search subunit, used to search for 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;

[0120] The search 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.

[0121] Wherein, the parameter acquisition module includes:

[0122] A parameter display unit, used for displaying a plurality of hue parameters, a plurality of saturation parameters and a plurality of brightness parameters when the target theme color identifier is a custom color identifier;

[0123] The second merging unit is used to respond to a triggering operation on 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.

[0124] Another aspect of the present application embodiment provides an electronic device, including: a processor and a memory;

[0125] The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute a method as in one aspect of an embodiment of the present application.

[0126] On the other hand, an embodiment of the present application provides a computer storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the method in one aspect of the embodiment of the present application is executed.

[0127] The embodiment of the present application displays multiple theme color identifiers on the current page, and the user selects any theme color identifier from the multiple theme color identifiers, obtains the theme color corresponding to the theme color identifier selected by the user, determines the page control corresponding to the application page, and adjusts the color attribute of the page control according to the theme color. As can be seen from the above, compared with downloading theme resources and then replacing the theme data in the current page, the present application directly changes the color attribute of the control, and does not need to perform the process of downloading theme data, replacing theme data, etc. The switching process is simple, which can reduce the time consumption of theme switching and improve the switching efficiency; further, in the scheme of replacing theme data, each theme data needs to be recreated and generated by the developer. The present application does not require the developer to create new theme data multiple times, which can save theme development time and improve software development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0128] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0129] Figure 1 This is a system architecture diagram of page processing provided by an embodiment of the present application;

[0130] Figure 2a-2d This is a schematic diagram of a page processing scenario provided by an embodiment of the present application;

[0131] Figure 3 It is a flow chart of a page processing method provided in an embodiment of the present application;

[0132] Figure 4a-4d is a schematic diagram of a page theme control provided in an embodiment of the present application;

[0133] Figure 5a-5d It is a schematic diagram of a custom page theme control provided in an embodiment of the present application;

[0134] Figure 6a-6c is a schematic diagram of a custom theme color provided in an embodiment of the present application;

[0135] Figure 7 It is a schematic diagram of a pendant display provided in an embodiment of the present application;

[0136] Figure 8 is a schematic diagram showing a theme color identification provided in an embodiment of the present application;

[0137] Fig. 9This is a schematic diagram of a process for determining a theme color identifier provided by an embodiment of the present application;

[0138] Figure 10a-10f is a schematic diagram of determining a background image provided by an embodiment of the present application;

[0139] Figure 11a-Figure 11d is another schematic diagram of determining a background image provided by an embodiment of the present application;

[0140] Figure 12a-12h is a schematic diagram of setting a background image provided by an embodiment of the present application;

[0141] Fig.13 is a schematic diagram of a character icon color mapping table provided in an embodiment of the present application;

[0142] Fig.14a is a schematic diagram of determining the color of a character icon provided in an embodiment of the present application;

[0143] Fig.14b is another schematic diagram of determining the color of a character icon provided in an embodiment of the present application;

[0144] Fig.15 is a structural schematic diagram of a page processing device provided in an embodiment of the present application;

[0145] Fig.16 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0147] See also Figure 1 , is a system architecture diagram of a page processing provided by an embodiment of the present application. The present application involves a backend server 10d and a terminal device cluster, and the terminal device cluster may include: a terminal device 10a, a terminal device 10b, ..., a terminal device 10c, etc.

[0148] Taking the terminal device 10a as an example, the terminal device 10a displays multiple theme color identifiers on the current page. When the user clicks on any theme color identifier, the terminal device 10a sends the theme color identifier selected by the user to the background server 10d. 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 sends the found theme color and control identifier to the terminal device 10a. The terminal device 10a modifies the color attribute of the page theme control corresponding to the control identifier according to the theme color.

[0149] Among them, determining the page theme control and searching for the theme color of the theme color identifier selected by the user can also be completed by the terminal device.

[0150] in, Figure 1 The terminal devices 10a, 10b, ..., 10c, etc. shown may include mobile phones, tablet computers, laptop computers, PDAs, mobile Internet devices (MIDs), wearable devices (such as smart watches, smart bracelets, etc.), etc.

[0151] The following Figure 2a-2d A specific description is given by taking how a terminal device determines a page theme control and how to find a theme color identified by a theme color selected by a user as an example.

[0152] See also Figure 2a-2d , is a schematic diagram of a page processing scenario provided by an embodiment of the present application. Figure 2a As shown, the current display page of the instant messaging APP is the message list page, and a subject selection mark 20a is displayed in the message list page.

[0153] The user clicks on the topic selection mark 20a, such as Figure 2b As shown, the terminal device jumps from the message list page to the selection page, and multiple theme color labels are displayed on the selection page. Figure 2b It can be seen that the plurality of theme color logos include: a theme red logo 20b, a theme blue logo 20c, and a theme cyan logo 20d.

[0154] The user clicks the theme red mark 20b, which means 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). From a visual perspective, the theme color is pure red.

[0155] like Figure 2c-2dAs shown, the terminal device searches for page controls associated with the topic in the instant messaging APP, and the page controls associated with the topic include: a title bar 20e, an icon 20f, and a message text box 20g; and the title bar 20e and the icon 20f belong to Figure 2c Corresponding message list page, message text box 20g belongs to Figure 2d The corresponding session page.

[0156] like Figure 2c As shown, the terminal device jumps back to the message list page from the selection page. In the process of 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). From a visual perspective, the color of the title bar 20e is adjusted to pure red. Similarly, the terminal device sets the attribute value of the color attribute of the icon 20f to (255, 0, 0). From a visual perspective, the color of the icon 20f is adjusted to pure red. Therefore, Figure 2c The color of the title bar 20e and the icon 20f of the displayed message list page is bright red.

[0157] from Figure 2a It can be seen that the color of the icon 20f before adjustment is black, while the color of the icon 20f after adjustment is bright red.

[0158] like Figure 2c As shown in the figure, if the user chooses to have a conversation with his friend "Xiao Wang", the terminal device will Figure 2c The corresponding message list page jumps to Figure 2d In the corresponding conversation page of friend "Xiao Wang", since the message text box 20g is also a page control associated with the topic, when rendering the conversation page, the terminal device also sets the attribute value of the color attribute of the message text box 20g to (255,0,0). From a visual perspective, the color of the message text box 20g is adjusted to red. Therefore, Figure 2d The color of the message text box 20g of the displayed conversation page is bright red.

[0159] Among them, find the theme color (as mentioned above Figure 2a-2d The theme color (255,0,0) in the corresponding embodiment), determine the page theme control (as described above Figure 2a-2d The specific process of the title bar 20e, icon 20f and message text box 20g in the corresponding embodiment can be referred to as follows Figure 3-14b The corresponding embodiments.

[0160] See also Figure 3 , is a flow chart of a page processing method provided by an embodiment of the present application, such as Figure 3 As shown, the method may include:

[0161] Step S101: display at least one theme color logo in the application page.

[0162] Specifically, the terminal device displays the APP where the current display page is located (for example, the above Figure 2a-2d All pages under the instant messaging APP in the corresponding embodiment are called application pages (such as the above Figure 2a The corresponding message list page, Figure 2b The corresponding selection page, Figure 2d The application page may include a selection page related to theme switching (such as Figure 2b corresponding selection page) and content pages related to the app content (such as the above Figure 2a The corresponding message list page, Figure 2d corresponding session page).

[0163] The terminal device obtains multiple preset theme color identifiers (such as the above Figure 2a-2d Corresponding to the red theme logo 20b, the blue theme logo 20c, and the cyan theme logo 20d in the embodiment, the above-mentioned multiple theme color logos are displayed in the selection page in the application page.

[0164] Among them, the theme color identifier is a page identifier with the function of switching the page theme color. The function of switching the page theme color is to adjust the color of the page control associated with the theme in the application page, and the color corresponding to the theme color identifier is the color of the page theme to be switched.

[0165] For example, the color corresponding to the theme color identifier is pure red, and the function of the theme color identifier is to adjust the color of the page control associated with the theme in the application page to pure red.

[0166] The theme color logo can be a graphic filled with color, or it can be text, etc.

[0167] Step S102, in response to a triggering operation on a target theme color identifier, obtaining a theme color corresponding to the target theme color identifier; the target theme color identifier belongs to the at least one theme color identifier.

[0168] Specifically, the user arbitrarily selects a theme color identifier from a plurality of theme color identifiers, and the terminal device responds to the user's selection operation and uses the theme color identifier selected by the user as the target theme color identifier.

[0169] When the target theme color identifier belongs to the system color identifier, the terminal device determines the identifier index corresponding to the target theme color identifier, and searches the index color mapping table for the color corresponding to the identifier index, which is called the theme color (as mentioned above). Figure 2a-2dCorresponding to the theme color (255, 0, 0) in the embodiment, the theme color may include R, G, B, and A4 channel component parameters belonging to the RGBA (Red, Green, Blue, Alpha) color space.

[0170] The system color identifier is a color identifier with corresponding color channel component parameters. The corresponding color identifier is a custom color identifier. The user sets the hue, saturation, and brightness of the custom color identifier separately, and then combines the parameters set by the user into a theme color. Hue, saturation, and brightness are the three basic elements of color.

[0171] Among them, the RGBA color space is a color model that adds transparency information to the RGB color space; the RGB color space is a color model that uses the three basic colors R (Red), G (Green), and B (Blue) as the basis, and superimposes them to varying degrees to produce rich and wide-ranging colors.

[0172] The specific process of determining the theme color may be: in the index color mapping table, looking up the parameters on the red channel in the RGBA color space (called red channel parameters), the parameters on the green channel (called green channel parameters), the parameters on the blue channel (called blue channel parameters), and the parameters on the transparency channel (called transparency channel parameters) corresponding to the identification index.

[0173] The terminal device combines the found red channel parameters, green channel parameters, blue channel parameters, and transparency channel parameters into a theme color, and the theme color belongs to the RGBA color space.

[0174] The above process of determining the theme color according to the target theme color identifier can be performed by the color configuration manager. The specific strategy is to maintain an index color mapping table inside the color manager. When the user selects a theme color identifier, the color manager records the corresponding identifier index. At the same time, an interface is provided in the color manager. The function of the interface is to find the color of the currently selected identifier index in the index color mapping table. The corresponding color can be obtained externally by calling the interface.

[0175] Optionally, the above is to search for the channel component parameters in the RGBA color space corresponding to the identification index, so that the obtained theme color belongs to the RGBA color space. It is also possible to search for the 3-channel component parameters in the HSL color space corresponding to the identification index in the index color mapping table, or to search for the 3-channel component parameters in the RGB color space, or to search for the 3-channel component parameters in the YCbCr color space, so that the obtained theme color belongs to the HSL color space, or the RGB color space, or the YCbCr color space.

[0176] Among them, the HSL color space is a color standard in the industry. It is a color model that obtains various colors by changing the three color channels of hue (H), saturation (S), and brightness (L) and superimposing them on each other.

[0177] The above is to directly use the R, G, B, A4 channel component parameters corresponding to the target theme color identifier as the theme color. The R, G, B, A4 channel component parameters corresponding to the target theme color identifier can also be adjusted based on the ambient brightness parameters of the environment in which the terminal device is currently located to obtain the theme color.

[0178] In simple terms, the theme color is determined based on the color selected by the user and the current ambient brightness. For example, the user selects a crimson theme color logo and is currently in a high-brightness environment, so the color corresponding to the determined theme color may be pure red.

[0179] The specific process of harmonizing the color corresponding to the target theme color identification based on the ambient brightness parameters of the environment in which the terminal device is currently located to obtain the theme color is: based on the light sensor of the terminal device, determine the brightness parameter of the environment in which the terminal device is currently located (called the ambient brightness parameter), and obtain the color corresponding to the ambient brightness parameter as the first color. The first color is also a 4-dimensional vector, and the 4 components in the first parameter can be positive or negative.

[0180] Get the R, G, B, A4 channel component parameters corresponding to the target color identifier, combine them into a second color (it can be known that the second color here is the aforementioned theme color), add the first color and the second color to obtain the theme color, and the above theme color also belongs to the RGBA color space.

[0181] It should be noted that the value range of the R, G, and B components in the theme color is 0-255, and the value range of the A component is 0-100. If the sum of the first color and the second color exceeds the above value range, the upper limit (or lower limit) of the value range can be used as the theme color.

[0182] For example, the first color corresponding to the ambient brightness parameter is: (33,-33,-20,0), and the second color corresponding to the target theme color identifier is: (207,175,189,0). From a visual perspective, the second color is pink. Adding the first color "(33,-33,-20,0)" and the second color "(207,175,189,0)" gives the theme color: (240,142,169,0). From a visual perspective, the theme color is positive red.

[0183] When the target theme color ID is a custom color ID, multiple hue parameters, saturation parameters, and brightness parameters are displayed in the selection page of the application page. It can be seen that the hue parameter, saturation parameter, and brightness parameter are 3-channel component parameters belonging to the HSL (Hue, Saturation, Lightness) color space.

[0184] Among them, displaying multiple hue parameters, saturation parameters and brightness parameters can be displayed through a scroll bar, and the user only needs to slide the scroll block in the scroll bar to perform selection operations among multiple hue parameters, multiple saturation parameters and multiple brightness parameters.

[0185] The user can select any hue parameter from multiple hue parameters as the target hue parameter; select any saturation parameter from multiple saturation parameters as the target saturation parameter; and select any brightness parameter from multiple brightness parameters as the target brightness parameter. The terminal device can directly combine the target hue parameter, target saturation parameter, and target brightness parameter into a theme color.

[0186] Optionally, in order to unify with the aforementioned RGBA color space, after obtaining the target hue parameter, the target saturation parameter and the target brightness parameter, the terminal device may convert the above three parameters into the RGB color space based on formula (1):

[0187]

[0188] Among them, h, s, and l in formula (1) correspond to the target hue parameter, target saturation parameter, and target brightness parameter respectively. R ,Color G ,Color B They are R channel component, G channel component and B channel component. The terminal device sets the A channel component to 0%, that is, completely opaque, and converts the above converted Color R ,Color G ,Color BAnd the A channel component "0%" is combined into the theme color, and the theme color at this time belongs to the RGBA color space.

[0189] From the above, we can see that the same color can be mapped to the R, G, B components of the RGB color space, and can also be mapped to the H, L, S components of the HSL color space, and colors in different color spaces can be converted to each other.

[0190] Subsequently, the terminal device may also generate a theme color identifier according to the theme color determined by the user selection, so that the user can directly select the theme color identifier next time to determine the theme color without having to select the hue parameter, saturation parameter and brightness parameter again.

[0191] When the target theme is a color logo or a custom color logo, what is displayed to the user is hue, saturation, and brightness instead of the red channel, green channel, and blue channel. This is because hue, saturation, and brightness are defined from the perspective of human vision, while R, G, and B are defined from the perspective of the wavelength of light. Therefore, displaying hue, saturation, and brightness can allow users to directly visually perceive the color corresponding to the three selected parameters.

[0192] Step S103, obtaining a page theme control corresponding to the application page, and adjusting a color attribute of the page theme control according to the theme color.

[0193] Specifically, the terminal device can search for a page control associated with a theme among all page controls corresponding to the application page as a page theme control (such as the above Figure 2a-2d The corresponding embodiment includes the title bar 20e, icon 20f and message text box 20g).

[0194] Among them, the page theme controls may include: title bar, pressed state of icon, default chat bubble, tab, check control, button, switch, text, page background, etc.

[0195] The color attribute of the page theme control is modified according to the theme color, that is, the attribute value of the color attribute of the page theme control is set to the theme color, so that the color of the modified page theme control is the same as the theme color.

[0196] It should be noted that if the theme color determined in the above does not belong to the RGBA color space, the terminal device also needs to convert the theme color to the RGBA color space through a conversion formula. This is because when the page is rendered, all color-related parameters belong to the RGBA color space by default.

[0197] See also Figure 4a-4d , is a schematic diagram of a page theme control provided in an embodiment of the present application, such as Figure 4a-4dAs shown, the page theme control may include: a page title bar 30z, an icon 30a ( Figure 4a The displayed page is the page corresponding to the icon 30a, so the icon 30a is currently in the icon pressed state), the message text box 30b, the message text box 30c, the page label 30d, the check control 30e, the check control 30f, the button 30x, and the multiple switches in the switch set 30g. That is to say, 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 label 30d, the check control 30e, the check control 30f, the button 30x, and the multiple switches in the switch set 30g are all set to the theme color, so that the colors of the above-mentioned page theme controls are the same as the theme color.

[0198] Optionally, the page theme control involved above is preset in advance by the terminal device, and the user only needs to select a color. The color attribute of the page theme control can be directly adjusted based on the user's selection. This theme switching process can reduce the user's operating difficulty.

[0199] The user can also customize the page theme control to improve the flexibility of theme setting. The specific process is: display multiple page control identifiers, each page control identifier uniquely corresponds to a page control of an application page.

[0200] Page controls can be title bars, pressed states of icons, default chat bubbles, page tabs, checkbox controls, buttons, switches, text page backgrounds, etc. Page control logos can be graphics or text, etc.

[0201] When a user selects any page control identifier among multiple page control identifiers, the terminal device uses the page control corresponding to the selected page control identifier as the page theme control.

[0202] See also Figure 5a-5d , is a schematic diagram of a custom page theme control provided in an embodiment of the present application, such as Figure 5a As shown, page controls can include: title, icon, character and background. Figure 5a The corresponding selection page displays the page control identifiers of the above four page controls.

[0203] like Figure 5b As shown, the user selects the "icon" page control identifier, and the terminal device can use the "icon" page control corresponding to the "icon" page control identifier as the page theme control.

[0204] like Figure 5cAs shown, the user selects the "cyan" theme color identifier as the target theme color identifier among the "red" theme color identifier, the "blue" theme color identifier, the "cyan" theme color identifier, and the "orange" theme color identifier, and determines that the theme color corresponding to the target theme color identifier "cyan" is: (224, 254, 225, 0%). Visually, the above theme color "(224, 254, 225, 0%)" is cyan.

[0205] like Figure 5d As shown, the terminal device sets the attribute value of the color attribute of icon 30p, icon 30q, and icon 30s to (224, 254, 225, 0%), that is, the color of icon 30p, icon 30q, and icon 30s is set to cyan.

[0206] See also Figure 6a-6c , is a schematic diagram of a custom theme color provided in an embodiment of the present application. Figure 6a As shown, a custom color mark 30h is displayed in the selection page, and the user selects the custom color mark 30h, so the custom color mark 30h immediately becomes the target theme color mark 30h.

[0207] like Figure 6b As shown, a plurality of hue parameters are displayed to the user through a hue roller, a plurality of saturation parameters are displayed to the user through a saturation roller, and a plurality of brightness parameters are displayed to the user through a brightness roller. The user can select a target hue parameter, a target saturation parameter, and a target brightness parameter by sliding the slider on the roller.

[0208] like Figure 6c As shown, the color attribute of the page theme control (the page theme control includes the page title bar 30k and the icon 30m) is adjusted according to the target hue parameter, target saturation parameter, and target brightness parameter selected by the user. Subsequently, the terminal device determines that the color is purple according to the target hue parameter, target saturation parameter, and target brightness parameter, and the terminal device can generate a theme color identifier 30n "purple" related to purple to facilitate the next display.

[0209] Optionally, multiple widget identifiers are displayed on the application page, and each widget identifier uniquely corresponds to a widget image. The user can select any widget identifier from the multiple widget identifiers, and the terminal device responds to the user's selection operation and uses the widget identifier selected by the user as the target widget identifier. The terminal device obtains the widget image corresponding to the target widget identifier and displays the widget image on the application page to dress up the application page, wherein the widget image can be displayed at the top or bottom of the application page, and the widget image can be a static image or a dynamic image. The user can adjust the transparency of the widget image to avoid blocking the application page when it is placed at the top layer of the application page.

[0210] See also Figure 7 , is a schematic diagram of a pendant display provided in an embodiment of the present application, such as Figure 7 As shown, after the user selects the target widget identifier, the terminal device obtains the widget image 70a corresponding to the target widget identifier, and the terminal device displays the widget image 70a on the application page.

[0211] See also Figure 8 , is a schematic diagram of a display theme color identification provided by an embodiment of the present application, display theme color identification includes the following steps S201-step S204, and steps S201-step S204 are the above Figure 3 Specific implementation of step S101 in the corresponding embodiment:

[0212] Step S201, obtaining a target image, and determining an image theme color of the target image.

[0213] Specifically, the page theme can be changed by modifying the color attribute of the page theme control, and the background image of the application page can also be replaced.

[0214] The image selected by the user is obtained as the target image, and the terminal device can directly set the target image as the background image of the application page.

[0215] 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. When setting the background image of the application page based on the target image, if the current page to be set is a content page, the background image of the entire content page is set to the target image; if the current page to be set is a selection page, the background image of a preset area in the selection page is set to the target image, where 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. It can be understood that the content window is a mini content page contained in the selection page.

[0216] For example, Figure 2a Corresponding content page, Figure 2b On the corresponding selection page, Figure 2b The corresponding selection page contains a content window (which can be understood as a mini content page), and the content in the content window is the same as Figure 2a The content of the corresponding content pages is the same.

[0217] On the basis of setting the background image, the multiple theme color identifiers displayed to the user may be color identifiers of colors similar to the color style of the target image.

[0218] The terminal device extracts the image theme color of the target image, which is the average hue of the target image. The specific process of determining the image theme color is: obtaining the color of each pixel in the target image in the RGBA color space (called the first color space), all as the first pixel color. From the previous analysis, it can be known that the first pixel color can include four channel component parameters of R, G, B, and A. The R, G, and B components can be called pixel primary colors, and the A component can be called pixel transparency, that is, each first pixel color includes pixel primary colors and pixel transparency. The terminal device calculates the average value of all pixel primary colors, calculates the average value of all pixel transparency, and combines the average value of pixel primary colors and the average value of pixel transparency into the image theme color. Among them, the average value of pixel primary colors includes: 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.

[0219] Step S202: Acquire at least one theme color identifier that matches the theme color of the image.

[0220] 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.

[0221] See also Fig. 9 , is a flow chart of determining a theme color identifier provided in an embodiment of the present application, and determining the theme color identifier includes the following steps:

[0222] Step S2021, obtaining the target image selected by the user.

[0223] Step S2022, determining the mean values ​​of the red channel, green channel, blue channel, and transparency channel of all pixels of the target image.

[0224] Specifically, the terminal device combines the average values ​​of the red channel, green channel, blue channel, and transparency channel of all pixels of the target image into the image theme color.

[0225] Step S2023, determining the theme color identifier according to the average values ​​of the red channel, green channel, blue channel, and transparency channel of all pixels of the target image.

[0226] Specifically, the terminal device obtains the application theme color set, and the terminal device calculates the distance (called color distance) between each application theme color in the application theme color set and the image theme color. Each application theme color can be expressed as a 4-channel component parameter corresponding to the RGBA color space, and the distance between the application theme color and the image theme color = the difference between the R component in the application theme color and the R component in the image theme color + the difference between the G component in the application theme color and the G component in the image theme color + the difference between the B component in the application theme color and the B component in the image theme color + the difference between the A component in the application theme color and the A component in the image theme color.

[0227] The terminal device selects the application theme color corresponding to the color distance less than the distance threshold from multiple color distances as the theme color to be recommended. The color identifier of the theme color to be recommended is obtained, and the color identifier of the theme color to be recommended is used as the theme color identifier, and the theme color identifier is a color identifier of a color similar to the color style of the target image.

[0228] Step S2025 : The color manager records a mapping relationship between the theme color identifier and the identifier index established for each theme color identifier.

[0229] Step S203: setting the target image as the background image of the application page.

[0230] Specifically, the terminal device can directly set the target image as the background image of the application page.

[0231] It should be noted that the terminal device can set the background image and determine the theme color identifier in parallel, and there is no limit on the execution order. As long as the target image is obtained, the terminal device can immediately use the target image as the background image of the application page. At the same time, the color identifier of a color close to the image theme color of the target image is used as the theme color identifier.

[0232] The terminal device can also adjust the transparency property of the target image to obtain the image to be merged. The number of colors contained in the target image is detected. If the number of colors is more than one, the terminal device extracts the image template color of the target image, where the image template color is a plurality of main colors contained in the target image. The image theme color mentioned above is one color, and the image template color here includes multiple colors.

[0233] The image template color can be determined based on the K-Means algorithm, the octree algorithm, etc. The following is a specific description of determining the image template color of the target image based on the K-Means algorithm: the terminal device obtains the color (called the second pixel color) of each pixel point in the target image in the color space (the color space here can be the RGB color space, the HSL color space, the RGBA color space, of course, if the color space here is the RGBA color space, then the second pixel color is equal to the first pixel color), and combines the obtained second pixel color of each pixel point into a pixel color set S. Randomly select k second pixel colors from the pixel color set S as the center pixel color t j , j is a positive integer, and j is less than or equal to k, k is the number of center pixel colors.

[0234] First loop: Calculate the distance between each second pixel color in the pixel color set S and any center pixel color. If the second pixel color s i With the center pixel color t j The distance between them is the shortest, then the second pixel color s i Add to the center pixel color t j The pending cluster C j i is a positive integer, and i is less than or equal to m, m is greater than k, m is the number of pixels in the target image, and m is also the number of second pixel colors in the pixel color set S. The above process is performed for each second pixel color, that is, each second pixel color is divided into a corresponding cluster to be processed. In each cluster to be processed C j In the example, the second pixel color at the center is used as the new center pixel color t j , and get k new center pixel colors again.

[0235] Second loop: calculate the distance between each second pixel color and the new central pixel color again, and then divide each second pixel color into the to-be-processed cluster to which the nearest central pixel color belongs according to the distance, and update the central pixel color again.

[0236] Keep looping, when any of the waiting clusters C j The updated center pixel color t j The center pixel color t before updating j At the same time, the loop is completed, and the average value of the second pixel color contained in each cluster to be processed is used as the auxiliary color, and all the auxiliary colors are combined into the image template color. It can be seen that the number of auxiliary colors contained in the image template color is equal to the number of central pixel colors.

[0237] When the second pixel color is a color belonging to the HSL color space, the image template color 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 above-mentioned.

[0238] When the second pixel color is not a color belonging to the HSL color space, after k-means clustering, the average value of the cluster to be processed is used as the color to be adjusted. The color to be adjusted in the non-HSL color space is converted into an image template color belonging to the HSL color space through a color space conversion formula, and the obtained image template color may include: N template color hue parameters, N template color saturation parameters, and N template color brightness parameters.

[0239] Calculate the difference between the hue parameters of N template colors, calculate the difference between the brightness parameters of N template colors, if the difference between the hue parameters of N template colors is less than the first difference threshold, and the saturation parameters of N template colors are greater than the saturation threshold, and the difference between the brightness parameters of N template colors is less than the second difference threshold, take the average value of the hue parameters of N template colors as the average hue parameter, take the average value of the saturation parameters of N template colors as the average saturation parameter, and take the average value of the brightness parameters of N template colors as the average brightness parameter. Combine the above average hue parameter, average saturation parameter and average brightness parameter as the background color.

[0240] The terminal device generates a background color image according to the background color, wherein the filling color of the background color image is the above-mentioned background color, and the size of the background color image is the same as that of the target image.

[0241] If there is a first difference greater than or equal to the first difference threshold value among the differences between the N template color hue parameters (all referred to as the first difference value), or there is a color saturation parameter greater than or equal to the saturation threshold value among the N template color saturation parameters, or there is a second difference greater than or equal to the second difference threshold value among the differences between the N template color brightness parameters (all referred to as the second difference value), then the terminal device obtains the basic background color, which can be black (the black can be represented as (0,0,0) in the RGB color space) or white (the white can be represented as (255,255,255) in the RGB color space) or gray (the gray can be represented as (192,192,192) in the RGB color space). A background color image is generated based on 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 the size of the target image.

[0242] Optionally, if the number of colors contained in the target image is one, that is, the target image is a pure color image, the terminal device obtains a basic background color, which can be black (the black can be represented as (0,0,0) in the RGB color space) or white (the white can be represented as (255,255,255) in the RGB color space) or gray (the gray can be represented as (192,192,192) in the RGB color space). A background color image is generated 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.

[0243] The terminal device merges the image to be merged with the background image after the transparency adjustment, that is, covers the image to be merged on the background image, and sets the image obtained after covering as the background image of the application page.

[0244] For images with similar hue, high saturation, and similar brightness, the background image can be optimized according to the image template color, retaining the color purity effect of the target image.

[0245] The following two examples illustrate the visual effects of background images determined by base images of different colors:

[0246] See also Figure 10a-10f , is a schematic diagram of determining a background image provided by an embodiment of the present application. Fig.10a As shown, image 50a is the target image, and the transparency of the target image 50a is adjusted to obtain the image 50b to be merged (as shown in FIG. Fig.10b shown).

[0247] like Fig.10c As shown, the image 50c is a background color image 50c generated with the basic background color "black". If the image to be merged 50b is covered on the background color image 50c, the color appears "dirty" and the viewing angle effect is poor.

[0248] like Fig.10d As shown, image 50d is a background image 50d generated with the basic background color "white". If the image to be merged 50b is covered on the background image 50d, although the color is not "dirty", the readability of the white controls in the interface will be reduced.

[0249] In summary, no matter whether black or white is used to generate the background image, the visual effect of the merged image is not ideal.

[0250] Therefore, it is necessary to determine the background color by the image template color of image 50a, and then generate the background color image. Fig.10aIt can be seen that the image 50a contains two image template colors, namely, image template color 1 and 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 less than the first difference threshold, and the saturation parameter of the image template color 1 and the saturation parameter of the image template color 2 are both greater than the saturation threshold, and the difference between the brightness parameter of the image template color 1 and the brightness parameter of the image template color 2 is less than the second difference threshold, so the average color of the image template color 1 and the image template color 2 is used as the background background color, and the background color image 50e (such as Fig.10e shown).

[0251] The image to be merged 50b is overlaid on the background image 50e, as shown in FIG. Fig.10f As shown, an image 50f may be generated and set as a background image of the application page.

[0252] See also Figure 11a-Figure 11d , is another schematic diagram of determining a background image provided by an embodiment of the present application. Fig.11a As shown, image 60a is the target image, and the transparency of the target image 60a is adjusted to obtain the image to be merged 60b (as shown in FIG. Fig.11b shown).

[0253] from Fig.11a It can be seen that image 60a contains two image template colors, namely image template color 1 and image template color 2, and the difference between the hue parameters of image template color 1 and the hue parameters of image template color 2 is greater than the first difference threshold, so the background image 60c can be generated according to the basic background color "black".

[0254] like Fig.11c As shown, the image to be merged 60b is covered on the background image 60c, as shown in FIG. Fig.11d As shown, an image 60d may be generated and set as a background image of the application page.

[0255] In the above, after the terminal device determines the target image, the transparency of the target image is set according to the preset transparency parameter to obtain the image to be merged.

[0256] The user can also customize the transparency and blurriness of the target image to obtain the image to be merged. The specific process is: the terminal device receives the transparency parameter and blurriness parameter input by the user, where the transparency parameter is used to adjust the transparency attribute of the target image, and the blurriness parameter is used to adjust the blurriness parameter attribute of the target image.

[0257] The terminal device sets the attribute value of the transparency attribute of the target image to the above transparency parameter, and sets the attribute value of the blur attribute of the target image to the above blur parameter. The terminal device uses the target image after the transparency attribute and blur attribute are set as the image to be merged. Subsequently, based on the color of the image template, the background image is determined, and the background image and the image to be merged are merged into the background image of the application page.

[0258] It can be seen that the higher the transparency of the image to be merged, the more transparent the content in the target image is, that is, the stronger the background image is perceived by the user; the higher the blurriness of the image to be merged, the blurrier the content in the target image is, and the fewer details are. By adjusting the transparency and blurriness of the target image, the user can make the page content (including text, images, various page controls, etc.) on the application page more prominent.

[0259] See also Figure 12a-12h , is a schematic diagram of setting a background image provided by an embodiment of the present application. Fig.12a As shown, the user can click the "Change Background Image" icon on the selection page of the application page to replace the background image of the application page. Figure 12b As shown, the terminal device displays multiple pictures, where the multiple pictures can be pictures in the local files of the terminal device or pictures taken by the user in real time.

[0260] The user selects a target image from multiple images. Figure 12b It can be seen that the target image selected by the user is an image with a five-pointed star and a white background.

[0261] For simple explanation, a base color image is generated with the base color "gray", such as Fig.12c As shown in FIG. 4 , a base color image 40a is generated based on the basic base color “gray”, and the target image 40b is overlaid on the base color image 40a. Fig.12d As shown, after overlaying, image 40c can be obtained. Image 40c is used as the background image of the application page, such as Fig.12e As shown, the image 40c is used as the background image of the content window 40d in the selected page.

[0262] The user can adjust the transparency of the target image 40b, such as Fig.12e As shown, the user increases the transparency of the target image 40b by sliding the slider of the transparency slider in the selection page. Fig.12f As shown, image 40e is the image after the transparency of target image 40b is increased, that is, image 40e to be merged. Fig.12f It can be seen that the five-pointed star in the to-be-merged image 40e is more transparent in terms of both the lines and the outlines than the five-pointed star in the target image 40b.

[0263] The terminal device overlays the image to be merged 40e on the background image 40a. Figure 12g As shown in FIG. 4 , after overlaying, image 40g can be obtained. Image 40g is used as the background image of the application page, such as Figure 12h As shown, the image 40g is used as the background image of the content window 40h in the selected page.

[0264] Step S204: displaying the at least one theme color logo in an application page using the target image as a background image.

[0265] 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 merging the target image and a background image).

[0266] Optionally, the human eye has different perceptions of saturation and brightness of different hues. For example, the human eye perceives highly saturated yellow and white as both bright colors, and the contrast is not strong, but the human eye perceives highly saturated red and white as a sharp contrast. The human eye can clearly perceive the color contrast of highly saturated yellow and black, but the human eye perceives a lower contrast of highly saturated red and black. Therefore, for target images of different hues, saturations, and brightness, it is necessary to adjust the appropriate font color and icon color to enhance the contrast between the background image and the characters and icons to ensure the readability of the interface.

[0267] The specific process is: determining the image theme color of the target image, wherein the specific process of determining the image theme color can be referred to the above step S201, and will not be described in detail here.

[0268] The image theme color mentioned above is a color in the RGBA color space. Therefore, the image theme 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):

[0269]

[0270] Among them, r, g, b are the R channel component, G channel component and B channel component of the image theme color respectively; max, min are the maximum and minimum values ​​of r, g, b respectively; h, l, s are the hue component (H), brightness component (L) and saturation component (S) belonging to the HSL color space.

[0271] The terminal device combines the converted h, l, and s belonging to the HSL color space into a color to be searched.

[0272] It can be seen from formula (1) and formula (2) that the colors belonging to the RGB color space and the colors belonging to the HSL color space can be converted to each other.

[0273] The terminal device searches for the character icon color corresponding to the color to be searched in the character icon color mapping table. 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. According to the character icon color, the color attributes of the characters included in the application page are adjusted, and the color attributes of the icons included in the application page are adjusted, so that the colors of the adjusted characters and icons are the same as the character icon colors.

[0274] For example, when a user uploads a highly saturated yellow image as the background image, the default recommended icon and character colors are black, that is, the character icon color is black. When a user uploads a highly saturated but low-brightness green image, the default recommended icon and character colors are white, that is, the character icon color is white.

[0275] See also Fig.13 , is a schematic diagram of a character icon color mapping table provided in an embodiment of the present application, Fig.13 It contains 7 color blocks, each of which corresponds to one hue. The middle line of each color block is taken as the baseline. As the baseline goes up, the saturation decreases; as the baseline goes down, the brightness decreases.

[0276] Fig.13 The curve 40k in is the color dividing line 40k. If the color to be searched after the image theme color is converted is located below the color dividing line 40k, then the character icon color corresponding to the color to be searched is white; if the color to be searched after the image theme color is converted is located above the color dividing line 40k or on the color dividing line, then the character icon color corresponding to the color to be searched is black.

[0277] See also Fig.14a , is a schematic diagram of determining the color of a character icon provided in an embodiment of the present application, such as Fig.14a As shown, the target image is used as the background image of the application page. Fig.14a It can be seen that the color of the target image is low-saturation yellow. By looking up the character icon color mapping table (the character icon color mapping table can be found in Fig.13 ), it can be determined that the character icon color corresponding to the low-saturation yellow is black, so Fig.14a The characters and icons in the application page (including the "Message" icon, "Contact" icon and "Dynamic" icon) are set to black.

[0278] See also Fig.14b , is another schematic diagram of determining the color of a character icon provided in an embodiment of the present application, such as Fig.14b As shown, the target image is used as the background image of the application page. Fig.14bIt can be seen that the color of the target image is low-brightness blue. By looking up the character icon color mapping table (the character icon color mapping table can be found in Fig.13 ), it can be determined that the character icon color corresponding to the low-brightness blue is white, so Fig.14b The characters and icons in the application page (including the "Message" icon, "Contact" icon and "Dynamic" icon) are set to white.

[0279] From the above, it can be seen that compared to downloading theme resources and then replacing the theme data in the current page, the present application directly changes the color properties of the control, without having to execute the processes of downloading theme data and replacing theme data. The switching process is simple, which can reduce the time consumption of theme switching and improve switching efficiency. Furthermore, in the scheme of replacing theme data, each theme data needs to be recreated and generated by the developer. The present application does not require the developer to create new theme data multiple times, which can save theme development time and improve software development efficiency.

[0280] For further information, see Fig.15 , is a schematic diagram of the structure of a page processing device provided in an embodiment of the present application. Fig.15 As shown, the page processing device 1 can be applied to the above Figure 1-14b Corresponding to the terminal device in the embodiment, the page processing device 1 may include: an identification display module 11 , a response module 12 , a parameter acquisition module 13 , a control acquisition module 14 , and an adjustment module 15 .

[0281] The logo display module 11 is used to display at least one theme color logo in the application page;

[0282] A response module 12, used to respond to a trigger operation for a target theme color identifier;

[0283] A parameter acquisition module 13 is used to acquire a theme color corresponding to the target theme color identifier; the target theme color identifier belongs to the at least one theme color identifier;

[0284] A control acquisition module 14 is used to acquire a page theme control corresponding to the application page;

[0285] The adjustment module 15 is used to adjust the color attribute of the page theme control according to the theme color.

[0286] The specific functional implementation of the identification display module 11, the response module 12, the parameter acquisition module 13, the control acquisition module 14, and the adjustment module 15 can be referred to above. Figure 3 Steps S101 to S103 in the corresponding embodiment will not be described in detail here.

[0287] See also Fig.15The control acquisition module 14 may include: an identification display unit 141 and a selection unit 142 .

[0288] The identification display unit 141 is used to display at least one page control identification corresponding to the application page;

[0289] The selection unit 142 is used to respond to the selection operation on the at least one page control identifier and use the page control corresponding to the selected page control identifier as the page theme control.

[0290] The specific functional implementation of the logo display unit 141 and the selection unit 142 can be found in the above Figure 3 The step S103 in the corresponding embodiment will not be described in detail here.

[0291] See also Fig.15 The identification 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 .

[0292] An image acquisition unit 111, used to acquire a target image;

[0293] A color determination unit 112, configured to determine the image theme color of the target image;

[0294] The identification acquisition unit 113 is used to acquire the at least one theme color identification that matches the theme color of the image;

[0295] A setting unit 114, configured to set the target image as a background image of an application to which the application page belongs;

[0296] The display unit 115 is configured to display the at least one theme color identifier in an application page having a background image.

[0297] The specific functional implementation of the image acquisition unit 111, the color determination unit 112, the identification acquisition unit 113, the setting unit 114, and the display unit 115 can be referred to above. Figure 8 Steps S301 to S304 in the corresponding embodiment are not described in detail here.

[0298] See also Fig.15 The color determination unit 112 may include: a first acquisition subunit 1121 and a combination subunit 1122.

[0299] A first acquisition subunit 1121 is used to acquire first pixel colors of a plurality of pixel points in the target image; the first pixel colors include pixel primary colors and pixel transparency;

[0300] The combining subunit 1122 is used to combine the average values ​​of multiple pixel primary colors and the average values ​​of multiple pixel transparency into the image theme color.

[0301] The specific functional implementation of the first acquisition subunit 1121 and the combination subunit 1122 can be found in the above Figure 8 The step S301 in the corresponding embodiment will not be described in detail here.

[0302] See also Fig.15 The identification acquisition unit 113 may include: a first determination subunit 1131 and a second determination subunit 1132.

[0303] A first determining subunit 1131 is used to determine a color distance between the image theme color and an application theme color in an application theme color set;

[0304] The second determining subunit 1132 is used to use the application theme color whose color distance is less than the distance threshold as the theme color to be recommended;

[0305] The second determining subunit 1132 is further configured to obtain a color identifier of the theme color to be recommended as the theme color identifier.

[0306] The specific functional implementation of the first determining subunit 1131 and the second determining subunit 1132 can be referred to above. Figure 8 The step S302 in the corresponding embodiment will not be described in detail here.

[0307] See also Fig.15 The setting unit 114 may include: a setting subunit 1141, an extraction subunit 1142, a third determination subunit 1143, and a merging subunit 1144.

[0308] A setting subunit 1141 is used to set the transparency of the target image to obtain an image to be merged;

[0309] An extraction subunit 1142, used to extract the image template color of the target image;

[0310] A third determining subunit 1143 is used to determine the background color image according to the color of the image template;

[0311] The merging subunit 1144 is used to merge the background image and the image to be merged into a background image of the application program on the application page; the image size of the background image is the same as the image size of the target image.

[0312] The specific functional implementation of the setting subunit 1141, the extraction subunit 1142, the third determination subunit 1143, and the merging subunit 1144 can be referred to above. Figure 8 This corresponds to step S303 in the embodiment.

[0313] See also Fig.15 The setting subunit 1141 may include: a second obtaining subunit 11411 and an adjusting subunit 11412.

[0314] The second acquisition subunit 11411 is used to acquire an image transparency parameter and an image blur parameter associated with the target image;

[0315] An adjusting subunit 11412, 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;

[0316] The adjusting subunit 11412 is further configured to use the target image after the transparency attribute and the blur attribute are adjusted as the image to be merged.

[0317] The specific functional implementation of the second acquisition subunit 11411 and the adjustment subunit 11412 can be found in the above Figure 8 The step S303 in the corresponding embodiment will not be described in detail here.

[0318] See also Fig.15 The extraction subunit 1142 may include: a selection subunit 11421 and an update subunit 11422.

[0319] A selection subunit 11421 is used to combine the second pixel colors of a plurality of pixel points in the target image into a pixel color set S;

[0320] The selection subunit 11421 is further used to select a central pixel color t from the pixel color set S. j , j is a positive integer, and j is less than or equal to k, and k is the number of colors of the central pixel;

[0321] The selection subunit 11421 is also used to determine the pixel color set S and the center pixel color t j If the second pixel color s in the pixel color set S i With the center pixel color t j The distance between them is the shortest, then the second pixel color s i Add to the center pixel color t j The pending cluster C j , i is a positive integer, and i is less than or equal to m, m is greater than k, and m is the number of pixels in the target image;

[0322] The updating subunit 11422 is used to update the cluster C to be processed according to the j The second pixel color included updates the center pixel color t j , until the to-be-processed cluster C j The updated center pixel color t j The center pixel color t before updating j If the same, the to-be-processed cluster C j The average value of the second pixel colors contained in is used as the image template color.

[0323] The specific functional implementation of the selection subunit 11421 and the update subunit 11422 can be found in the above Figure 8 The step S302 in the corresponding embodiment will not be described in detail here.

[0324] See also Fig.15 , the image template color includes: N template color hue parameters, N template color saturation parameters and N template color brightness parameters; N is a positive integer;

[0325] The third determining subunit 1143 may include: a detecting subunit 11431 and a generating subunit 11432 .

[0326] The detection subunit 11431 is configured to determine the background 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 less than a first difference threshold, and the N template color saturation parameters are all greater than a saturation threshold, and the differences between the N template color brightness parameters are all less than a second difference threshold;

[0327] The generating subunit 11432 is used to generate the background color image according to the background color.

[0328] The specific functional implementation of the detection subunit 11431 and the generation subunit 11432 can be found in the above Figure 8 The step S303 in the corresponding embodiment will not be described in detail here.

[0329] See also Fig.15 The page processing device 1 may include: an identification display module 11, a response module 12, a parameter acquisition module 13, a control acquisition module 14, and an adjustment module 15; and may also include: a detection module 16.

[0330] A detection module 16, configured to obtain a basic background color if the difference between the hue parameters of the N template colors is not less than the first difference threshold, or the saturation parameters of the N template colors are not greater than the saturation threshold, or the difference between the brightness parameters of the N template colors is not less than the second difference threshold;

[0331] The detection module 16 is further configured to generate the background color image according to the basic background color.

[0332] The specific functional implementation of the detection module 16 can be found in the above Figure 8 The step S303 in the corresponding embodiment will not be described in detail here.

[0333] See also Fig.15 The page processing device 1 may include: an identification display module 11, a response module 12, a parameter acquisition module 13, a control acquisition module 14, and an adjustment module 15; and may also include: a search module 17.

[0334] A search module 17, used to search for a character icon color corresponding to the image theme color in a character icon color mapping table;

[0335] The page processing device 1 may include: 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 ; and may also include: a setting module 18 .

[0336] The setting module 18 is used to adjust the color attributes of the characters and the color attributes of the icons corresponding to the application page according to the color of the character icons.

[0337] The specific functional implementation of the search module 17 and the setting module 18 can be found in the above Figure 8 The step S304 in the corresponding embodiment will not be described in detail here.

[0338] See also Fig.15 The page processing device 1 may include: an identification display module 11, a response module 12, a parameter acquisition module 13, a control acquisition module 14, and an adjustment module 15; and may also include: a widget display module 19.

[0339] A widget display module 19, used to display multiple widget logos on the application page;

[0340] The widget display module 19 is further configured to respond to a trigger operation on a target widget identifier, obtain a widget image corresponding to the target widget identifier, and display the widget image on the application page.

[0341] The specific function implementation of the pendant display module 19 can be found in the above Figure 3 The step S103 in the corresponding embodiment will not be described in detail here.

[0342] See also Fig.15 The parameter acquisition module 13 may include: a first merging unit 131 and a parameter acquisition unit 132.

[0343] A first merging unit 131 is used to obtain an ambient brightness parameter and obtain a first color corresponding to the ambient brightness parameter;

[0344] The parameter acquisition unit 132 is further used to acquire a second color corresponding to the target theme color identifier;

[0345] The first merging unit 131 is further configured to merge the first color and the second color to obtain the theme color.

[0346] The specific functional implementation of the first merging unit 131 and the parameter acquisition unit 132 can be found in the above Figure 3 The step S102 in the corresponding embodiment will not be described in detail here.

[0347] See also Fig.15 The parameter acquisition unit 132 may include: an index determination subunit 1321 and a search subunit 1322.

[0348] The index determination subunit 1321 is used to determine the identification index corresponding to the target theme color identification;

[0349] A search subunit 1322 is used to search the red channel parameter, the green channel parameter, the blue channel parameter and the transparency channel parameter corresponding to the identification index in the index color mapping table;

[0350] The searching 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.

[0351] The specific functional implementation of the index determination subunit 1321 and the search subunit 1322 can be found in the above Figure 3 The step S102 in the corresponding embodiment will not be described in detail here.

[0352] See also Fig.15 The parameter acquisition module 13 may include: a parameter display unit 133 and a second merging unit 134.

[0353] 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 theme color identifier is a custom color identifier;

[0354] The second merging unit 134 is used to respond to the triggering operation on the target hue parameter, the target saturation parameter and the target brightness parameter, and combine the target hue parameter, the target saturation parameter and the target brightness parameter into the theme color.

[0355] The specific functional implementation of the parameter display unit 133 and the second merging unit 134 can be found in the above Figure 3 The step S102 in the corresponding embodiment will not be described in detail here.

[0356] From the above, it can be seen that compared to downloading theme resources and then replacing the theme data in the current page, the present application directly changes the color properties of the control, without having to execute the processes of downloading theme data and replacing theme data. The switching process is simple, which can reduce the time consumption of theme switching and improve switching efficiency. Furthermore, in the scheme of replacing theme data, each theme data needs to be recreated and generated by the developer. The present application does not require the developer to create new theme data multiple times, which can save theme development time and improve software development efficiency.

[0357] For further information, see Fig.16 , is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 1-14b The terminal device in the corresponding embodiment may be an electronic device 1000, such as Fig.16 As shown, the electronic device 1000 may include: a user interface 1002, a processor 1004, an encoder 1006 and a memory 1008. The signal receiver 1016 is used to receive or send data via a cellular interface 1010, a WIFI interface 1012, ..., or an NFC interface 1014. The encoder 1006 encodes the received data into a data format for computer processing. A computer program is stored in the memory 1008, and the processor 1004 is configured to perform the steps in any of the above method embodiments through the computer program. The memory 1008 may include a volatile memory (e.g., a dynamic random access memory DRAM), and may also include a non-volatile memory (e.g., a one-time programmable read-only memory OTPROM). In some instances, the memory 1008 may further include a memory remotely arranged relative to the processor 1004, and these remote memories may be connected to the electronic device 1000 via a network. The user interface 1002 may include: a keyboard 1018 and a display 1020.

[0358] exist Fig.16 In the electronic device 1000 shown, the processor 1004 may be used to call a computer program stored in the memory 1008 to implement:

[0359] Display at least one theme color logo on the application page;

[0360] In response to a trigger operation on a target theme color identifier, obtaining a theme color corresponding to the target theme color identifier; the target theme color identifier belongs to the at least one theme color identifier;

[0361] A page theme control corresponding to the application page is obtained, and a color attribute of the page theme control is adjusted according to the theme color.

[0362] In one embodiment, when the processor 1004 executes the acquisition of the page theme control corresponding to the application page, the processor 1004 specifically performs the following steps:

[0363] Displaying at least one page control identifier corresponding to the application page;

[0364] In response to a selection operation on the at least one page control identifier, a page control corresponding to the selected page control identifier is used as the page theme control.

[0365] In one embodiment, when the processor 1004 displays at least one theme color identifier in the application page, the processor 1004 specifically performs the following steps:

[0366] Acquire a target image, and determine an image theme color of the target image;

[0367] Acquire the at least one theme color identifier that matches the theme color of the image;

[0368] Setting the target image as the background image of the application page;

[0369] In an application page having a background image, the at least one theme color identifier is displayed.

[0370] In one embodiment, when the processor 1004 determines the image theme color of the target image, it specifically performs the following steps:

[0371] Acquire a first pixel color of a plurality of pixel points in the target image; the first pixel color includes a pixel primary color and a pixel transparency;

[0372] An average value of multiple pixel primary colors and an average value of multiple pixel transparency are combined into the image theme color.

[0373] In one embodiment, when the processor 1004 executes the acquisition of the at least one theme color identifier that matches the theme color of the image, the processor 1004 specifically performs the following steps:

[0374] Determine a color distance between the image theme color and an application theme color in an application theme color set;

[0375] The application theme color whose color distance is less than the distance threshold is used as the theme color to be recommended;

[0376] The color identifier of the theme color to be recommended is obtained as the theme color identifier.

[0377] In one embodiment, when the processor 1004 sets the target image as the background image of the application page, the processor 1004 specifically performs the following steps:

[0378] Setting the transparency of the target image to obtain the image to be merged;

[0379] Extracting the image template color of the target image;

[0380] A background image is determined according to the color of the image template, and the background image and the image to be merged are merged into a background image of the application page; the image size of the background image is the same as the image size of the target image.

[0381] In one embodiment, when the processor 1004 sets the transparency of the target image to obtain the image to be merged, the processor 1004 specifically performs the following steps:

[0382] Acquire an image transparency parameter and an image blur parameter associated with the target image;

[0383] 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;

[0384] The target image after adjusting the transparency attribute and the blur attribute is used as the image to be merged.

[0385] In one embodiment, when the processor 1004 extracts the image template color of the target image, it specifically performs the following steps:

[0386] Combining the second pixel colors of a plurality of pixel points in the target image into a pixel color set S;

[0387] Select the center pixel color t from the pixel color set S j , j is a positive integer, and j is less than or equal to k, and k is the number of colors of the central pixel;

[0388] Determine the pixel color set S and the center pixel color t j If the second pixel color s in the pixel color set S i With the center pixel color t j The distance between them is the shortest, then the second pixel color s i Add to the center pixel color tj The pending cluster C j , i is a positive integer, and i is less than or equal to m, m is greater than k, and m is the number of pixels in the target image;

[0389] According to the cluster C to be processed j The second pixel color included updates the center pixel color t j , until the to-be-processed cluster C j The updated center pixel color t j The center pixel color t before updating j If the same, the to-be-processed cluster C j The average value of the second pixel colors contained in is used as the image template color.

[0390] In one embodiment, the image template color includes: N template color hue parameters, N template color saturation parameters and N template color brightness parameters; N is a positive integer;

[0391] When the processor 1004 determines the background color image according to the color of the image template, the processor 1004 specifically performs the following steps:

[0392] If the differences between the N template color hue parameters are all less than the first difference threshold, and the N template color saturation parameters are all greater than the saturation threshold, and the differences between the N template color brightness parameters are all less than the second difference threshold, then determine the background base color according to the N template color hue parameters, the N template color saturation parameters, and the N template color brightness parameters;

[0393] The background color image is generated according to the background color.

[0394] In one embodiment, the processor 1004 further performs the following steps:

[0395] If the difference between the hue parameters of the N template colors is not less than the first difference threshold, or the saturation parameters of the N template colors are not greater than the saturation threshold, or the difference between the brightness parameters of the N template colors is not less than the second difference threshold, obtain the basic background color;

[0396] The base color image is generated according to the basic base color.

[0397] In one embodiment, the processor 1004 further performs the following steps:

[0398] In a character icon color mapping table, searching for a character icon color corresponding to the image theme color;

[0399] After the step of adjusting the color attribute of the page theme control according to the theme color, the method further includes:

[0400] According to the color of the character icon, the color attribute of the character and the color attribute of the icon corresponding to the application page are adjusted.

[0401] In one embodiment, the processor 1004 further performs the following steps:

[0402] Displaying multiple widget logos on the application page;

[0403] In response to a trigger operation on a target widget identifier, a widget image corresponding to the target widget identifier is acquired, and the widget image is displayed on the application page.

[0404] In one embodiment, when the processor 1004 executes the acquisition of the theme color corresponding to the target theme color identifier, the processor 1004 specifically performs the following steps:

[0405] Acquire an ambient brightness parameter, and acquire a first color corresponding to the ambient brightness parameter;

[0406] Acquire a second color corresponding to the target theme color identifier;

[0407] The first color and the second color are combined to obtain the theme color.

[0408] In one embodiment, when the processor 1004 executes the acquisition of the second color corresponding to the target theme color identifier, the processor 1004 specifically performs the following steps:

[0409] Determine the identification index corresponding to the target theme color identification;

[0410] In the index color mapping table, searching for the red channel parameter, the green channel parameter, the blue channel parameter and the transparency channel parameter corresponding to the identification index;

[0411] The red channel parameter, the green channel parameter, the blue channel parameter, and the transparency channel parameter are combined into the second color.

[0412] In one embodiment, when the processor 1004 executes the acquisition of the theme color corresponding to the target theme color identifier, the processor 1004 specifically performs the following steps:

[0413] When the target theme color identifier is a custom color identifier, multiple hue parameters, multiple saturation parameters, and multiple brightness parameters are displayed;

[0414] In response to a triggering operation on a target hue parameter, a target saturation parameter, and a target brightness parameter, the target hue parameter, the target saturation parameter, and the target brightness parameter are combined into the theme color.

[0415] It should be understood that the electronic device 1000 described in the embodiment of the present application can execute the above Figures 1 to 14b The description of the page processing method in the corresponding embodiment can also be performed as described above. Fig.15 The description of the page processing device 1 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here either.

[0416] In addition, it should be pointed out that: the embodiment of the present application also provides a computer storage medium, and the computer storage medium stores a computer program executed by the page processing device 1 mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, it can execute the above-mentioned Figures 1 to 14b The description of the page processing method in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0417] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0418] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A page processing method, characterized in that: include: At least one theme color logo is displayed in an application page, the application page has a background image, the background image includes a background color image, the background color image is determined according to an image template color of a target image, the image template color includes N template color hue parameters, N template color saturation parameters and N template color brightness parameters, where N is a positive integer; In response to a trigger operation on a target theme color identifier, a theme color corresponding to the target theme color identifier is obtained; the theme color is obtained by combining a first color and a second color, the first color corresponds to an ambient brightness parameter of a current environment, and the second color corresponds to the target theme color identifier; the target theme color identifier belongs to the at least one theme color identifier; Obtain a page theme control corresponding to the application page, and adjust a color attribute of the page theme control according to the theme color; Wherein, determining the background color image according to the color of the image template includes: If the differences between the N template color hue parameters are all less than a first difference threshold, and the N template color saturation parameters are all greater than a saturation threshold, and the differences between the N template color brightness parameters are all less than a second difference threshold, then determining a background 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; If the difference between the hue parameters of the N template colors is not less than the first difference threshold, or the saturation parameters of the N template colors are not greater than the saturation threshold, or the difference between the brightness parameters of the N template colors is not less than the second difference threshold, the basic background color is obtained, and the background color image is generated based on the basic background color.

2. The method according to claim 1, characterized in that The acquiring of a page theme control corresponding to the application page includes: Displaying at least one page control identifier corresponding to the application page; In response to a selection operation on the at least one page control identifier, a page control corresponding to the selected page control identifier is used as the page theme control.

3. The method according to claim 1, characterized in that The displaying of at least one theme color identifier in the application page includes: Acquire the target image, and determine the image theme color of the target image; Acquire the at least one theme color identifier that matches the theme color of the image; Setting the target image as the background image of the application page; In an application page having a background image, the at least one theme color identifier is displayed.

4. The method according to claim 3, characterized in that Determining the image theme color of the target image includes: Acquire a first pixel color of a plurality of pixel points in the target image; the first pixel color includes a pixel primary color and a pixel transparency; An average value of multiple pixel primary colors and an average value of multiple pixel transparency are combined into the image theme color.

5. The method according to claim 3, characterized in that: The acquiring of the at least one theme color identifier matching the theme color of the image includes: Determine a color distance between the image theme color and an application theme color in an application theme color set; The application theme color whose color distance is less than the distance threshold is used as the theme color to be recommended; The color identifier of the theme color to be recommended is obtained as the theme color identifier.

6. The method according to claim 3, characterized in that The step of setting the target image as the background image of the application page comprises: Setting the transparency of the target image to obtain the image to be merged; Extracting the image template color of the target image; The background image and the image to be merged are merged into the background image of the application page; the image size of the background image is the same as the image size of the target image.

7. The method according to claim 6, characterized in that The step of setting the transparency of the target image to obtain the image to be merged includes: Acquire an image transparency parameter and an image blur 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; The target image after adjusting the transparency attribute and the blur attribute is used as the image to be merged.

8. The method according to claim 6, characterized in that The step of extracting the image template color of the target image comprises: Combining the second pixel colors of a plurality of pixel points in the target image into a pixel color set S; Select the center pixel color from the pixel color set S , j is a positive integer, and j is less than or equal to k, and k is the number of colors of the central pixel; Determine the pixel color set S and the center pixel color If the second pixel color in the pixel color set S with the center pixel color The distance between them is the shortest, then the second pixel color Add to the center pixel color The cluster to be processed , i is a positive integer, and i is less than or equal to m, m is greater than k, and m is the number of pixels in the target image; According to the cluster to be processed The second pixel color included, updates the center pixel color , until the cluster to be processed The updated center pixel color The center pixel color before updating If the same, the cluster to be processed The average value of the second pixel colors contained in is used as the image template color.

9. The method according to claim 3, characterized in that: Also includes: In a character icon color mapping table, searching for a character icon color corresponding to the image theme color; After the step of adjusting the color attribute of the page theme control according to the theme color, the method further includes: According to the color of the character icon, the color attribute of the character and the color attribute of the icon corresponding to the application page are adjusted.

10. The method according to claim 1, characterized in that Also includes: Displaying multiple widget logos on the application page; In response to a trigger operation on a target widget identifier, a widget image corresponding to the target widget identifier is acquired, and the widget image is displayed on the application page.

11. The method according to claim 1, characterized in that: The acquiring of the theme color corresponding to the target theme color identifier includes: Acquire an ambient brightness parameter, and acquire a first color corresponding to the ambient brightness parameter; Acquire a second color corresponding to the target theme color identifier; The first color and the second color are combined to obtain the theme color.

12. The method according to claim 11, characterized in that The acquiring of a second color corresponding to the target theme color identifier includes: Determine the identification index corresponding to the target theme color identification; In the index color mapping table, searching for the red channel parameter, the green channel parameter, the blue channel parameter and the transparency channel parameter corresponding to the identification index; The red channel parameter, the green channel parameter, the blue channel parameter, and the transparency channel parameter are combined into the second color.

13. The method according to claim 1, characterized in that The acquiring of the theme color corresponding to the target theme color identifier includes: When the target theme color identifier is a custom color identifier, multiple hue parameters, multiple saturation parameters, and multiple brightness parameters are displayed; In response to a triggering operation on a target hue parameter, a target saturation parameter, and a target brightness parameter, the target hue parameter, the target saturation parameter, and the target brightness parameter are combined into the theme color.

14. A page processing device, characterized in that: include: A logo display module, used to display at least one theme color logo in an application page, wherein the application page has a background image, wherein the background image includes a background color image, wherein the background color image is determined according to an image template color of a target image, wherein the image template color includes N template color hue parameters, N template color saturation parameters, and N template color brightness parameters, where N is a positive integer; A response module, used for responding to a trigger operation for a target theme color identifier; a parameter acquisition module, used to acquire a theme color corresponding to the target theme color identifier; the theme color is obtained by combining a first color and a second color, the first color corresponds to an ambient brightness parameter of a current environment, and the second color corresponds to the target theme color identifier; the target theme color identifier belongs to the at least one theme color identifier; A control acquisition module, used to acquire a page theme control corresponding to the application page; An adjustment module, used for adjusting the color attribute of the page theme control according to the theme color; Wherein, when determining the background color image according to the color of the image template, the identification display module is specifically used to: If the differences between the N template color hue parameters are all less than a first difference threshold, and the N template color saturation parameters are all greater than a saturation threshold, and the differences between the N template color brightness parameters are all less than a second difference threshold, then determining a background 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; If the difference between the hue parameters of the N template colors is not less than the first difference threshold, or the saturation parameters of the N template colors are not greater than the saturation threshold, or the difference between the brightness parameters of the N template colors is not less than the second difference threshold, the basic background color is obtained, and the background color image is generated based on the basic background color.

15. An electronic device, characterized in that: include: Processor and memory; The processor is connected to a memory, wherein the memory is used to store a computer program, and the processor is used to call the computer program to execute the method according to any one of claims 1 to 13.

16. A computer storage medium, characterized in that: The computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the method according to any one of claims 1 to 13 is executed.