CN103399767A - Interface skin-changing method and device - Google Patents
Interface skin-changing method and device Download PDFInfo
- Publication number
- CN103399767A CN103399767A CN2013103269405A CN201310326940A CN103399767A CN 103399767 A CN103399767 A CN 103399767A CN 2013103269405 A CN2013103269405 A CN 2013103269405A CN 201310326940 A CN201310326940 A CN 201310326940A CN 103399767 A CN103399767 A CN 103399767A
- Authority
- CN
- China
- Prior art keywords
- change
- trigger
- interface
- color
- rgb
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 29
- 238000009877 rendering Methods 0.000 claims abstract description 8
- 230000008859 change Effects 0.000 claims description 82
- 238000006243 chemical reaction Methods 0.000 claims description 17
- 230000004044 response Effects 0.000 claims description 6
- 230000006870 function Effects 0.000 description 5
- 239000003086 colorant Substances 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000012508 change request Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000004590 computer program Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Landscapes
- Color Image Communication Systems (AREA)
- Image Processing (AREA)
Abstract
An embodiment of the invention relates to the field of computer design, and discloses an interface skin-changing method and device. The method includes the steps of receiving interface skin-changing request information sent by a terminal, choosing a changing mode of a red R component, a green G component and a blue B component of color pattern RGB codes in interface pixels according to the request information, switching the RGB codes according to the chosen changing mode, configuring the color of a current mode according to the switched RGB codes, and rendering the configured color to a screen. Correspondingly, the invention further discloses an interface skin-changing device. According to the interface skin-changing method and device, on the basis that the interface skin-changing function is achieved, page refreshing efficiency is improved, the interface skin-changing speed is improved, and choice for interface skin-changing color changes is flexible.
Description
Technical Field
The invention relates to the technical field of computers, in particular to an interface skin changing method and device.
Background
As users use software systems increasingly and software functions become more rich, the observability of user interfaces is also gradually taken into consideration when users use software. Therefore, more and more user interfaces have skin changing functions, and the user can select the color of the interface according to the preference. Currently, most user interface displays use RGB color schemes, which are obtained by changing three color channels of red (R), green (G), and blue (B) and superimposing them on each other to obtain various colors. In the prior art, on one hand, the layer of the user interface is divided into several modules, and when skin changing is performed, color conversion is performed on each module, so that the effect of overall color change is achieved. However, performing color conversion on each module increases the difficulty of module design, and requires performing the same operation on each module, so that the time for drawing colors on a page is increased during color conversion, the speed of changing the skin is reduced, and the page refresh efficiency is reduced.
The other scheme is that the data in the image layer is modified during skin changing, the scheme can solve the time efficiency problem of the previous scheme, but only can change color integrally, and the gorgeous effects of color gradual change, image layer color distribution change and the like cannot be achieved, so that the utilization rate of the skin changing function is low.
Disclosure of Invention
The technical problem to be solved by the embodiments of the present invention is to provide an interface skin changing method and apparatus, and by using the method and apparatus of the present invention, page refreshing efficiency can be improved, interface skin changing speed can be enhanced, and selection of interface skin changing color change is more flexible.
In order to solve the above technical problem, an embodiment of the present invention provides an interface skin changing method, including:
receiving an interface skin changing request message sent by a terminal;
selecting a change mode of three components of red R, green G and blue B of a color mode RGB code in an interface pixel according to the request message;
converting the RGB codes according to the selected change mode;
and configuring the color of the current mode according to the converted RGB code, and rendering the configured color to a screen.
In a first implementable mode of the first aspect, the selecting a variation pattern of R, G, B three components of RGB codes in interface pixels according to the request message includes:
selecting a trigger value of a trigger bit in the RGB code matched with the request message according to the request message, where the trigger value is used to trigger a variation pattern of the corresponding R, G, B three components, and the variation pattern is a position variation pattern or a component value variation pattern.
In a second implementable mode of the first aspect, the trigger bit is located at the highest bit in the RGB code.
In the first or second implementable mode of the first aspect, the variation pattern of the R, G, B three components of the RGB code includes:
controlling the R, G, B position change of the three components in the RGB code in response to the trigger value notification;
or,
and controlling the R, G, B to change the values of the three components in response to the notification of the trigger value.
Accordingly, the second aspect of the embodiments of the present invention further provides an interface skin changing device, including:
the receiving module is used for receiving an interface skin changing request message sent by the terminal;
the selection module is used for selecting the change modes of the red R, the green G and the blue B components of the RGB code of the color mode in the interface pixel according to the request message received by the receiving module;
the conversion module is used for converting the RGB codes according to the change mode selected by the selection module;
and the output module is used for configuring the color of the current mode according to the converted RGB code and rendering the configured color to a screen.
In a first implementable mode of the second aspect, the selection module includes:
and a trigger unit, configured to select a trigger value of a trigger bit in the RGB code matched with the request message according to the request message, where the trigger value is used to determine R, G, B a variation pattern of the three components, and the variation pattern is a position variation pattern or a component value variation pattern.
In a second implementable mode of the second aspect, the trigger bit in the trigger unit is located at the highest bit in the RGB code.
In a first implementable mode of the second aspect, the selection module further comprises:
a position change unit, configured to control, in response to the notification of the trigger unit, a change in position of the R, G, B three components in the RGB code;
and the component value change unit is used for responding to the notice of the trigger unit and controlling the change of the three component values R, G, B.
In the embodiment of the invention, after the interface skin changing device receives the interface skin changing request message sent by the terminal, the R, G, B three-component change mode of the RGB codes in the interface pixel is selected according to the request message, the RGB codes are converted according to the change mode selected by the request message, and the converted colors are output and rendered to the screen.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a method for changing the skin of an interface according to an embodiment of the present invention;
FIG. 2 is a flow chart of another method for changing the skin of an interface according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an interface skin-changing device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a selection module of an interface skin-changing device according to an embodiment of the present invention.
Best mode for carrying out the invention
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
FIG. 1 is a flow chart of a method for interface resurfacing. As shown in the figure, the interface skin changing process in this embodiment may include:
and step 110, receiving an interface skin changing request message sent by the terminal. In the concrete implementation, when a user needs to execute a skin changing function, skin changing is selected in a function interface, a color which is preferred by the user is selected according to a color option appearing on a screen, and color request information corresponding to the color selected by the user is generated at a terminal and sent to a device for changing the skin on the interface. The interface skin changing device can be a processor and other devices capable of realizing computer algorithms.
And step 120, selecting the change modes of the red R, the green G and the blue B components of the color mode RGB code in the interface pixel according to the request message. In a specific implementation, the terminal sends the color request information to trigger the corresponding skin change mode, and R, G, B three components in the RGB code of each pixel point in the interface are changed correspondingly according to the color request information, such as position exchange of the three components in the code or transformation of values of the three components.
And step 130, converting the RGB codes according to the selected change mode. In a specific implementation, a new color code is generated after the RGB code is changed.
And 140, configuring the color of the current mode according to the converted RGB code, and rendering the configured color to a screen. In specific implementation, the converted RGB codes can generate new color values, and new colors are formed by outputting and rendering the new color values to a screen according to the newly generated color values, so that the effect of changing skins is achieved.
By implementing the method shown in fig. 1, each pixel point of the interface skin changing device in the screen performs color conversion through a certain algorithm, so that the problem of low color conversion efficiency of the whole interface is solved, the page drawing time is reduced, the refreshing efficiency is improved, the color conversion mode can be flexibly selected on each pixel point, and meanwhile, a certain area of the interface can be selected for color conversion.
As a practical way, fig. 2 is an improvement made on the implementation of fig. 1, and as fig. 2 is a flowchart of another interface skin changing method provided by the embodiment of the present invention, the method may include:
at step 200, the process begins. And when the user needs to change the skin of the interface, opening the skin changing interface.
When the switch _ mode parameter is 0, the trigger value can be set to 0, and the RGB code does not change. It should be noted that the trigger bit where the trigger value is located at the highest bit of the RGB code.
And step 204, calling a change mode corresponding to the RGB code according to the trigger value of the new configuration when the user selects a new skin. Continuing with step 202, when the selected trigger value is the first variation pattern, the first variation pattern can convert R, G, B the position sequence of three components from RGB to RBG.
And step 206, when the change mode is judged to be position change, performing corresponding position interchange on R, G, B three components in the RGB code according to the trigger value in specific implementation. In step 204, when the trigger value is 1, that is, the first variation mode can convert the position sequence of R, G, B three components from RGB to RBG, corresponding to the code of color number 1.
And step 208, configuring the color of the current mode according to the converted RGB code. In step 206, when the first variation pattern converts the position sequence of R, G, B three components from RGB to RBG, corresponding to the code of color No. 1, color No. 1 is configured.
And step 210, finishing skin changing. In specific implementation, after configuring a new color and rendering the new color to a screen, the program is ended;
or,
when the user does not select to change the skin, the switch _ mode parameter is 0, the corresponding trigger value is 0, the RGB code is not changed, and the program is ended.
It should be noted that fig. 2 is only a part of the embodiment of the present invention, and the embodiment of fig. 2 includes three embodiments: the first is to replace only the skin without updating the picture; the second is to update the picture only and not to change the skin; and thirdly, the skin can be replaced under the condition of updating the picture.
The implementation of fig. 2 is a refinement of the steps performed on the basis of the implementation of fig. 1, and this embodiment can control the change of each pixel point in the interface, and each change mode can correspond to the change of each pixel point, which is particularly significant for the effect of gradually changing the screen color. By adopting the embodiment, the page drawing time can be reduced, the refreshing efficiency is improved, and the color conversion mode can be flexibly selected on each pixel point, namely, a certain area of the interface can be selected for color conversion.
As one practical way, the present invention provides an interface resurfacing device. As shown, the apparatus in the embodiment of the present invention at least includes a receiving module 310, a selecting module 320, a converting module 330, and an outputting module 340, where:
a receiving module 310, configured to receive an interface skin change request message sent by a terminal. In a specific implementation, the receiving module 310 is responsible for receiving a skin change option selected by a user, and the request message received by the receiving module 310 may be a parameter named switch _ mode, where the parameter is a hexadecimal data structure. There are three cases, the first: when the user selects the original skin, namely does not select skin changing, the switch _ mode parameter is 0; and the second method comprises the following steps: when the user selects the skin changing interface with the color of No. 1, the corresponding request message, namely the switch _ mode parameter, is 1; and the third is that: when the user selects the replacement interface as another picture, the switch _ mode parameter is 7.
A selection module 320, configured to select a variation pattern of R, G, B three components of the RGB code in the interface pixel according to the request message received by the receiving module 310. In a specific implementation, the selecting module 320 selects a trigger value corresponding to the RGB code according to the switch _ mode parameter. When the switch _ mode parameter is 1, the trigger value may be set to 1, which corresponds to the first variation mode. When the switch _ mode parameter is 0, the trigger value can be set to 0, and the RGB code does not change.
The conversion module 330 is configured to convert the RGB codes according to the change mode selected by the selection module 320, and in a specific implementation, when the trigger value selected by the selection module 320 is a first change mode, the first change mode may convert the position sequence of the R, G, B three components from RGB to RBG, which corresponds to the code of color No. 1.
And the output module 340 is configured to configure the color of the current mode according to the converted RGB codes, and render the configured color to the screen. In a specific implementation, after the conversion module 330 converts the original RGB code into the code of the color No. 1, the output module 340 renders the color No. 1 to the screen, so as to present the interface skin required by the user to the user.
The implementation device of the invention can control the change of each pixel point in the interface, each change mode can correspond to the change of each pixel point, and the mode of gradually changing the screen color is particularly obvious. By adopting the embodiment, the page drawing time can be reduced, the refreshing efficiency is improved, and the color conversion mode can be flexibly selected on each pixel point, namely, a certain area of the interface can be selected for color conversion.
As one practical way, fig. 4 provides a schematic structural diagram of the selection module 320 of the interface skin-changing device. As shown, the selection module 320 includes a trigger unit 410, a position change unit 420, and a component value change unit 430, wherein:
the trigger unit 410 is used for determining R, G, B the change mode of the three components, and informing the position change unit and/or the component value change unit according to R, G, B the change mode of the three components. The trigger unit 410 is used for storing a trigger value, and when the trigger value is 0, the trigger unit 410 does not change in response to the corresponding RGB code; when the trigger value is in the range of values 1 to 6, the trigger unit 410 notifies the position change unit 420 of the position change of the RGB code; when the trigger value is a of a value 7 to hexadecimal, the trigger unit 410 notifies the component value change unit 430 to change the component values of the RGB code.
And the position change unit 420 is used for responding to the notification of the trigger unit and controlling the position change of the R, G, B three components in the RGB code. For example, when the trigger value is 1, that is, the first variation mode may convert the position sequence of R, G, B three components from RGB to RBG, corresponding to the code of color number 1.
A component value change unit 430, for responding to the notification of the trigger unit and controlling the change of the three component values R, G, B. In specific implementation, when the user selects to replace the interface with another picture, the switch _ mode parameter is 7, and the change of the RGB values of all the pixel points of the corresponding interface is changed into the RGB values of all the pixel points of the other picture.
As can be seen, in the embodiment of the present invention, after the interface skin change device receives the interface skin change request message sent by the terminal, the change mode of R, G, B three components of RGB codes in the interface pixel is selected according to the received request message, the RGB codes are converted according to the change mode, the color of the current mode is configured according to the converted RGB codes, and the configured color is rendered to the screen. The embodiment of the invention can control the change of each pixel point in the interface, each change mode can correspond to the change of each pixel point, and the mode of gradually changing the screen color is particularly obvious. By adopting the embodiment, the page drawing time can be reduced, the refreshing efficiency is improved, and the color conversion mode can be flexibly selected on each pixel point, namely, a certain area of the interface can be selected for color conversion.
It should be noted that, for simplicity of description, the above-mentioned embodiments of the method are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the order of acts described, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.
Claims (8)
1. An interface resurfacing method, comprising:
receiving an interface skin changing request message sent by a terminal;
selecting a change mode of three components of red R, green G and blue B of a color mode RGB code in an interface pixel according to the request message;
converting the RGB codes according to the selected change mode;
and configuring the color of the current mode according to the converted RGB code, and rendering the configured color to a screen.
2. The method according to claim 1, wherein selecting the variation pattern of the three components of red R, green G and blue B of the color pattern RGB code in the interface pixel according to the request message comprises:
selecting a trigger value of a trigger bit in the RGB code matched with the request message according to the request message, where the trigger value is used to trigger a variation pattern of the corresponding R, G, B three components, and the variation pattern is a position variation pattern or a component value variation pattern.
3. The method of claim 2, wherein the trigger bit is located at a highest bit in the RGB code.
4. The method of claim 1 or 2, wherein said converting the RGB code according to the selected variation pattern comprises:
controlling the R, G, B position change of the three components in the RGB code in response to the trigger value notification;
or,
and controlling the R, G, B to change the values of the three components in response to the notification of the trigger value.
5. An interface resurfacing device, comprising:
the receiving module is used for receiving an interface skin changing request message sent by the terminal;
the selection module is used for selecting the change modes of the red R, the green G and the blue B components of the RGB code of the color mode in the interface pixel according to the request message received by the receiving module;
the conversion module is used for converting the RGB codes according to the change mode selected by the selection module;
and the output module is used for configuring the color of the current mode according to the converted RGB code and rendering the configured color to a screen.
6. The apparatus of claim 5, wherein the selection module comprises:
the trigger unit is configured to select a trigger value of a trigger bit in the RGB code matched with the request message according to the request message, where the trigger value is used to trigger a change pattern of the corresponding R, G, B three components, and the change pattern is a position change pattern or a component value change pattern.
7. The apparatus of claim 6, wherein the trigger bit in the trigger unit is located at a highest bit in the RGB code.
8. The apparatus of claim 5, wherein the selection module further comprises:
the position change unit is used for responding to the notice of the trigger unit and controlling the R, G, B to change the positions of the three components in the RGB code;
the component value change unit is used for responding to the notice of the trigger unit and controlling the change of the three component values R, G, B.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013103269405A CN103399767A (en) | 2013-07-31 | 2013-07-31 | Interface skin-changing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2013103269405A CN103399767A (en) | 2013-07-31 | 2013-07-31 | Interface skin-changing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN103399767A true CN103399767A (en) | 2013-11-20 |
Family
ID=49563401
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2013103269405A Pending CN103399767A (en) | 2013-07-31 | 2013-07-31 | Interface skin-changing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103399767A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106547530A (en) * | 2015-09-23 | 2017-03-29 | 北京搜狗科技发展有限公司 | A kind of interface processing method and device |
CN107133038A (en) * | 2017-04-28 | 2017-09-05 | 广州阿里巴巴文学信息技术有限公司 | A kind of application program changes the method and its device of skin |
CN109614173A (en) * | 2017-09-30 | 2019-04-12 | 腾讯科技(深圳)有限公司 | A kind of skin change method and device |
CN114449231A (en) * | 2020-10-31 | 2022-05-06 | 荣耀终端有限公司 | Image conversion method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6639628B1 (en) * | 1998-10-22 | 2003-10-28 | Samsung Electronics Co., Ltd. | Apparatus and method for processing color images |
CN101193229A (en) * | 2006-11-21 | 2008-06-04 | 深圳Tcl新技术有限公司 | A method and system for skin change of TV function interface |
CN101355634A (en) * | 2008-08-26 | 2009-01-28 | 北京中星微电子有限公司 | Method and system for regulating image chromaticity |
CN101414258A (en) * | 2008-12-03 | 2009-04-22 | 腾讯科技(深圳)有限公司 | Method and apparatus for changing color of skin picture |
CN102446097A (en) * | 2011-09-29 | 2012-05-09 | 奇智软件(北京)有限公司 | Method for changing user interface skins |
-
2013
- 2013-07-31 CN CN2013103269405A patent/CN103399767A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6639628B1 (en) * | 1998-10-22 | 2003-10-28 | Samsung Electronics Co., Ltd. | Apparatus and method for processing color images |
CN101193229A (en) * | 2006-11-21 | 2008-06-04 | 深圳Tcl新技术有限公司 | A method and system for skin change of TV function interface |
CN101355634A (en) * | 2008-08-26 | 2009-01-28 | 北京中星微电子有限公司 | Method and system for regulating image chromaticity |
CN101414258A (en) * | 2008-12-03 | 2009-04-22 | 腾讯科技(深圳)有限公司 | Method and apparatus for changing color of skin picture |
CN102446097A (en) * | 2011-09-29 | 2012-05-09 | 奇智软件(北京)有限公司 | Method for changing user interface skins |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106547530A (en) * | 2015-09-23 | 2017-03-29 | 北京搜狗科技发展有限公司 | A kind of interface processing method and device |
CN107133038A (en) * | 2017-04-28 | 2017-09-05 | 广州阿里巴巴文学信息技术有限公司 | A kind of application program changes the method and its device of skin |
CN109614173A (en) * | 2017-09-30 | 2019-04-12 | 腾讯科技(深圳)有限公司 | A kind of skin change method and device |
CN114449231A (en) * | 2020-10-31 | 2022-05-06 | 荣耀终端有限公司 | Image conversion method and device |
CN114449231B (en) * | 2020-10-31 | 2023-11-24 | 荣耀终端有限公司 | Image conversion method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6491957B2 (en) | Electronic apparatus and image processing method | |
US9665952B2 (en) | Information processing method and electronic device | |
CN103399767A (en) | Interface skin-changing method and device | |
CN103207778B (en) | A kind of modification figure calibration method, device and mobile terminal | |
JPH1132227A (en) | Image-processing method and unit and storage medium | |
WO2018126594A1 (en) | Display switching method for terminal, and terminal | |
CN106775688A (en) | Application icon generation method and device | |
CN112055875A (en) | Partial image frame update system and method for electronic display | |
CN106251382B (en) | Method and system for realizing picture style switching, camera rendering and theme updating | |
CN112925596A (en) | Mobile terminal and display method of display object thereof | |
JP2006074162A5 (en) | ||
KR20170025292A (en) | Display apparatus and display panel driving method thereof | |
CN112114919B (en) | Screen rotation display optimization method and device | |
CN104601786A (en) | Method for controlling information reminder light of terminal, and terminal | |
CN103593828A (en) | Image processing method capable of carrying out partial filter adding | |
CN103561350A (en) | Image adjusting control method and image adjusting control device for smart television | |
CN106201393B (en) | Information processing method and electronic equipment | |
CN112486679A (en) | Pod scheduling method, device and equipment for kubernets cluster | |
CN112866483B (en) | Display method of terminal, display control device, terminal and electronic equipment | |
JP5865517B2 (en) | Image display method and apparatus | |
CN111741164B (en) | Sound mode switching method and device and computer readable storage medium | |
CN112148288A (en) | Interface color setting method, device, equipment and storage medium | |
US20150109463A1 (en) | Method and system for generating modified display data | |
CN109361811B (en) | Function mode control method, function mode control device, computer equipment and storage medium | |
JP6381789B2 (en) | Display control device and control terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into 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: 20131120 |