CN111813472A - Application interface conversion method and device - Google Patents

Application interface conversion method and device Download PDF

Info

Publication number
CN111813472A
CN111813472A CN202010575656.1A CN202010575656A CN111813472A CN 111813472 A CN111813472 A CN 111813472A CN 202010575656 A CN202010575656 A CN 202010575656A CN 111813472 A CN111813472 A CN 111813472A
Authority
CN
China
Prior art keywords
color
interface
target
display mode
switching instruction
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
CN202010575656.1A
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.)
Wuba Co Ltd
Original Assignee
Wuba 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 Wuba Co Ltd filed Critical Wuba Co Ltd
Priority to CN202010575656.1A priority Critical patent/CN111813472A/en
Publication of CN111813472A publication Critical patent/CN111813472A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/74Circuits for processing colour signals for obtaining special effects
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/77Circuits for processing the brightness signal and the chrominance signal relative to each other, e.g. adjusting the phase of the brightness signal relative to the colour signal, correcting differential gain or differential phase

Abstract

The embodiment of the invention provides a method and a device for processing an application interface, wherein the method comprises the steps of obtaining a current display mode of the application interface and a display switching instruction aiming at the current display mode, obtaining a target color corresponding to the display switching instruction from a preset color mapping relation through a color processing assembly, and converting the application interface into the target color to realize the conversion of the display mode, so that developers can avoid maintaining a large number of color generation codes by maintaining the color mapping relation in the process of developing and maintaining the display mode of the application interface, thereby effectively reducing manual errors and further improving the efficiency.

Description

Application interface conversion method and device
Technical Field
The present invention relates to the field of computer processing technologies, and in particular, to an application interface conversion method and an application interface conversion apparatus.
Background
The IOS (iphone Operation system) is a mobile operating system developed by apple, wherein the IOS 13 is a thirteenth generation apple mobile operating system, which supports a dark color mode, can adjust the color, display brightness, etc. of a User terminal, and brings a new UI (User Interface) experience to the User. In the dark color mode, the background of an application program in the user terminal can be changed into pure black, and the color of an application control in the application interface is adjusted, so that the user can not feel dazzling even under the light at night.
Application program interfaces are provided in current development tools for IOS to adjust the color of applications. However, according to the adjustment method of the IOS development tool, all colors that need to realize the dark color model need to be modified, if thousands or even tens of thousands of generated color codes are involved in the application development project, the colors need to be modified one by one according to the above method, on one hand, different colors need to be generated according to different modes, the workload of developers is huge, and on the other hand, the codes are modified line by line, which is easy to cause manual errors, and reduces the efficiency of application development and maintenance.
Disclosure of Invention
The embodiment of the invention provides a conversion method of an application interface, and aims to solve the problems that in the prior art, in the process of developing and maintaining a display mode of the application interface, the workload is huge, manual errors are easy to occur, and the efficiency is low.
Correspondingly, the embodiment of the invention also provides a conversion device of the application interface, which is used for ensuring the realization and the application of the method.
In order to solve the above problem, an embodiment of the present invention discloses a method for converting an application interface, including:
acquiring a target color corresponding to the display switching instruction from a preset color mapping relation through a preset color processing component, wherein the color mapping relation comprises a color corresponding relation between different display modes of the application interface;
and converting the application interface into the target color to realize the conversion of the display mode.
Optionally, the color mapping relationship at least includes an individualized color mapping relationship and a conventional color mapping relationship, and the obtaining, by a preset color processing component, a target color corresponding to the display switching instruction from a preset color mapping relationship includes:
when the display switching instruction is a conventional switching instruction, acquiring a first target color aiming at the current display mode from the conventional color mapping relation through a preset color processing component;
and when the display switching instruction is an individualized switching instruction, acquiring a second target color aiming at the current display mode from the individualized color mapping relation through the color processing assembly.
Optionally, the application interface includes at least one of an interface element and an interface background, and the converting the application interface into the target color to implement the converting of the display mode includes:
and converting the interface element and the interface background into the target color so as to realize the conversion of the display mode.
Optionally, the obtaining, by the preset color processing component, a target color corresponding to the display switching instruction from a preset color mapping relationship includes:
acquiring a target element color value corresponding to the current element color value and a target background color value corresponding to the current background color value from a preset color mapping relation through a preset color processing component;
the converting the interface element and the interface background into the target color to realize the conversion of the display mode comprises:
and converting the interface element into a color corresponding to the color value of the target element, and converting the interface background into a color corresponding to the color value of the target background, so as to realize conversion of a display mode.
The embodiment of the invention also discloses a device for converting the application interface, which comprises:
the switching instruction determining module is used for determining a display switching instruction aiming at the current display mode of the application interface;
a target color obtaining module, configured to obtain, through a preset color processing component, a target color corresponding to the display switching instruction from a preset color mapping relationship, where the color mapping relationship includes a color correspondence relationship between different display modes of the application interface;
and the color conversion module is used for converting the application interface into the target color so as to realize the conversion of the display mode.
Optionally, the color mapping relationship at least includes a personalized color mapping relationship and a conventional color mapping relationship, and the target color obtaining module includes:
a first color obtaining sub-module, configured to, when the display switching instruction is a conventional switching instruction, obtain, through a preset color processing component, a first target color for the current display mode from the conventional color mapping relationship;
and the second color obtaining sub-module is used for obtaining a second target color aiming at the current display mode from the personalized color mapping relation through the color processing component when the display switching instruction is a personalized switching instruction.
Optionally, the application interface includes at least one of an interface element and an interface background, and the color conversion module is specifically configured to:
and converting the interface element and the interface background into the target color so as to realize the conversion of the display mode.
Optionally, the application interface in the current display mode includes at least one of a current element color value of the interface element and a current background color value of the interface background, and the color obtaining module is specifically configured to:
acquiring a target element color value corresponding to the current element color value and a target background color value corresponding to the current background color value from a preset color mapping relation through a preset color processing component;
the color conversion module is specifically configured to:
and converting the interface element into a color corresponding to the color value of the target element, and converting the interface background into a color corresponding to the color value of the target background, so as to realize conversion of a display mode.
The embodiment of the invention discloses an electronic device, which comprises:
one or more processors; and
one or more machine readable media having instructions stored thereon that, when executed by the one or more processors, cause the electronic device to perform one or more methods as described above.
Embodiments of the invention disclose one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform one or more methods as described above.
The embodiment of the invention has the following advantages:
in the embodiment of the invention, the conversion of the display mode can be realized by acquiring the current display mode of the application interface and the display switching instruction aiming at the current display mode, then acquiring the target color corresponding to the display switching instruction from the preset color mapping relation through the color processing component, and then converting the application interface into the target color, so that developers can avoid maintaining a large amount of color generation codes by maintaining the color mapping relation in the process of developing and maintaining the display mode of the application interface, thereby effectively reducing manual errors and further improving the efficiency.
Drawings
FIG. 1 is a flowchart illustrating the steps of an embodiment of a method for converting an application interface according to the present invention;
FIG. 2 is a flowchart illustrating the steps of an embodiment of a method for converting an application interface according to the present invention;
fig. 3 is a block diagram of an embodiment of a conversion apparatus for an application interface according to the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
With the development of application programs and the increasing demand of people for personalized customization, different display modes of the application programs can bring brand new experience to users. For example, based on the normal mode and the dark mode of the terminal system and based on the personalized display mode of the application program, in different display modes, the display style of the application control and the application interface in the application program can be changed along with the switching of the display modes, so that different display interfaces are displayed for users, and the diversity of interface display is enriched.
The display of the application interface is often associated with the display color, for the color development of the application interface display mode of the application program, thousands of generated color codes may be involved in one display mode, if the generation is performed one by one, different colors need to be generated according to different modes on one hand, the workload of developers is huge, and on the other hand, the codes are modified line by line, so that manual errors are easy to occur, and the efficiency of the application program development and maintenance is reduced. Alternatively, the same or similar problems exist for the display mode switching of the terminal, and therefore, for convenience of understanding and explanation, the present invention is exemplified by an application program, and the present invention is not limited thereto.
Therefore, one of the core concepts of the embodiments of the present invention is to replace an interface related to color generation by a color processing component and maintain a color mapping relationship, so that in the process of switching display modes, corresponding color information can be obtained from the color mapping relationship through the color processing component, and color conversion is realized, thereby realizing switching of display modes, so that developers do not need to process thousands or even tens of thousands of generated color codes in the development and maintenance processes of application interfaces, and greatly improving the working efficiency.
Specifically, referring to fig. 1, a flowchart illustrating steps of an embodiment of a method for converting an application interface according to the present invention is shown, which may specifically include the following steps:
step 101, determining a display switching instruction for a current display mode of an application interface;
as an example, at least one application program may be installed in the user terminal, for some user terminals, the display mode may include a normal mode and a dark mode, for the application program, the display mode may be switched following the switching of the display mode of the user terminal, and the display mode may also be switched according to an instruction input by the user. In addition, the application program can also support other personalized display modes besides the normal mode and the dark mode.
The different display modes may correspond to different display modes, and the display modes may include display brightness, display color, display style, and the like, for example, for the normal mode, the display brightness may be general display brightness (if the upper limit value of the brightness value is 100%, the display brightness in the normal mode may be 50%), and the display color may be a light color, such as white; for the dark mode, the display brightness may be a darker display brightness (e.g., 10%), and the display color may be a dark color, such as black, and optionally, for the display brightness, the user may adjust according to the user's own needs, which is not limited in the present invention.
In the embodiment of the present invention, the application program may include a color processing component, and after the application program acquires the display switching instruction for the current display mode, the application program may acquire corresponding display conversion information through the color processing component, so as to convert the display mode according to the display switching instruction. The color processing component can be a package integrated with color processing codes and comprises data and methods, the color processing component can comprise attributes and methods belonging to color processing, the attributes are visitors of the component data, the methods are processing methods of the color processing component, and developers can define the color processing component, so that all codes related to color processing in an application program can be transmitted to the color processing component, and corresponding color information can be acquired through the color processing component.
In an example, for a user terminal, a user may input a corresponding display switching instruction in a setting interface of the system, and may also set a fixed switching time, and if the current time meets the switching time, the terminal may automatically generate the display switching instruction, so that the display mode of the user terminal may be switched in different manners. For the application program, the display mode of the application interface may be switched along with the switching of the display mode of the user terminal, and a corresponding display switching instruction may be input in the setting interface of the application program, and the switching time may be set, which is not limited in the present invention.
102, acquiring a target color corresponding to the display switching instruction from a preset color mapping relation through a preset color processing component, wherein the color mapping relation comprises a color corresponding relation between different display modes of the application interface;
in the embodiment of the present invention, the display switching instruction may include different instruction types, for example, the display switching instruction may include a personalized switching instruction, a conventional switching instruction, and the like. The personalized switching instruction can be an instruction for switching from a normal model to a personalized mode, switching from the personalized mode to the normal mode, switching from a dark color mode to the personalized mode, switching from the personalized mode to the dark color mode and the like, and the conventional switching instruction can be an instruction for switching between the normal mode and the dark color mode, so that the target color for the current display mode can be obtained from the color mapping relation according to different types of display switching instructions.
The corresponding relation of the display colors among different display modes can be maintained in the color mapping relation, and the corresponding target color can be obtained from the color mapping relation according to the display mode switching instruction so as to convert the display colors of the application interface and realize the conversion of the display modes.
For the switching of the display mode of the application program, the conversion of the display mode can be quickly realized through the color mapping relation, and for the development of the application program, developers can avoid maintaining a large amount of color generation codes through maintaining the color mapping relation, thereby effectively reducing manual errors and ensuring the development efficiency of the application program.
Step 103, converting the application interface into the target color to realize conversion of a display mode.
In specific implementation, after the target color for the current display mode is obtained from the color mapping relationship, the application interface can be converted into the target color, the conversion of the display mode is realized, the display of the application program interface is converted by following the display mode switching of the user terminal, or the display mode is switched according to the display switching instruction input by the user, so that different requirements of the user are met, and the use experience of the user is improved.
In the embodiment of the invention, the conversion of the display mode can be realized by acquiring the current display mode of the application interface and the display switching instruction aiming at the current display mode, then acquiring the target color corresponding to the display switching instruction from the preset color mapping relation through the color processing component, and then converting the application interface into the target color, so that developers can avoid maintaining a large amount of color generation codes by maintaining the color mapping relation in the process of developing and maintaining the display mode of the application interface, thereby effectively reducing manual errors and further improving the efficiency.
Referring to fig. 2, a flowchart illustrating steps of an embodiment of a method for converting an application interface according to the present invention is shown, which may specifically include the following steps:
step 201, determining a display switching instruction for a current display mode of an application interface, wherein the application interface comprises an interface element and an interface background;
in the embodiment of the present invention, the application interface may include an interface element, an interface background, and the like. The Interface element may be a UI (User Interface) control in the application Interface, and may include a text, a picture, an interactive control, and the like in the application Interface; the interface background may be a background of an application interface.
In a specific implementation, the application program may include a color processing component, and in the process of switching the display mode of the application program, all the instructions related to color conversion may implement color conversion through the color processing component. The display color of the interface of the application program is changed along with the switching of the display mode, so that the interface color of the application program can be converted according to a display mode switching instruction, and the display mode switching instruction can be an instruction for switching from a normal mode to a deep color mode, an instruction for switching from the deep color mode to the normal mode, an instruction for switching from the normal mode to a personalized display mode, an instruction for switching from the personalized display mode to the deep color mode, and the like.
Step 202, acquiring a target color corresponding to the display switching instruction from a preset color mapping relation through a preset color processing component, wherein the color mapping relation comprises a color corresponding relation between different display modes of the application interface;
in a specific implementation, the display switching instruction may include different instruction types, for example, the display switching instruction may include a personalized switching instruction, a conventional switching instruction, and the like. The target color for the current display mode may be obtained from a preset color mapping relationship according to the instruction type of the display switching instruction.
In an optional embodiment of the present invention, the color mapping relationship at least includes an individualized color mapping relationship, a conventional color mapping relationship, and the like, and the color correspondence relationship between the corresponding display mode and the other display modes is maintained in the different color relationships. The personalized color mapping relationship can be a color corresponding relationship between an application interface personalized display mode and other display modes, for example, a color corresponding relationship between a personalized display mode I and a normal mode, and a color corresponding relationship between a personalized display mode II and a deep color mode; the regular color mapping relationship may be a color correspondence relationship between the normal mode and the dark mode of the application interface.
For example, the color mapping relationship may be stored and maintained in a form of a color comparison table, and the color comparison table may include an individualized color region and a conventional color region, where the conventional color region may store corresponding relationships of colors in different conventional modes, and the individualized color region may store color corresponding relationships in corresponding display modes according to an individualized display mode set by a user, for example, a color corresponding relationship between a conventional mode and an individualized mode, a color corresponding relationship between an individualized mode and an individualized mode, and the like.
In the development process of the application program, a developer can avoid maintaining a large number of color generation codes through the color mapping relation, particularly the color generation codes in a normal mode and a deep color mode, so that the manual errors are effectively reduced, the development efficiency of the application program is ensured, the personalized color mapping relation is reserved, the personalized customization requirements of users are met, and the user experience is improved.
In a specific implementation, when the display switching instruction is a conventional switching instruction, acquiring a first target color for a current display mode from a conventional color mapping relation; and when the display switching instruction is an individualized switching instruction, acquiring a second target color aiming at the current display mode from the individualized color mapping relation.
In one example, in the dark mode, the background of the application program in the user terminal may become pure black, and the color of the application control in the application interface is adjusted, so that the user does not feel dazzling even in dark light at night. For the color processing component provided by the IOS development tool, the following two codes can be used:
Figure BDA0002551262330000091
the functions of the two interfaces are the same, and both the interfaces tell the developer whether the interface is in the normal mode or the deep color mode when generating the color, and the developer can decide to use the corresponding color according to different modes (the effect of the above example is that the deep color mode uses black and the normal mode uses white).
However, according to the above-mentioned idea of the IOS development tool, all colors that need to realize a dark color model need to be modified, if thousands or even tens of thousands of generated color codes are involved in an application development project, the colors need to be modified one by one according to the above-mentioned method, on one hand, different colors need to be generated according to different modes, and the workload of developers is huge, and on the other hand, the codes are modified line by line, which is easy to cause manual errors, and reduces the efficiency of application development and maintenance.
Therefore, in the embodiment of the present application, by determining a display mode switching instruction for a current display mode of an application interface, if the display mode switching instruction is a conventional switching instruction, that is, an instruction for switching from a normal mode to a deep color mode, or an instruction for switching from the deep color mode to the normal mode, a first target color for the current display mode may be obtained from a conventional color mapping relationship according to a mapping relationship of color information in the color mapping relationship through a color processing component, and the color processing component may simplify processing of a color interface in an application program development process, so that codes related to color generation of the application interface are all transmitted to the interface, thereby improving color conversion efficiency, and maintaining the mapping relationship of display colors through the color mapping relationship, thereby avoiding maintenance of a large number of color generation codes, and effectively reducing manual errors, the efficiency is further improved.
In another example, the application program may provide a customized service of a personalized display mode, for example, a user may perform personalized customization on a display background of the application interface, a display style, a display color, a display brightness, and the like of a UI control, so that the application program may store a corresponding display mode according to a personalized customization instruction of the user, and when the user switches to the personalized display mode, the application program may convert the application interface into the display style corresponding to the personalized display mode.
Specifically, the user can perform personalized customization on the display background of the application interface and the display color of the UI control, and after the user finishes setting, the application program can generate corresponding color information in a personalized color mapping relationship in the color mapping relationship according to the user setting, so that when the display mode switching instruction relates to switching between the personalized mode and the personalized mode, or switching between the personalized mode and the conventional display mode, the display color of the application interface can be switched according to the color information in the personalized color mapping relationship.
The mapping relationship of the color information in the personalized color mapping relationship may include a mapping relationship of colors between the personalized mode and the personalized mode, and may also include a mapping relationship of colors between the personalized mode and the conventional display mode, for example, a mapping relationship of colors between the personalized mode and the normal mode, a mapping relationship of colors between the dark mode and the personalized mode, and the like.
In a specific implementation, the display color of the application interface may be represented in the form of a color value, including an element color value of the interface element and a background color value of the interface background. After the display mode switching instruction is determined, the current element color value of the interface element in the current application interface, the current background color value of the interface background and the like can be acquired, and the target element color value corresponding to the current element color value and the target background color value corresponding to the current background color value can be acquired from the color mapping relation according to the mapping relation through the color processing component, so that the application interface is subjected to color conversion and rendering according to the color values, and the switching of the display mode is realized.
For example, the target element color value corresponding to the current element color value and the target background color value corresponding to the current background color value may be obtained from a conventional color mapping relationship of the color mapping relationship according to the mapping relationship by the color processing component.
Step 203, converting the interface element and the interface background into the target color to realize conversion of a display mode.
In specific implementation, after the target color for the current display mode is obtained from the color mapping relationship, the application interface can be converted into the target color, the conversion of the display mode is realized, the display of the application program interface is converted by following the display mode switching of the user terminal, or the display mode is switched according to the display switching instruction input by the user, so that different requirements of the user are met, and the use experience of the user is improved.
Specifically, the application program can acquire the target element color value and the target background color value from the color mapping relation through the color processing component, then replace the current element color value with the target element color value, and replace the current background color value with the target background color value, thereby realizing the conversion of the display color of the application interface, and further realizing the conversion of the display mode.
In one example, if the application is currently in normal mode, the target color may be a dark color; if the application is currently in the dark mode, the target color may be a light color. Specifically, the application can convert the interface element in the application interface into the color corresponding to the color value of the target element, and convert the interface background into the color corresponding to the color value of the target background, thereby in the process of switching the display mode, the processing related to color generation, the application can all pass through the color processing assembly, the corresponding color information is obtained from the color mapping relationship, the color conversion is realized, so that developers develop and maintain the application in the process of the application, only the maintenance of the color processing assembly and the color mapping relationship is needed, the workload of the application development and maintenance is greatly reduced, the maintenance of a large amount of color generation codes is avoided, the manual error is effectively reduced, and the efficiency is further improved.
It should be noted that, the embodiments of the present invention include but are not limited to the above examples, and the personalized mode switching is similar to the conventional display mode switching, and is not described herein again.
In the embodiment of the present invention, the method and the device can be applied to an application program, where the application program may include a color processing component, and the application program may implement conversion of a display mode by acquiring a current display mode of an application interface and a display switching instruction for the current display mode, then acquiring a target color corresponding to the display switching instruction from a preset color mapping relationship through the color processing component, and then converting the application interface into the target color, so that a developer can avoid maintaining a large number of color generation codes by maintaining the color mapping relationship in a process of developing and maintaining the display mode of the application interface, thereby effectively reducing manual errors and further improving efficiency.
In order to enable those skilled in the art to better understand the embodiments of the present application, the following description is given by way of an example:
the application program may include a color processing component and a color mapping relationship, and when a display mode switching instruction is received, the application program may call the color processing component, and obtain corresponding color information from a color area corresponding to the color mapping relationship according to an instruction type of the display mode switching instruction, so as to convert a color of the application interface into a color corresponding to the display mode switching instruction according to the color information.
The color display of the application program can be represented by 4 parameters such as Red, Green, Blue, and Alpha. The application program obtains color information of the interface elements and the interface background in the application interface, that is, after the current color value of a _ b _ c _ d composed of the values of red, green, blue and alpha is obtained, the corresponding target color value e _ f _ g _ h can be obtained from the color mapping relation according to the current color value, and then the application program is subjected to color conversion by using the color value, so that the switching of the display mode is realized.
For example, the RGB of the standard Red in the normal mode is 1_0_0_1, the color mapping relationship is 1_0_0_1, which represents the values of Red, Green, Blue, and Alpha, respectively, and the color value in the corresponding deep color mode may be 0.5_0_0.5_1 (purple), so that by maintaining different color mapping relationships in the color mapping relationship, when the display mode of the application program is switched, the corresponding color information may be obtained from the color mapping relationship through the color processing component, the display mode of the application program is switched, so that the developer only needs to maintain the color processing component and the color mapping relationship in the process of developing and maintaining the application program, thereby greatly reducing the workload of developing and maintaining the application program, avoiding maintaining a large amount of color generation codes, and effectively reducing manual errors, the efficiency is further improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the illustrated order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments of the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no particular act is required to implement the invention.
Referring to fig. 3, a block diagram of a structure of an embodiment of the conversion apparatus for an application interface of the present invention is shown, which may specifically include the following modules:
a switching instruction determining module 301, configured to determine a display switching instruction for a current display mode of an application interface;
a target color obtaining module 302, configured to obtain, by the color processing component, a target color corresponding to the display switching instruction from the color mapping relationship, where the color mapping relationship includes a color correspondence relationship between different display modes of the application interface;
and a color conversion module 303, configured to convert the application interface into the target color to implement conversion of a display mode.
In an optional embodiment of the present invention, the color mapping relationship at least includes a personalized color mapping relationship and a conventional color mapping relationship, and the target color obtaining module 302 includes:
a first color obtaining sub-module, configured to, when the display switching instruction is a conventional switching instruction, obtain, by the color processing component, a first target color for the current display mode from the conventional color mapping relationship;
and the second color obtaining sub-module is used for obtaining a second target color aiming at the current display mode from the personalized color mapping relation through the color processing component when the display switching instruction is a personalized switching instruction.
In an optional embodiment of the present invention, the application interface includes at least one of an interface element and an interface background, and the color conversion module 303 is specifically configured to:
and converting the interface element and the interface background into the target color so as to realize the conversion of the display mode.
In an optional embodiment of the present invention, the application interface in the current display mode includes at least one of a current element color value of the interface element and a current background color value of the interface background, and the color obtaining module 302 is specifically configured to:
acquiring a target element color value corresponding to the current element color value and a target background color value corresponding to the current background color value from the conventional color mapping relation according to the mapping relation through a preset color processing component;
the color conversion module 303 is specifically configured to:
and converting the interface element into a color corresponding to the color value of the target element, and converting the interface background into a color corresponding to the color value of the target background, so as to realize conversion of a display mode.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
An embodiment of the present invention further provides an electronic device, including:
one or more processors; and
one or more machine-readable media having instructions stored thereon, which when executed by the one or more processors, cause the electronic device to perform methods as described in embodiments of the invention.
Embodiments of the invention also provide one or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the methods described in embodiments of the invention.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The application interface conversion method and the application interface conversion device provided by the invention are described in detail, and the principle and the implementation mode of the invention are explained by applying specific examples, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for converting an application interface is characterized by comprising the following steps:
determining a display switching instruction aiming at the current display mode of the application interface;
acquiring a target color corresponding to the display switching instruction from a preset color mapping relation through a preset color processing component, wherein the color mapping relation comprises a color corresponding relation between different display modes of the application interface;
and converting the application interface into the target color to realize the conversion of the display mode.
2. The method according to claim 1, wherein the color mapping relationship at least includes a personalized color mapping relationship and a conventional color mapping relationship, and the obtaining, by a preset color processing component, a target color corresponding to the display switching instruction from a preset color mapping relationship includes:
when the display switching instruction is a conventional switching instruction, acquiring a first target color aiming at the current display mode from the conventional color mapping relation through a preset color processing component;
and when the display switching instruction is an individualized switching instruction, acquiring a second target color aiming at the current display mode from the individualized color mapping relation through the color processing assembly.
3. The method of claim 1, wherein the application interface comprises at least one of an interface element and an interface background, and wherein converting the application interface to the target color to effect the conversion of the display mode comprises:
and converting the interface element and the interface background into the target color so as to realize the conversion of the display mode.
4. The method according to claim 3, wherein the application interface in the current display mode includes at least one of a current element color value of the interface element and a current background color value of the interface background, and the obtaining, by a preset color processing component, a target color corresponding to the display switching instruction from a preset color mapping relationship includes:
acquiring a target element color value corresponding to the current element color value and a target background color value corresponding to the current background color value from a preset color mapping relation through a preset color processing component;
the converting the interface element and the interface background into the target color to realize the conversion of the display mode comprises:
and converting the interface element into a color corresponding to the color value of the target element, and converting the interface background into a color corresponding to the color value of the target background, so as to realize conversion of a display mode.
5. An apparatus for converting an application interface, the apparatus comprising:
the switching instruction determining module is used for determining a display switching instruction aiming at the current display mode of the application interface;
a target color obtaining module, configured to obtain, through a preset color processing component, a target color corresponding to the display switching instruction from a preset color mapping relationship, where the color mapping relationship includes a color correspondence relationship between different display modes of the application interface;
and the color conversion module is used for converting the application interface into the target color so as to realize the conversion of the display mode.
6. The apparatus of claim 5, wherein the color mapping comprises at least a personalized color mapping and a regular color mapping, and the target color obtaining module comprises:
a first color obtaining sub-module, configured to, when the display switching instruction is a conventional switching instruction, obtain, through a preset color processing component, a first target color for the current display mode from the conventional color mapping relationship;
and the second color obtaining sub-module is used for obtaining a second target color aiming at the current display mode from the personalized color mapping relation through the color processing component when the display switching instruction is a personalized switching instruction.
7. The apparatus of claim 5, wherein the application interface comprises at least one of an interface element and an interface background, and wherein the color conversion module is specifically configured to:
and converting the interface element and the interface background into the target color so as to realize the conversion of the display mode.
8. The apparatus of claim 7, wherein the application interface in the current display mode includes at least one of a current element color value of the interface element and a current background color value of the interface background, and wherein the color obtaining module is specifically configured to:
acquiring a target element color value corresponding to the current element color value and a target background color value corresponding to the current background color value from a preset color mapping relation through a preset color processing component;
the color conversion module is specifically configured to:
and converting the interface element into a color corresponding to the color value of the target element, and converting the interface background into a color corresponding to the color value of the target background, so as to realize conversion of a display mode.
9. An electronic device, comprising:
one or more processors; and
one or more machine-readable media having instructions stored thereon that, when executed by the one or more processors, cause the electronic device to perform the method of any of claims 1-4.
10. One or more machine-readable media having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the method of any of claims 1-4.
CN202010575656.1A 2020-06-22 2020-06-22 Application interface conversion method and device Pending CN111813472A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010575656.1A CN111813472A (en) 2020-06-22 2020-06-22 Application interface conversion method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010575656.1A CN111813472A (en) 2020-06-22 2020-06-22 Application interface conversion method and device

Publications (1)

Publication Number Publication Date
CN111813472A true CN111813472A (en) 2020-10-23

Family

ID=72846384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010575656.1A Pending CN111813472A (en) 2020-06-22 2020-06-22 Application interface conversion method and device

Country Status (1)

Country Link
CN (1) CN111813472A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112433798A (en) * 2020-11-24 2021-03-02 北京字节跳动网络技术有限公司 Page adaptation method and device based on mode switching
CN112559104A (en) * 2020-12-22 2021-03-26 北京字节跳动网络技术有限公司 Page style switching method and device, computer equipment and storage medium
CN112612564A (en) * 2020-12-17 2021-04-06 平安普惠企业管理有限公司 Interface display method, device, equipment and medium
CN114968466A (en) * 2022-07-14 2022-08-30 深圳市明源云空间电子商务有限公司 Page color matching adjustment method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106953991A (en) * 2017-05-22 2017-07-14 北京小米移动软件有限公司 Display mode switching method and device
CN110609722A (en) * 2019-08-09 2019-12-24 华为技术有限公司 Dark mode display interface processing method, electronic equipment and storage medium
CN111190683A (en) * 2019-12-31 2020-05-22 联想(北京)有限公司 Processing method and device and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106953991A (en) * 2017-05-22 2017-07-14 北京小米移动软件有限公司 Display mode switching method and device
CN110609722A (en) * 2019-08-09 2019-12-24 华为技术有限公司 Dark mode display interface processing method, electronic equipment and storage medium
CN111190683A (en) * 2019-12-31 2020-05-22 联想(北京)有限公司 Processing method and device and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112433798A (en) * 2020-11-24 2021-03-02 北京字节跳动网络技术有限公司 Page adaptation method and device based on mode switching
CN112612564A (en) * 2020-12-17 2021-04-06 平安普惠企业管理有限公司 Interface display method, device, equipment and medium
CN112559104A (en) * 2020-12-22 2021-03-26 北京字节跳动网络技术有限公司 Page style switching method and device, computer equipment and storage medium
CN114968466A (en) * 2022-07-14 2022-08-30 深圳市明源云空间电子商务有限公司 Page color matching adjustment method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111813472A (en) Application interface conversion method and device
KR101481684B1 (en) Icon generation method
CN111626810B (en) Method and device for displaying house source information
CN106657680A (en) Mobile terminal frame rate control method and device and mobile terminal
CN101957756A (en) System and method for rapidly generating intelligent mobile terminal program
CN106303639B (en) Method and system for realizing full keyboard function keys of smart television
CN116603228A (en) Vibration control method, vibration control device, electronic apparatus, and computer-readable storage medium
CN106331749A (en) Video request method and system
CN111787240B (en) Video generation method, apparatus and computer readable storage medium
CN107077824B (en) Image display control apparatus, transmission apparatus, image display control method
CN109714642B (en) Method for reusing Linux application in intelligent system, intelligent television and storage medium
CN109640148A (en) A kind of method and device by text box text exhibition content
CN112367399B (en) Filter effect generation method and device, electronic device and storage medium
CN111199565B (en) Data processing method, device, system, electronic equipment and storage medium
CN102968244B (en) The acquisition methods of resource pre-review figure, device and equipment
CN110784739A (en) Video synthesis method and device based on AE
CN112799745B (en) Page display control method and device
CN108984239B (en) Processing method, device and equipment for selecting control and storage medium
CN112381905A (en) Color superposition method and device and electronic equipment
CN113656717A (en) Webpage control rendering method, device, equipment and storage medium
CN103942045A (en) User interface written message replacing method and device
CN115134647A (en) Video streaming transmission method based on cloud service and related equipment thereof
CN113763237B (en) Intelligent beautifying method and device for visual report and computer readable storage medium
CN109542303A (en) Touch control device and its response method, device
CN114422718B (en) Video conversion method and device, electronic equipment and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201023