CN113190152A - Method and device for switching application program theme - Google Patents

Method and device for switching application program theme Download PDF

Info

Publication number
CN113190152A
CN113190152A CN202110453166.9A CN202110453166A CN113190152A CN 113190152 A CN113190152 A CN 113190152A CN 202110453166 A CN202110453166 A CN 202110453166A CN 113190152 A CN113190152 A CN 113190152A
Authority
CN
China
Prior art keywords
theme
color
target
switching
area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110453166.9A
Other languages
Chinese (zh)
Inventor
王超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Wodong Tianjun Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN202110453166.9A priority Critical patent/CN113190152A/en
Publication of CN113190152A publication Critical patent/CN113190152A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Color Image Communication Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a method and a device for switching application program themes, and relates to the technical field of mobile terminals. One embodiment of the method comprises: responding to a theme switching instruction, and determining a theme switching area and a target theme color selected by a user; determining whether the target theme color exists in a preset theme configuration file or not; if not, acquiring a default theme, determining a to-be-switched area in the default theme according to the theme switching area, and switching the color of the to-be-switched area to the color of the target theme to obtain a target theme; and loading the target theme to switch the current theme of the application program. According to the embodiment, when the theme is replaced, the default theme background color is replaced by analyzing and processing the picture pixels through the client application program without the participation of a server, so that the quick and convenient customized theme is realized.

Description

Method and device for switching application program theme
Technical Field
The invention relates to the technical field of mobile terminals, in particular to a method and a device for switching application program themes.
Background
The theme of the APP (Application) is to improve user experience, so that a user can customize an important function of the APP, and the theme is usually realized by switching a set of pictures with different colors or different shapes by using colors and pictures as main technical means. At present, most methods for switching themes by lightweight APP place a plurality of theme picture groups with different colors and different styles on a server. When the user switches the theme, the picture group is downloaded from the server to the APP to be displayed, and then the color of the characters is changed. The theme switching mode does not change the shape of the picture per se, and only uniformly modifies the background color of the picture group. This approach requires a technical means of client and server, which not only occupies server resources, but also complicates the solution due to the interaction between the server and the client.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for switching application themes, so that when a theme is changed, the change of a default theme background color is completed through the analysis processing of a picture pixel by a client application itself without the participation of a server, thereby implementing a fast and convenient theme customization.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a method for switching an application theme, including:
responding to a theme switching instruction, and determining a theme switching area and a target theme color selected by a user;
determining whether the target theme color exists in a preset theme configuration file or not;
if not, acquiring a default theme, determining a to-be-switched area in the default theme according to the theme switching area, and switching the color of the to-be-switched area to the color of the target theme to obtain a target theme;
and loading the target theme to switch the current theme of the application program.
Optionally, the theme switching area includes the current entire theme or one or more pictures of the current theme.
Optionally, the method further comprises: and if the target theme color exists in the preset theme configuration file, loading a theme corresponding to the target theme color according to the theme switching area so as to switch the current theme of the application program.
Optionally, in response to the theme switching instruction, determining the target theme color selected by the user includes: in response to a theme switching instruction, displaying a color extractor tool and a plurality of candidate colors; and responding to the operation that a user selects a color from the candidate colors through the color selector tool, and taking the color selected by the user as the target theme color selected by the user.
Optionally, the theme profile includes theme picture background color values;
determining whether the target theme color exists in the preset theme configuration file comprises the following steps: determining a color value of the target theme color; and determining whether the target theme color exists in a preset theme configuration file or not according to the background color value of the theme picture and the color value of the target theme color included in the theme configuration file.
Optionally, the theme profile further includes one or more of the following information: topic name, topic group of pictures path and state.
Optionally, switching the color of the region to be switched to the target theme color to obtain the target theme includes: converting the picture of the area to be switched into a bitmap; for each pixel of the bitmap, switching the color value of the pixel to the color value of the target subject color; generating a target picture after completing the pixel conversion of the bitmap; and exporting the target picture to obtain the target theme.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided an apparatus for switching application themes, including:
the first determining module is used for responding to the theme switching instruction and determining the theme switching area and the target theme color selected by the user;
the second determining module is used for determining whether the target theme color exists in a preset theme configuration file or not;
a generating module, configured to obtain a default theme when the target theme color does not exist in the preset theme configuration file, determine a to-be-switched area in the default theme according to the theme switching area, and switch the color of the to-be-switched area to the target theme color to obtain a target theme;
and the switching module is used for loading the target theme so as to switch the current theme of the application program.
Optionally, the switching module is further configured to: and if the target theme color exists in the preset theme configuration file, loading a theme corresponding to the target theme color so as to switch the current theme of the application program.
Optionally, the theme switching area includes the current entire theme or one or more pictures of the current theme.
The first determination module is further to: in response to a theme switching instruction, displaying a color extractor tool and a plurality of candidate colors; and responding to the operation that a user selects a color from the candidate colors through the color selector tool, and taking the color selected by the user as the target theme color selected by the user.
Optionally, the theme profile includes theme picture background color values;
the second determination module is further to: determining a color value of the target theme color; and determining whether the target theme color exists in a preset theme configuration file or not according to the background color value of the theme picture and the color value of the target theme color included in the theme configuration file.
Optionally, the theme profile further includes one or more of the following information: topic name, topic group of pictures path and state.
The generation module is further to: converting the picture of the area to be switched into a bitmap; for each pixel of the bitmap, switching the color value of the pixel to the color value of the target subject color; generating a target picture after completing the pixel conversion of the bitmap; and exporting the target picture to obtain the target theme.
To achieve the above object, according to still another aspect of an embodiment of the present invention, there is provided an electronic apparatus including: one or more processors; the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the method for switching the application program theme according to the embodiment of the invention.
To achieve the above object, according to still another aspect of the embodiments of the present invention, there is provided a computer-readable medium on which a computer program is stored, the program implementing the method for switching application program themes of the embodiments of the present invention when executed by a processor.
One embodiment of the above invention has the following advantages or benefits: determining a theme switching area and a target theme color selected by a user by responding to a theme switching instruction; determining whether the target theme color exists in a preset theme configuration file or not; if not, acquiring a default theme, determining a to-be-switched area in the default theme according to the theme switching area, and switching the color of the to-be-switched area to the color of the target theme to obtain a target theme; the technical means of loading the target theme to switch the current theme of the application program realizes that the background color of the default theme is changed by analyzing and processing the picture pixels by the application program of the client side without the participation of a server when the theme is changed, thereby realizing the quick and convenient user-defined theme.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a schematic diagram of a main flow of a method of switching application themes according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating the use of a default theme in a method for switching application themes according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a main flow of a method for switching application themes according to another embodiment of the present invention;
FIG. 4 is a diagram illustrating the main modules of an apparatus for switching application themes according to an embodiment of the present invention;
FIG. 5 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
fig. 6 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server of an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of a main flow of a method for switching an application theme according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
step S101: responding to a theme switching instruction, and determining a theme switching area and a target theme color selected by a user;
step S102: determining whether the target theme color exists in a preset theme configuration file or not;
step S103: if the target theme color does not exist in the preset theme configuration file, acquiring a default theme, determining a to-be-switched area in the default theme according to the theme switching area, and switching the color of the to-be-switched area to the target theme color to obtain a target theme;
step S104: and loading the target theme to switch the current theme of the application program.
Step S105: and if the target theme color exists in the preset theme configuration file, loading a theme corresponding to the target theme color according to the theme switching area so as to switch the current theme of the application program.
For step S101, the theme switching area includes the current entire theme or one or more pictures of the current theme. That is, the color of the whole theme can be switched in this embodiment, and the color of the partial picture of the current theme can also be switched separately. In actual use, the function button for switching the theme can be displayed in the application program, and if the fact that the user clicks the function button for switching the theme is detected, a theme switching instruction is generated. That is, the user can start switching the theme by clicking the function button for switching the theme. Further, a function button for switching the entire theme and a function button for switching a part of the theme may be included in the application, and switching of different areas is realized by these function buttons. Specifically, if the user clicks a function button for switching the entire theme, a first theme switching instruction is generated, and the first theme switching instruction may include the name of the current theme. According to the first theme instruction, the theme switching area can be determined as the whole theme. If the user clicks a function button for switching part of the themes, the pictures contained in the current theme are displayed, the user selects the pictures with the colors to be switched through clicking operation, and after the fact that the user finishes the selecting operation is detected, a second theme switching instruction is generated, wherein the second theme switching instruction can comprise identification information (such as a number or a name) of the pictures selected by the user. And determining the theme switching area as one or more pictures of the current theme according to the second theme switching instruction. In an alternative embodiment, the color of a picture needs to be switched may also be determined by pressing the picture in a long way. Specifically, if it is detected that the user presses a certain picture for a long time, a prompt box for confirming switching of the picture color is displayed, if the user clicks to confirm, it is determined that the picture color needs to be switched, and a theme switching instruction including identification information of the picture is generated.
In this embodiment, after the theme switching instruction is generated, the color extractor tool and a plurality of candidate colors may be displayed in response to the theme switching instruction; and after detecting the operation of selecting the color from the candidate colors by the user through the color selector tool, responding to the color selection operation, and taking the color selected by the user as the target theme color selected by the user.
For step S102, the preset theme profile includes a set of default theme pictures, and the pictures are characterized by the same background color. The theme profile is a description of a theme, and as shown in table 1 below, the theme profile may include a theme name (character string), a theme picture group path (character string), a background color value (e.g., hexadecimal color value) of the theme picture, and a status.
Table 1:
Figure BDA0003039557210000071
wherein the state includes enabled and not enabled, and the state can be represented by a boolean variable (BOOL). The theme profile may be pre-placed in the database of the application. The theme profile may be in a key-value (key value pair) format, where key represents a theme name and value represents configuration information of the theme.
Because the theme configuration file comprises the background color value of the theme picture, whether the target theme color exists in the theme configuration file can be judged according to the color value, and the method specifically comprises the following steps: determining a color value of the target theme color; and determining whether the target theme color exists in a preset theme configuration file or not according to the background color value of the theme picture and the color value of the target theme color included in the theme configuration file.
For steps S103-S104, if the target theme color does not exist in the theme configuration file, the default theme is obtained, and the to-be-switched area of the default theme is determined according to the theme switching area. When the theme-switching area is the entire theme, the area to be switched of the default theme is the entire default theme. When the theme switching area is one or more pictures of the current theme, the area to be switched of the default theme is a picture corresponding to the one or more pictures in the default theme. And after the area to be switched is determined, switching the color of the picture of the area to be switched into the target theme color to obtain the target theme. Specifically, the picture of the area to be switched may be converted into a bitmap; for each pixel of the bitmap, switching the color value of the pixel to the color value of the target subject color; generating a target picture after completing the pixel conversion of the bitmap; and exporting the target picture to obtain the target theme. The bitmap is also called a dot matrix image or a raster image, and is composed of pixels. And (4) performing the same treatment on all pictures of the area to be switched, and generating a new picture and exporting the new picture to a new folder after all pixels of the area to be switched are switched. The new folder is added to the theme profile and saved as shown in table 2 below. And after the target theme is obtained, loading the target theme to complete theme switching.
Table 2:
Figure BDA0003039557210000081
for step S105, if the target theme color exists in the preset theme configuration file, loading a theme corresponding to the target theme color according to the theme switching area, so as to switch the current theme of the application program. And when the theme switching area is the whole theme, loading all pictures of the theme corresponding to the target theme color. And when the theme switching area is one or more pictures, loading the pictures corresponding to the one or more pictures in the theme corresponding to the target theme color. When the pictures are loaded, the storage positions of the pictures can be determined according to the theme picture group path in the theme configuration file.
According to the method for switching the application program theme, the theme switching area and the target theme color selected by the user are determined by responding to the theme switching instruction; determining whether the target theme color exists in a preset theme configuration file or not; if not, acquiring a default theme, determining a to-be-switched area in the default theme according to the theme switching area, and switching the color of the to-be-switched area to the color of the target theme to obtain a target theme; the technical means of loading the target theme to switch the current theme of the application program realizes that the background color of the default theme is changed by analyzing and processing the picture pixels by the application program of the client side without the participation of a server when the theme is changed, thereby realizing the quick and convenient user-defined theme.
In an alternative embodiment, the method may also delete some topics in the topic profile in response to a delete operation by the user to avoid performance being affected by the topic profile being too large.
FIG. 2 is a flow chart of a method of using a default theme of an embodiment of the invention. Fig. 3 is a flowchart of a method for switching application themes according to an embodiment of the present invention.
As shown in fig. 2, a default set of theme pictures may be pre-placed in the APP, and these pictures are characterized by the same background color. Then, a theme configuration file in a Key-Value pair (Key-Value) format is stored in the APP database. The configuration file is used for describing the theme and comprises a theme name (character string), a theme picture group path (character string), a theme picture background color value (hexadecimal color) and an enabling state (BOOL value), when the APP is used as a default theme after being installed, the APP finds and analyzes the theme configuration file at the moment, finds a picture group path pointed by the default theme, and then displays the picture group in the APP according to the using position of the picture group. This completes the display of the default theme.
As shown in fig. 3, when the user modifies the theme color of the APP (assuming that the user modifies the color of the current entire theme), the user is allowed to select a desired theme color through the color picker. The color selector can have a plurality of implementation methods, a simple method can be used for internally setting a plurality of colors, and after a user selects one color, the color value is transmitted to the next step for use. After the new theme color is confirmed, firstly searching in the APP theme configuration file according to the existing theme to see whether the new theme color exists, and carrying out different processing according to the existence condition:
1) and if the new theme color exists in the theme configuration file, acquiring the existing picture path of the theme, and adding or updating the parameter of the new theme to the APP theme configuration file and storing the parameter (if the parameter is updated, only the parameter is required to be updated or not started).
2) If the theme color does not exist in the theme configuration file, the background color value (hereinafter referred to as default background color) of the default theme picture and the default theme picture group (hereinafter referred to as default picture group) are obtained through the APP theme configuration file. Then, each default picture is analyzed; the method comprises the steps of converting a picture into a BitMap (BitMap), analyzing each pixel one by one, and changing all pixels with the colors being old background color values into new theme color values. And generating and exporting a new picture to a new folder after all pixels of the picture are analyzed. And all pictures of the old picture group are processed in the same way in turn. The theme pictures used by the APP are completely replaced by the corresponding pictures in the new theme folder, and then all pages of the APP are refreshed to be displayed, so that the picture switching of the new theme is completed.
According to the method for switching the theme of the application program, when the theme is changed, the default theme background color is changed by analyzing and processing the picture pixels through the client side application program without the participation of a server, so that the theme can be quickly and conveniently customized.
Fig. 4 is a schematic diagram of main modules of an apparatus 400 for switching application themes according to an embodiment of the present invention, and as shown in fig. 4, the apparatus 400 for switching application themes includes:
a first determining module 401, configured to determine, in response to a theme switching instruction, a theme switching area and a target theme color selected by a user;
a second determining module 402, configured to determine whether the target theme color exists in a preset theme profile;
a generating module 403, configured to obtain a default theme when the target theme color does not exist in the preset theme configuration file, determine a to-be-switched area in the default theme according to the theme switching area, and switch the color of the to-be-switched area to the target theme color to obtain a target theme;
a switching module 404, configured to load the target theme to switch the current theme of the application.
Optionally, the theme switching area includes the current entire theme or one or more pictures of the current theme.
Optionally, the switching module 404 is further configured to load a theme corresponding to the target theme color according to the theme switching area if the target theme color exists in the preset theme configuration file, so as to switch the current theme of the application program.
Optionally, the first determining module 401 is further configured to: in response to a theme switching instruction, displaying a color extractor tool and a plurality of candidate colors; and responding to the operation that a user selects a color from the candidate colors through the color selector tool, and taking the color selected by the user as the target theme color selected by the user.
Optionally, the theme profile includes theme picture background color values;
the second determining module 402 is further configured to: determining a color value of the target theme color; and determining whether the target theme color exists in a preset theme configuration file or not according to the background color value of the theme picture and the color value of the target theme color included in the theme configuration file.
Optionally, the theme profile further includes one or more of the following information: topic name, topic group of pictures path and state.
Optionally, the generating module 404 is further configured to: converting the picture of the area to be switched into a bitmap; for each pixel of the bitmap, switching the color value of the pixel to the color value of the target subject color; generating a target picture after completing the pixel conversion of the bitmap; and exporting the target picture to obtain the target theme.
According to the device for switching the application program theme, the theme switching area and the target theme color selected by the user are determined by responding to the theme switching instruction; determining whether the target theme color exists in a preset theme configuration file or not; if not, acquiring a default theme, determining a to-be-switched area in the default theme according to the theme switching area, and switching the color of the to-be-switched area to the color of the target theme to obtain a target theme; the technical means of loading the target theme to switch the current theme of the application program realizes that the background color of the default theme is changed by analyzing and processing the picture pixels by the application program of the client side without the participation of a server when the theme is changed, thereby realizing the quick and convenient user-defined theme.
The device can execute the method provided by the embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
Fig. 5 shows an exemplary system architecture 500 of a method for switching application themes or an apparatus for switching application themes, to which an embodiment of the present invention may be applied.
As shown in fig. 5, the system architecture 500 may include terminal devices 501, 502, 503, a network 504, and a server 505. The network 504 serves to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. Network 504 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 501, 502, 503 to interact with a server 505 over a network 504 to receive or send messages or the like. The terminal devices 501, 502, 503 may have various communication client applications installed thereon, such as a shopping application, a web browser application, a search application, an instant messaging tool, a mailbox client, social platform software, and the like.
The terminal devices 501, 502, 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 505 may be a server that provides various services, such as a background management server that supports shopping websites browsed by users using the terminal devices 501, 502, 503. The background management server may analyze and perform other processing on the received data such as the product information query request, and feed back a processing result (e.g., target push information and product information) to the terminal device.
It should be noted that the method for switching the application theme provided in the embodiment of the present invention is generally executed by the server 505, and accordingly, the apparatus for switching the application theme is generally disposed in the server 505.
It should be understood that the number of terminal devices, networks, and servers in fig. 5 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 6, a block diagram of a computer system 600 suitable for use with a terminal device implementing an embodiment of the invention is shown. The terminal device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 6, the computer system 600 includes a Central Processing Unit (CPU)601 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage section 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the system 600 are also stored. The CPU 601, ROM 602, and RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
The following components are connected to the I/O interface 605: an input portion 606 including a keyboard, a mouse, and the like; an output portion 607 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 608 including a hard disk and the like; and a communication section 609 including a network interface card such as a LAN card, a modem, or the like. The communication section 609 performs communication processing via a network such as the internet. The driver 610 is also connected to the I/O interface 605 as needed. A removable medium 611 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 610 as necessary, so that a computer program read out therefrom is mounted in the storage section 608 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 609, and/or installed from the removable medium 611. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 601.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a sending module, an obtaining module, a determining module, and a first processing module. The names of these modules do not in some cases constitute a limitation on the unit itself, and for example, the sending module may also be described as a "module that sends a picture acquisition request to a connected server".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
responding to a theme switching instruction, and determining a theme switching area and a target theme color selected by a user;
determining whether the target theme color exists in a preset theme configuration file or not;
if not, acquiring a default theme, determining a to-be-switched area in the default theme according to the theme switching area, and switching the color of the to-be-switched area to the color of the target theme to obtain a target theme;
and loading the target theme to switch the current theme of the application program.
According to the technical scheme of the embodiment of the invention, the change of the background color of the default theme is completed by analyzing and processing the picture pixels by the client application program without the participation of a server when the theme is changed, so that the quick and convenient theme self-definition is realized.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for switching application themes, comprising:
responding to a theme switching instruction, and determining a theme switching area and a target theme color selected by a user;
determining whether the target theme color exists in a preset theme configuration file or not;
if not, acquiring a default theme, determining a to-be-switched area in the default theme according to the theme switching area, and switching the color of the to-be-switched area to the color of the target theme to obtain a target theme;
and loading the target theme to switch the current theme of the application program.
2. The method of claim 1, wherein the theme-switching zone comprises a current entire theme or one or more pictures of a current theme.
3. The method of claim 1, further comprising:
and if the target theme color exists in the preset theme configuration file, loading a theme corresponding to the target theme color according to the theme switching area so as to switch the current theme of the application program.
4. The method of claim 1, wherein determining the target theme color selected by the user in response to the theme switching instruction comprises:
in response to a theme switching instruction, displaying a color extractor tool and a plurality of candidate colors;
and responding to the operation that a user selects a color from the candidate colors through the color selector tool, and taking the color selected by the user as the target theme color selected by the user.
5. The method of claim 1, wherein the theme profile includes theme picture background color values;
determining whether the target theme color exists in the preset theme configuration file comprises the following steps:
determining a color value of the target theme color;
and determining whether the target theme color exists in a preset theme configuration file or not according to the background color value of the theme picture and the color value of the target theme color included in the theme configuration file.
6. The method of claim 5, wherein the theme profile further comprises one or more of the following information: topic name, topic group of pictures path and state.
7. The method of claim 5, wherein switching the color of the area to be switched to the target theme color to obtain a target theme comprises:
converting the picture of the area to be switched into a bitmap;
for each pixel of the bitmap, switching the color value of the pixel to the color value of the target subject color;
generating a target picture after completing the pixel conversion of the bitmap;
and exporting the target picture to obtain the target theme.
8. An apparatus for switching application themes, comprising:
the first determining module is used for responding to the theme switching instruction and determining the theme switching area and the target theme color selected by the user;
the second determining module is used for determining whether the target theme color exists in a preset theme configuration file or not;
a generating module, configured to obtain a default theme when the target theme color does not exist in the preset theme configuration file, determine a to-be-switched area in the default theme according to the theme switching area, and switch the color of the to-be-switched area to the target theme color to obtain a target theme;
and the switching module is used for loading the target theme so as to switch the current theme of the application program.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202110453166.9A 2021-04-26 2021-04-26 Method and device for switching application program theme Pending CN113190152A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110453166.9A CN113190152A (en) 2021-04-26 2021-04-26 Method and device for switching application program theme

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110453166.9A CN113190152A (en) 2021-04-26 2021-04-26 Method and device for switching application program theme

Publications (1)

Publication Number Publication Date
CN113190152A true CN113190152A (en) 2021-07-30

Family

ID=76978994

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110453166.9A Pending CN113190152A (en) 2021-04-26 2021-04-26 Method and device for switching application program theme

Country Status (1)

Country Link
CN (1) CN113190152A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114911561A (en) * 2022-05-26 2022-08-16 平安普惠企业管理有限公司 System theme switching method and device, computer equipment and storage medium
CN116048516A (en) * 2023-03-29 2023-05-02 苏州瑞云智服信息科技有限公司 Theme color variable using method based on Vue frame
CN116755589A (en) * 2023-08-22 2023-09-15 苔花科迈(西安)信息技术有限公司 Method, device, medium and equipment for changing color matching theme of visual large screen

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114911561A (en) * 2022-05-26 2022-08-16 平安普惠企业管理有限公司 System theme switching method and device, computer equipment and storage medium
CN116048516A (en) * 2023-03-29 2023-05-02 苏州瑞云智服信息科技有限公司 Theme color variable using method based on Vue frame
CN116048516B (en) * 2023-03-29 2023-06-02 苏州瑞云智服信息科技有限公司 Theme color variable using method based on Vue frame
CN116755589A (en) * 2023-08-22 2023-09-15 苔花科迈(西安)信息技术有限公司 Method, device, medium and equipment for changing color matching theme of visual large screen
CN116755589B (en) * 2023-08-22 2023-11-28 苔花科迈(西安)信息技术有限公司 Method, device, medium and equipment for changing color matching theme of visual large screen

Similar Documents

Publication Publication Date Title
CN110046021B (en) Page display method, device, system, equipment and storage medium
CN113190152A (en) Method and device for switching application program theme
US11132114B2 (en) Method and apparatus for generating customized visualization component
CN112433788A (en) Applet running method and device, electronic equipment and storage medium
US20180107686A1 (en) Search method and apparatus
CN108646972B (en) Method and equipment for displaying information and searching information
CN113568699B (en) Content display method, device, equipment and storage medium
JP7261732B2 (en) Method and apparatus for determining character color
CN113360211A (en) Loading display method based on control and related equipment
CN115526160A (en) Rich text processing method, device and equipment and storage medium
US20220050562A1 (en) Methods and apparatuses for generating a hosted application
CN110134920B (en) Pictogram compatible display method, device, terminal and computer readable storage medium
CN107330087B (en) Page file generation method and device
US10931610B2 (en) Method, device, user terminal and electronic device for sharing online image
KR102205686B1 (en) Method and apparatus for ranking candiate character and method and device for inputting character
CN115495175A (en) Picture display method and device, terminal equipment and computer medium
CN110795328A (en) Interface testing method and device
CN112256370A (en) Information display method and device and electronic equipment
CN109614592B (en) Text processing method and device, storage medium and electronic equipment
CN110647327A (en) Method and device for dynamic control of user interface based on card
CN112947918A (en) Data display method and device
CN112966201B (en) Object processing method, device, electronic equipment and storage medium
CN114896244A (en) Method, device and equipment for configuring database table and computer readable medium
CN114742534A (en) Multi-machine linkage cooperative system and control method
CN111797350A (en) Data processing method and device and electronic equipment

Legal Events

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