Theme color setting method and device, equipment, storage medium and product

By responding to the theme color setting instructions, obtaining and replacing the theme color configuration parameters of the network application, the custom theme color switching coverage problem is solved, and diversified theme color settings are achieved, reducing engineer workload and maintenance costs.

CN119065570APending Publication Date: 2024-12-03BEIJING UDSAFE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411261485.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

The prior art will overwrite previous custom modifications when switching theme colors of custom network applications, resulting in increased repeated work by front-end engineers and only supports a single color, resulting in the interface appearing monotonous.

Method used

By responding to the theme color setting command, obtain the logical file and theme color setting plug-in of the network application, extract the matching theme color configuration parameters, and replace the theme color data in the cascade style sheet file with Configuration parameters, support multiple colors and gradient display methods.

Benefits of technology

It reduces the repetitive work of front-end engineers, reduces application maintenance costs, and achieves richer and more diverse theme color settings, improving the research and development efficiency of network applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119065570A_ABST
    Figure CN119065570A_ABST
Patent Text Reader

Abstract

The invention discloses a theme color setting method and device, equipment, a storage medium and a product. The method comprises the steps that a theme color setting instruction of a target network application program is responded; wherein the theme color setting instruction comprises a theme color initialization instruction and a theme color switching instruction; obtaining a logic file and a theme color setting plug-in of the target network application program, and extracting theme color configuration parameters matched with the theme color setting instruction in the theme color setting plug-in; according to a preset theme color setting method in the logic file, theme color data in a cascading style sheet file of the target network application program is replaced with the theme color configuration parameters. According to the theme color setting method disclosed by the invention, by configuring the related parameters in the theme color setting plug-in and presetting the related methods in the logic file, repeated work of front-end engineers can be reduced, the application maintenance cost can be reduced, and richer and diversified theme color setting can be carried out.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of front-end interaction technology, and in particular to a method, device, equipment, storage medium and product for setting a theme color. Background Art

[0002] For current web application products, fixed interface styles are often delivered to customers. However, with the continuous development of Internet technology, customer needs are becoming more and more diverse and complex, and the current interface color scheme may not meet actual needs.

[0003] In order to meet the user's demand for customizing the theme color of a web application, the prior art generally uses a custom UI component to allow front-end engineers to modify and edit the custom UI component according to user needs. However, this method will overwrite the previously customized style after the theme color is switched, thus causing a lot of repetitive work for front-end engineers. In addition, the existing theme color switching method only supports a single color, making the interface of the web application appear relatively monotonous and bland. Summary of the invention

[0004] The present invention provides a method, device, equipment, storage medium and product for setting a theme color, so as to realize customized switching of the theme color of a network application program.

[0005] According to one aspect of the present invention, a method for setting a theme color is provided, comprising:

[0006] Responding to a theme color setting instruction of a target network application; wherein the theme color setting instruction includes a theme color initialization instruction and a theme color switching instruction;

[0007] Acquire the logic file and theme color setting plug-in of the target network application, and extract theme color configuration parameters in the theme color setting plug-in that match the theme color setting instruction;

[0008] According to the theme color setting method preset in the logic file, the theme color data in the cascading style sheet file of the target network application is replaced with the theme color configuration parameters.

[0009] Further, extracting the theme color configuration parameters matching the theme color setting instruction in the theme color setting plug-in includes:

[0010] Calling an application programming interface corresponding to the target network application;

[0011] The theme color configuration parameters matching the theme color setting instruction in the theme color setting plug-in are extracted through the application programming interface.

[0012] Furthermore, the theme color setting method preset in the logic file includes a theme color initialization method, and according to the theme color setting method preset in the logic file, the theme color data in the cascading style sheet file of the target network application is replaced with the theme color configuration parameters, including:

[0013] In response to the theme color initialization instruction, calling the theme color initialization method;

[0014] Extracting the cascading style sheet file corresponding to the target network application program through the theme color initialization method;

[0015] The theme color data in the cascading style sheet file is replaced with the default color data in the theme color configuration parameters.

[0016] Furthermore, the theme color setting method preset in the logic file includes a theme color switching method, and according to the theme color setting method preset in the logic file, the theme color data in the cascading style sheet file of the target network application is replaced with the theme color configuration parameter, including:

[0017] In response to the theme color switching instruction, determining target color data in the theme color configuration parameters;

[0018] Calling the theme color switching method, and extracting the cascading style sheet file corresponding to the target network application through the theme color switching method;

[0019] The theme color data in the cascading style sheet file is replaced with the target color data.

[0020] Furthermore, before responding to the theme color setting instruction of the target network application, it also includes:

[0021] Register the logic file and the theme color setting plug-in corresponding to the target network application.

[0022] Further, registering the logic file and the theme color setting plug-in corresponding to the target network application includes:

[0023] Determine the theme color setting method in the logic file;

[0024] Determine the theme color configuration parameter in the theme color setting plug-in, wherein the theme color configuration parameter is in an array format, and each value in the array corresponds to different color data.

[0025] According to another aspect of the present invention, a device for setting a theme color is provided, comprising:

[0026] A theme color setting instruction response module, used to respond to a theme color setting instruction of a target network application; wherein the theme color setting instruction includes a theme color initialization instruction and a theme color switching instruction;

[0027] A theme color configuration parameter extraction module is used to obtain the logic file and theme color setting plug-in of the target network application, and extract the theme color configuration parameters in the theme color setting plug-in that match the theme color setting instruction;

[0028] The theme color configuration parameter replacement module is used to replace the theme color data in the cascading style sheet file of the target network application with the theme color configuration parameter according to the theme color setting method preset in the logic file.

[0029] Optionally, the theme color configuration parameter extraction module is also used to:

[0030] Calling an application programming interface corresponding to the target network application;

[0031] The theme color configuration parameters matching the theme color setting instruction in the theme color setting plug-in are extracted through the application programming interface.

[0032] Optionally, the theme color setting method preset in the logic file includes a theme color initialization method, and the theme color configuration parameter replacement module is further used to:

[0033] In response to the theme color initialization instruction, calling the theme color initialization method;

[0034] Extracting the cascading style sheet file corresponding to the target network application program through the theme color initialization method;

[0035] The theme color data in the cascading style sheet file is replaced with the default color data in the theme color configuration parameters.

[0036] Optionally, the theme color setting method preset in the logic file includes a theme color switching method, and the theme color configuration parameter replacement module is further used to:

[0037] In response to the theme color switching instruction, determining target color data in the theme color configuration parameters;

[0038] Calling the theme color switching method, and extracting the cascading style sheet file corresponding to the target network application through the theme color switching method;

[0039] The theme color data in the cascading style sheet file is replaced with the target color data.

[0040] Optionally, the device further comprises a logic file and theme color setting plug-in registration module, which is used to register the logic file and the theme color setting plug-in corresponding to the target network application.

[0041] Optionally, the logic file and theme color setting plug-in registration module are also used to:

[0042] Determine the theme color setting method in the logic file;

[0043] Determine the theme color configuration parameter in the theme color setting plug-in, wherein the theme color configuration parameter is in an array format, and each value in the array corresponds to different color data.

[0044] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0045] at least one processor; and

[0046] a memory communicatively connected to the at least one processor; wherein,

[0047] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for setting the theme color described in any embodiment of the present invention.

[0048] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for setting a theme color described in any embodiment of the present invention when executed.

[0049] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program / instruction, and the computer program / instruction, when executed by a processor, implements the steps of the method for setting a theme color described in any embodiment of the present invention.

[0050] The method for setting a theme color disclosed in the present invention first responds to a theme color setting instruction of a target network application; wherein the theme color setting instruction includes a theme color initialization instruction and a theme color switching instruction; then the logic file and the theme color setting plug-in of the target network application are obtained, and the theme color configuration parameters matching the theme color setting instruction in the theme color setting plug-in are extracted; finally, according to the theme color setting method preset in the logic file, the theme color data in the cascading style sheet file of the target network application is replaced with the theme color configuration parameters. The method for setting a theme color disclosed in the present invention can reduce the repetitive work of front-end engineers, reduce the application maintenance cost, and perform more abundant and diverse theme color settings by configuring relevant parameters in the theme color setting plug-in and presetting relevant methods in the logic file.

[0051] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0053] Figure 1 is a flow chart of a method for setting a theme color provided according to Embodiment 1 of the present invention;

[0054] Figure 2 is a flow chart of a method for setting a theme color provided according to Embodiment 2 of the present invention;

[0055] Figure 3 is a structural schematic diagram of a theme color setting device provided according to Embodiment 3 of the present invention;

[0056] Figure 4 It is a structural schematic diagram of an electronic device for implementing the method for setting a theme color according to the fourth embodiment of the present invention. DETAILED DESCRIPTION

[0057] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0058] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0059] Embodiment 1

[0060] Figure 1 This is a flowchart of a method for setting a theme color provided in the first embodiment of the present invention. This embodiment is applicable to the case of customizing the theme color of a network application. The method can be executed by a theme color setting device. The theme color setting device can be implemented in the form of hardware and / or software. The theme color setting device can be configured in an electronic device. Figure 1 As shown, the method includes:

[0061] S110, responding to a theme color setting instruction of a target network application.

[0062] The theme color setting instruction includes a theme color initialization instruction and a theme color switching instruction.

[0063] In this embodiment, the target network application is a web application currently performing theme color setting, which is an application based on Internet technology and provides various information services to users through a browser and Internet connection. The theme color setting instruction is an instruction for the user of the target network application to set the theme color of the target network application through an operation in the target network application.

[0064] Preferably, when the user enters the target network application for the first time, a theme color initialization instruction is triggered to set the target network application to the default color; after the theme color initialization instruction is executed, if the user makes changes to the theme color, a theme color switching instruction can be issued by operating a preset theme color setting tool in the target network application.

[0065] S120: Acquire the logic file and theme color setting plug-in of the target network application, and extract theme color configuration parameters in the theme color setting plug-in that match the theme color setting instruction.

[0066] Among them, the logic file is a very important configuration file in the Web application, which can store the configuration information of the Web application, including various configuration items of the application. The theme color setting plug-in is an additional program running in the browser, which is used to provide the theme color setting function of the Web application. The theme color configuration parameter is the specific theme color data in the theme color setting plug-in, such as the theme color value.

[0067] In this embodiment, the logic file of the target network application is written in the script directory (js directory), which contains a file (themeColorClient.js) for setting the theme color and a specific theme color setting method. The parameters corresponding to the theme color can be preset in the theme color setting plug-in of the target network application, wherein the main configuration parameter is matchColors. The logic file and the theme color setting plug-in of the target network application can extract the theme color configuration parameters corresponding to the theme color setting instruction from the theme color setting plug-in through the theme color setting method in the logic file. For example, if the theme color setting instruction is to change the theme color to red, then according to the instruction, the color value of red in the theme color setting plug-in can be extracted through the theme color setting method in the logic file.

[0068] Furthermore, by setting the corresponding parameters in the theme color setting plug-in of the target network application, the theme color of the target network application can be set to multiple colors, and the color of each partition can be set separately according to the different functional partitions in the interface of the target network application. The theme color can also be set to a variety of color display modes such as gradient and splicing.

[0069] Preferably, the parameter format in the theme color setting plug-in of the target network application is an array format.

[0070] S130 . According to a theme color setting method preset in the logic file, the theme color data in the cascading style sheet file of the target network application is replaced with theme color configuration parameters.

[0071] Among them, the Cascading Style Sheets (CSS) file is a text file written using the grammatical rules specified by CSS. It is a file used in conjunction with the HTML language to create web pages. HTML is used to write the content of the page, and CSS will determine how the content should be presented on the page.

[0072] In this embodiment, the CSS file contains theme color data, which determines the theme color display of the target network application. After extracting the theme color configuration parameters that match the theme color setting instruction in the theme color setting plug-in, the theme color data related to the theme color setting in the CSS file can be replaced with the theme color configuration parameters through the theme color setting method preset in the logic file. Since the theme color configuration parameters match the theme color setting instruction, after completing the replacement of the theme color configuration parameters, the theme color display of the target network application can be made to match the theme color setting instruction through the CSS file.

[0073] Specifically, when replacing the CSS file, the theme color data in the requested CSS file can be extracted and placed in the style tag of the page, and then the CSS content of the style tag is read, replaced according to the regular matching, and reassigned to the theme color configuration parameters that match the theme color setting instruction to complete the color replacement. In this way, when completing the theme color setting of the target network application, it is possible to avoid affecting other custom modified styles.

[0074] Furthermore, before responding to the theme color setting instruction of the target network application, you can also:

[0075] Register the logic files and theme color setting plug-in corresponding to the target network application.

[0076] In this embodiment, in order to set the theme color of the target network application, before responding to the theme color setting instruction, the plug-ins and logic files related to the theme color setting can be registered first, thereby presetting the default theme color of the target network application and providing users with selectable theme color options.

[0077] Optionally, the method for registering the logic file and theme color setting plug-in corresponding to the target network application can be: determining the theme color setting method in the logic file; determining the theme color configuration parameters in the theme color setting plug-in, wherein the theme color configuration parameters are in array format, and each value in the array corresponds to different color data.

[0078] Specifically, for the logic file, a logic file (themeColorClient.js) for switching the theme color can be written in the js directory of the target web application. The js directory of the web application is usually a subdirectory under the root directory, which is used to store JavaScript files to improve the maintainability and readability of the code. The logic file includes theme color setting methods, such as the initThemeColor method, the changeThemeColor method, etc., wherein the initThemeColor method can be used to initialize the theme color, and the changeThemeColor method can be used to switch the theme color.

[0079] For the theme color setting plug-in, the default theme color of the target network application and the color values ​​of the theme color that can be selected can be preset by setting the theme color configuration parameters therein. Preferably, the main configuration parameter in the theme color setting plug-in is matchColors, and the format of the theme color configuration parameters is an array format. By setting different color values ​​in the array, the theme color display mode of the target network application can be enriched. For example, the theme color of the target network application can be set to multiple colors, and the color of each partition can be set separately according to the different functional partitions in the interface of the target network application. The theme color can also be set to a variety of color display modes such as gradient and splicing.

[0080] The method for setting a theme color disclosed in the present invention first responds to a theme color setting instruction of a target network application; wherein the theme color setting instruction includes a theme color initialization instruction and a theme color switching instruction; then the logic file and the theme color setting plug-in of the target network application are obtained, and the theme color configuration parameters matching the theme color setting instruction in the theme color setting plug-in are extracted; finally, according to the theme color setting method preset in the logic file, the theme color data in the cascading style sheet file of the target network application is replaced with the theme color configuration parameters. The method for setting a theme color disclosed in the present invention can reduce the repetitive work of front-end engineers, reduce the application maintenance cost, and perform more abundant and diverse theme color settings by configuring relevant parameters in the theme color setting plug-in and presetting relevant methods in the logic file.

[0081] Embodiment 2

[0082] Figure 2 Flow chart of a method for setting a theme color provided in Embodiment 2 of the present invention. This embodiment is a refinement of the above embodiment. Figure 2 As shown, the method includes:

[0083] S210, responding to a theme color setting instruction of a target network application.

[0084] The theme color setting instruction includes a theme color initialization instruction and a theme color switching instruction.

[0085] In this embodiment, when the user enters the target network application for the first time, a theme color initialization instruction can be triggered to set the target network application to the default color; after the theme color initialization instruction is executed, if the user changes the theme color, a theme color switching instruction can be issued by operating a preset theme color setting tool in the target network application. By responding to different theme color setting instructions, corresponding theme color initialization and theme color switching operations can be performed.

[0086] S220: Obtain the logic file and theme color setting plug-in of the target network application, and call the application programming interface corresponding to the target network application.

[0087] Among them, the Application Programming Interface (API) is a bridge connecting the front and back ends of network applications, which can provide a channel for data interaction. Specifically, it is some pre-defined functions. The purpose is to provide applications and developers with the ability to access a set of routines based on certain software or hardware without having to access the source code or understand the details of the internal working mechanism.

[0088] In this embodiment, in order to set the theme color for the target network application, after responding to the theme color setting instruction of the target network application, the preset logic file and theme color setting plug-in in the target network application can be obtained, and the API interface corresponding to the target network application can be called to further extract the theme color configuration parameters required for the theme color setting through the API interface.

[0089] S230: extracting theme color configuration parameters matching the theme color setting instruction in the theme color setting plug-in through an application programming interface.

[0090] In this embodiment, the theme color setting plug-in of the target network application can preset parameters corresponding to the theme color, wherein the main configuration parameter is matchColors. If the API interface call is successful, the theme color configuration parameters corresponding to the theme color setting instruction are extracted from the theme color setting plug-in through the API interface.

[0091] S240: According to the theme color setting method preset in the logic file, the theme color data in the cascading style sheet file of the target network application is replaced with the theme color configuration parameters.

[0092] The theme color setting method preset in the logic file includes a theme color initialization method and a theme color switching method.

[0093] For the theme color initialization instruction, according to the preset theme color setting method in the logic file, the method of replacing the theme color data in the cascading style sheet file of the target network application with the theme color configuration parameters can be: in response to the theme color initialization instruction, calling the theme color initialization method; extracting the cascading style sheet file corresponding to the target network application through the theme color initialization method; replacing the theme color data in the cascading style sheet file with the default color data in the theme color configuration parameters.

[0094] Specifically, when a user logs in to the target network application for the first time, the theme color initialization instruction can be automatically triggered. At this time, the theme color configuration parameters obtained from the theme color setting plug-in that match the theme color setting instruction are the default color data, that is, the theme color value set by default for the target network application. The target network application can call the theme color initialization method (initThemeColor) in the logic file, extract the Cascading Style Sheets (CSS) file corresponding to the target network application, and then replace the theme color data therein with the default color data extracted from the theme color setting plug-in that matches the theme color initialization instruction, and finally perform theme color rendering to complete the theme color initialization.

[0095] For a theme color switching instruction, according to a preset theme color setting method in a logic file, a method for replacing theme color data in a cascading style sheet file of a target network application with theme color configuration parameters may be: in response to a theme color switching instruction, determining target color data in the theme color configuration parameters; calling a theme color switching method, and extracting a cascading style sheet file corresponding to the target network application through the theme color switching method; and replacing the theme color data in the cascading style sheet file with the target color data.

[0096] Specifically, the user can actively initiate a theme color switching instruction to change the theme color of the target network application by clicking the theme color switching button on the page and performing operations such as color selection. At this time, the theme color configuration parameters that match the theme color setting instruction obtained from the theme color setting plug-in are the target color data, that is, the color value of the theme color that the user wants to change. The target network application responds to the theme color switching instruction and can determine the target color data corresponding to the theme color switching instruction, and then introduces a logic file (themeColorClient.js) in the HTML file of the target network application, and calls the theme color switching method (changeThemeColor) therein, extracts the Cascading Style Sheets (CSS) file corresponding to the target network application, and then replaces the theme color data therein with the target color data that matches the theme color switching instruction extracted from the theme color setting plug-in, and completes the theme color switching.

[0097] The method for setting theme colors provided by the present invention can reduce the repetitive work of front-end engineers, reduce application maintenance costs, and perform more diverse theme color settings by configuring relevant parameters in a theme color setting plug-in and presetting relevant methods in a logic file. In addition, according to different theme color setting instructions, corresponding theme color setting methods are adopted to achieve real-time switching of theme colors, thereby improving the research and development efficiency of network applications.

[0098] Embodiment 3

[0099] Figure 3 This is a schematic diagram of a device for setting a theme color provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: a theme color setting instruction response module 310 , a theme color configuration parameter extraction module 320 and a theme color configuration parameter replacement module 330 .

[0100] The theme color setting instruction response module 310 is used to respond to the theme color setting instruction of the target network application.

[0101] The theme color setting instruction includes a theme color initialization instruction and a theme color switching instruction.

[0102] The theme color configuration parameter extraction module 320 is used to obtain the logic file and theme color setting plug-in of the target network application, and extract the theme color configuration parameters matching the theme color setting instruction in the theme color setting plug-in.

[0103] The theme color configuration parameter replacement module 330 is used to replace the theme color data in the cascading style sheet file of the target network application with the theme color configuration parameters according to the theme color setting method preset in the logic file.

[0104] Optionally, the theme color configuration parameter extraction module 320 is further used for:

[0105] Calling the application programming interface corresponding to the target network application; extracting the theme color configuration parameters matching the theme color setting instruction in the theme color setting plug-in through the application programming interface.

[0106] Optionally, the theme color setting method preset in the logic file includes a theme color initialization method, and the theme color configuration parameter replacement module 330 is further used to:

[0107] In response to the theme color initialization instruction, a theme color initialization method is called; a cascading style sheet file corresponding to the target network application is extracted through the theme color initialization method; and the theme color data in the cascading style sheet file is replaced with the default color data in the theme color configuration parameters.

[0108] Optionally, the theme color setting method preset in the logic file includes a theme color switching method, and the theme color configuration parameter replacement module 330 is further used to:

[0109] In response to the theme color switching instruction, the target color data in the theme color configuration parameters is determined; the theme color switching method is called, and the cascading style sheet file corresponding to the target network application is extracted through the theme color switching method; the theme color data in the cascading style sheet file is replaced with the target color data.

[0110] Optionally, the device further comprises a logic file and theme color setting plug-in registration module 340, which is used to register the logic file and theme color setting plug-in corresponding to the target network application.

[0111] Optionally, the logic file and theme color setting plug-in registration module 340 is also used to:

[0112] Determine the theme color setting method in the logic file; determine the theme color configuration parameters in the theme color setting plug-in, wherein the theme color configuration parameters are in array format, and each value in the array corresponds to different color data.

[0113] The theme color setting device provided in the embodiment of the present invention can execute the theme color setting method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0114] Embodiment 4

[0115] Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0116] like Figure 4As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0117] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0118] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for setting a theme color.

[0119] In some embodiments, the method for setting the theme color may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of setting the theme color described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method for setting the theme color in any other appropriate manner (e.g., by means of firmware).

[0120] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0121] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0122] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0123] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0124] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0125] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0126] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0127] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for setting a theme color, characterized in that: include: Responding to a theme color setting instruction of a target network application; wherein the theme color setting instruction includes a theme color initialization instruction and a theme color switching instruction; Acquire the logic file and theme color setting plug-in of the target network application, and extract theme color configuration parameters in the theme color setting plug-in that match the theme color setting instruction; According to the theme color setting method preset in the logic file, the theme color data in the cascading style sheet file of the target network application is replaced with the theme color configuration parameters.

2. The method according to claim 1, characterized in that Extracting the theme color configuration parameters matching the theme color setting instruction in the theme color setting plug-in includes: Calling an application programming interface corresponding to the target network application; The theme color configuration parameters matching the theme color setting instruction in the theme color setting plug-in are extracted through the application programming interface.

3. The method according to claim 1, characterized in that The theme color setting method preset in the logic file includes a theme color initialization method, and according to the theme color setting method preset in the logic file, the theme color data in the cascading style sheet file of the target network application is replaced with the theme color configuration parameters, including: In response to the theme color initialization instruction, calling the theme color initialization method; Extracting the cascading style sheet file corresponding to the target network application program through the theme color initialization method; The theme color data in the cascading style sheet file is replaced with the default color data in the theme color configuration parameters.

4. The method according to claim 1, characterized in that: The theme color setting method preset in the logic file includes a theme color switching method, and according to the theme color setting method preset in the logic file, the theme color data in the cascading style sheet file of the target network application is replaced with the theme color configuration parameters, including: In response to the theme color switching instruction, determining target color data in the theme color configuration parameters; Calling the theme color switching method, and extracting the cascading style sheet file corresponding to the target network application through the theme color switching method; The theme color data in the cascading style sheet file is replaced with the target color data.

5. The method according to claim 1, characterized in that Before responding to the target web application's theme color setting instruction, it also includes: Register the logic file and the theme color setting plug-in corresponding to the target network application.

6. The method according to claim 5, characterized in that Registering the logic file and the theme color setting plug-in corresponding to the target network application includes: Determine the theme color setting method in the logic file; Determine the theme color configuration parameter in the theme color setting plug-in, wherein the theme color configuration parameter is in an array format, and each value in the array corresponds to different color data.

7. A device for setting a theme color, characterized in that: include: A theme color setting instruction response module, used to respond to a theme color setting instruction of a target network application; wherein the theme color setting instruction includes a theme color initialization instruction and a theme color switching instruction; A theme color configuration parameter extraction module is used to obtain the logic file and theme color setting plug-in of the target network application, and extract the theme color configuration parameters in the theme color setting plug-in that match the theme color setting instruction; The theme color configuration parameter replacement module is used to replace the theme color data in the cascading style sheet file of the target network application with the theme color configuration parameter according to the theme color setting method preset in the logic file.

8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for setting the theme color according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for setting a theme color according to any one of claims 1 to 6 when the processor executes the instructions.

10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method for setting a theme color according to any one of claims 1 to 6 are implemented.