CN106547530A - A kind of interface processing method and device - Google Patents

A kind of interface processing method and device Download PDF

Info

Publication number
CN106547530A
CN106547530A CN201510613695.5A CN201510613695A CN106547530A CN 106547530 A CN106547530 A CN 106547530A CN 201510613695 A CN201510613695 A CN 201510613695A CN 106547530 A CN106547530 A CN 106547530A
Authority
CN
China
Prior art keywords
color
user interface
color information
interface
value
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
CN201510613695.5A
Other languages
Chinese (zh)
Inventor
李嘉伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sogou Technology Development Co Ltd
Original Assignee
Beijing Sogou Technology Development Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sogou Technology Development Co Ltd filed Critical Beijing Sogou Technology Development Co Ltd
Priority to CN201510613695.5A priority Critical patent/CN106547530A/en
Publication of CN106547530A publication Critical patent/CN106547530A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

A kind of interface processing method and device are embodiments provided, method therein is specifically included:The colouring information of receiving user's input;Colour switching is carried out to the material of user interface, with by the colour switching of the material as the corresponding color of the colouring information;According to the material after colour switching, new user interface is generated.The embodiment of the present invention can strengthen the rich of user interface such that it is able to meet user for the individual demand of the color of user interface.

Description

Interface processing method and device
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to an interface processing method and an interface processing apparatus.
Background
With the continuous development and improvement of computer application programs, users have personalized display requirements on application program interfaces, and meanwhile, higher and higher requirements are put forward on the attractiveness and usability of the application program interfaces, which brings great challenges to the processing of the interfaces.
The processing procedure of the existing scheme interface may specifically include: different materials are provided by designers, developers develop processing algorithms, the processing algorithms decode the materials provided by the designers, and the encoded materials are rendered on an interface.
However, the existing solutions can only provide a limited number of user interface solutions according to the designed materials, and different users have different requirements for the interfaces, so the existing solutions cannot meet the personalized requirements of the users.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are provided to provide an interface processing method and a corresponding interface processing apparatus, which overcome or at least partially solve the above problems, and can enhance richness of a user interface, so that personalized requirements of a user for color settings of the user interface can be met.
In order to solve the above problem, an embodiment of the present invention discloses an interface processing method, including:
receiving color information input by a user;
performing color transformation on a material of a user interface to transform the color of the material into a color corresponding to the color information;
and generating a new user interface according to the material after the color conversion.
Preferably, if the material is not provided with an alpha channel, the step of performing a color transformation on the material of the user interface includes:
and converting the L value of the material in the HSL mode into a value corresponding to the color information.
Preferably, the color information includes: the step of converting the L value of the material in the HSL mode into a value corresponding to the color information according to the target RGB value includes:
converting the material from an RGB mode to an HSL mode;
converting the target RGB value to a target HSL value; wherein the target HSL value comprises: a target L value;
and converting the L value of the material in the HSL mode into the target L value.
Preferably, if the material has an alpha channel, the step of performing color transformation on the material of the user interface includes:
and converting the color value of the material in the RGB mode into a color value corresponding to the color information.
Preferably, the step of receiving color information input by a user includes:
displaying at least one color information corresponding to a user interface or an interface element and a selection control corresponding to the color information;
and determining the color information corresponding to the user interface or the interface element input by the user according to the selection operation of the user on the displayed color information.
Preferably, the step of receiving color information input by a user includes:
displaying a user interface or a color matching device corresponding to an interface element;
and collecting color information input by a user through the color matching device.
Preferably, the method further comprises: and generating a preview of the new user interface according to the material after the color conversion.
Preferably, the color information includes: and color information corresponding to the interface element, wherein the step of performing color transformation on the material of the user interface comprises the following steps of:
searching a target pixel corresponding to the interface element from a material of a user interface, and converting the color of the target pixel into a color corresponding to the color information; and/or
And searching a target material corresponding to the interface element from a plurality of materials of the user interface, and converting the color of the target material into the color corresponding to the color information.
Preferably, the step of performing color transformation on the material of the user interface includes:
decoding the material of the user interface into a binary stream;
performing color transformation on the binary stream to transform the color of the material into a color corresponding to the color information;
the step of generating a new user interface according to the material after color conversion comprises the following steps:
encoding the color-transformed binary stream;
and rendering the coding result to obtain a corresponding new user interface.
Preferably, the interface element includes: a border and/or an icon of the status bar.
On the other hand, the embodiment of the invention also discloses an interface processing device, which comprises:
the color receiving module is used for receiving color information input by a user;
the color conversion module is used for performing color conversion on a material of a user interface so as to convert the color of the material into a color corresponding to the color information; and
and the interface generation module is used for generating a new user interface according to the material after the color conversion.
Preferably, if the material does not have an alpha channel, the color conversion module includes:
and the first transformation submodule is used for transforming the L value of the material in the HSL mode into a value corresponding to the color information.
Preferably, the color information includes: a target RGB value, the first transformation submodule comprising:
the first conversion unit is used for converting the material from an RGB mode to an HSL mode;
a second conversion unit for converting the target RGB value into a target HSL value; wherein the target HSL value comprises: a target L value; and
and the third conversion unit is used for converting the L value of the material in the HSL mode into the target L value.
Preferably, if the material has an alpha channel, the color transformation module includes:
and the second transformation submodule is used for transforming the color values of the material in the RGB mode into color values corresponding to the color information.
Preferably, the receiving module includes:
the first display submodule is used for displaying at least one color information corresponding to a user interface or an interface element and a selection control corresponding to the color information; and
and the determining submodule is used for determining the color information corresponding to the user interface or the interface element input by the user according to the selection operation of the user on the displayed color information.
Preferably, the receiving module includes:
the second display submodule is used for displaying a user interface or a color matching device corresponding to the interface element; and
and the collecting submodule is used for collecting color information input by a user through the color mixing device.
Preferably, the apparatus further comprises: and the preview image generating module is used for generating a preview image of the new user interface according to the material after the color conversion.
Preferably, the color information includes: and color information corresponding to the interface element, wherein the color conversion module comprises:
the third transformation submodule is used for searching a target pixel corresponding to the interface element from a material of a user interface and transforming the color of the target pixel into the color corresponding to the color information; and/or
And the fourth transformation submodule is used for searching a target material corresponding to the interface element from a plurality of materials of the user interface and transforming the color of the target material into the color corresponding to the color information.
Preferably, the color conversion module includes:
the decoding submodule is used for decoding the material of the user interface into binary stream;
the transformation submodule is used for carrying out color transformation on the binary stream so as to transform the color of the material into the color corresponding to the color information;
the interface generation module comprises:
the encoding submodule is used for encoding the binary stream after the color transformation;
and the rendering submodule is used for rendering the coding result to obtain a corresponding new user interface.
Preferably, the interface element includes: a border and/or an icon of the status bar.
The embodiment of the invention has the following advantages:
the embodiment of the invention allows a user to specify the color information of the user interface, so that the material of the user interface is subjected to color conversion to convert the color of the material into the color corresponding to the color information, and a new user interface is generated according to the material after the color conversion; according to the embodiment of the invention, the new user interface corresponding to any color information specified by the user can be generated through material processing, so that the richness of the user interface can be enhanced, and the personalized requirements of the user on the color of the user interface can be met.
When a user specifies color information of a user interface, color information of any interface element in the user interface can be specified, and under the condition, partial materials corresponding to the interface element can be processed, so that the color effect of the interface element is realized in a new user interface through color conversion of the interface element; taking the status bar of the input method program as an example, the user can designate the color information of the frame as a first color and the color of the icon as a second color, so that the personalized requirement of simple single color can be met when the first color and the second color are the same, and the personalized requirement of multi-color matching can be met when the first color and the second color are different.
Drawings
FIG. 1 is a flowchart illustrating a first embodiment of an interface processing method according to the present invention;
FIG. 2 is a schematic diagram of a configuration interface of an input method status bar according to the present invention;
FIG. 3 is a schematic diagram of a configuration interface of another input method status bar according to the present invention;
FIG. 4 is a flowchart illustrating the steps of a second embodiment of the interface processing method according to the present invention;
FIG. 5 is a schematic diagram of an interface processing system according to the present invention;
FIG. 6 is a block diagram of an interface processing apparatus according to a first embodiment of the present invention; and
fig. 7 is a block diagram of a second interface processing apparatus according to a second embodiment of 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.
Method embodiment one
Referring to fig. 1, a flowchart illustrating steps of a first embodiment of an interface processing method according to the present invention is shown, which may specifically include the following steps:
step 101, receiving color information input by a user;
the embodiment of the invention can be applied to the Interface processing flow of the application program, wherein, the User can be allowed to specify the color information of the UI (User Interface) and output the Interface which accords with the color information to the User, thereby meeting the personalized requirements of the User for the color of the User Interface. The embodiment of the invention mainly takes an input method program as an example, introduces the interface processing flow, and the interface processing flows of other application programs can be referred to each other.
Taking the status bar of the input method program as an example, due to different cultural backgrounds, living habits or aesthetic interests, the user has different preferences for the color of the user interface, for example, some users like red, some users like blue, some users like monochrome and simple, and some users like multi-color matching; moreover, users have different requirements for the colors of different elements of the user interface, some users expect different elements to adopt the same color, and some users expect different elements to adopt different colors, and the like. In the embodiment of the invention, the user is allowed to specify the color information of the UI, or the user is allowed to specify the color information of the elements in the UI, so that the personalized requirements of the user on the color of the user interface are met.
It can be understood that, a person skilled in the art can design a setting interface of color information according to the actual application requirements, and receive color information input by a user through the setting interface.
The embodiment of the invention can provide the following technical scheme for receiving the color information input by the user:
technical proposal A1,
Technical solution a1 may directly display at least one color information corresponding to a user interface or an interface element, so that a user selects a desired color information from the displayed at least one color information, and accordingly, the step of receiving the color information input by the user may specifically include:
step S11, displaying at least one color information corresponding to a user interface or an interface element and a selection control corresponding to the color information;
and step S12, determining the color information corresponding to the user interface or interface element input by the user according to the selection operation of the user on the displayed color information.
Referring to fig. 2, a schematic structural diagram of a setting interface of an input method status bar according to the present invention is shown, which may specifically include: a border color area 201 for displaying border colors of the status bar, an icon color area 202 for displaying icon colors of the status bar, an icon selection area 203 for selecting icons which need to be displayed in the status bar and set colors, a preview area 204 for previewing setting effects of colors, an application control 205 for submitting current border colors and current icon colors to an input method program, and a default restoring control 206 for restoring default colors of a user interface; here, the border of the status bar is used to represent the peripheral outline of the status bar, the icon of the status bar is used to represent the icon inside the status bar, and the default color of the user interface is usually the color corresponding to the material provided by the designer.
In an application example of the present invention, the setting interface shown in fig. 2 may be triggered through a right-click menu of an input method status bar, and it can be understood that the layout and the specific triggering manner of the setting interface shown in fig. 2 are not limited by the embodiment of the present invention.
Technical proposal A2,
Technical solution a2 may display a color matching device corresponding to a user interface or an interface element, and allow a user to obtain desired color information by color matching through the color matching device, and accordingly, the step of receiving the color information input by the user may specifically include:
step S21, displaying a user interface or a color matching device corresponding to the interface element;
and step S22, collecting color information input by a user through the color matching device.
Referring to fig. 3, a schematic structural diagram of a setting interface of another input method status bar according to the present invention is shown, which may specifically include: a basic color area 301 for displaying basic colors, a custom color area 302 for displaying custom colors, a palette area 303 for palette, an add custom color control 304 for adding palette results to custom colors, and a determine control 305 for submitting current color information to an input method program.
In an alternative embodiment of the present invention, the configuration of the setting interface shown in fig. 2 may further include an ≧ control 207, and the color matching apparatus may be called up through the ≧ control 207, which is to be understood that the embodiment of the present invention does not limit a specific calling-up manner of the color matching apparatus.
While the above technical solutions a1 and a2 for receiving color information input by a user are described in detail, it can be understood that a person skilled in the art may adopt any one or a combination of the above technical solutions a1 and a2, or may also adopt other technical solutions for receiving color information input by a user according to practical application requirements, and the specific technical solution for receiving color information input by a user in the embodiment of the present invention is not limited.
102, performing color transformation on a material of a user interface to transform the color of the material into a color corresponding to the color information;
in the embodiment of the present invention, the material of the user interface may be used to represent the original material provided by the designer, and the original material may be represented in the form of a picture, an icon, or the like, and the number of the original material may be one or more.
In order to enhance the richness of the interface, in the conventional scheme, various materials can be designed in advance by designers aiming at one or more interface elements in the interface, and the various materials are rendered on the corresponding interface through the processing method, so that the interface with various presentation effects is provided for a user; however, the above conventional scheme requires a large amount of design cost; also, due to the above design cost limitation, the above conventional scheme can generally implement only a limited variety of colors, however, the RGB (Red green blue) image has 256 × 256 — 16777216 colors in total, and obviously, the above conventional scheme cannot implement all kinds of colors. Here, the RGB scheme is a color standard in the industry, and various colors are obtained by changing three color channels of red (R), green (G), and blue (B) and superimposing them on each other, and RGB is a color representing three channels of red, green, and blue.
Compared with the traditional scheme, the color information input by the user is realized by performing color conversion on the original material, and for a designer, the designer only needs to provide the original material forming the user interface and does not need to design materials with various color configurations in advance, so that the design cost is greatly saved, and compared with the material design of the traditional scheme, the color conversion processing on the original material has the advantages of simplicity in operation and high operation efficiency.
The embodiment of the invention can provide the following technical scheme for carrying out color conversion on the materials of the user interface:
technical proposal B1,
The technical solution may perform color transformation on a material without an Alpha (Alpha) channel, and the color transformation process may specifically include:
and step S31, converting the L value of the material in the HSL mode into a value corresponding to the color information.
For material without Alpha channel, the RGB value is usually a value with evenly distributed data, such as RGB (255 ), RGB (64,64,64), etc., that is, R, G, B the distribution of three components is completely regular; while the RGB values in the color information input by the user may be irregular values, the technical solution B1 may transform the L values of the material in the HSL mode, and keep the H values and the S values unchanged, so as to implement the uniformly distributed RGB values. Here, the HSL (Hue, Saturation, Lightness, Hue, Saturation, and Lightness) color mode is a color standard in the industry, and various colors are obtained by changing three color channels of Hue (H), Saturation (S), and Lightness (L) and superimposing them on each other, and the HSL is a color representing three channels of Hue, Saturation, and Lightness.
In an optional embodiment of the present invention, the color information may specifically include: the step S31 of converting the L value of the material in the HSL mode into a value corresponding to the color information according to the target RGB value may specifically include:
step S311, converting the material from an RGB mode to an HSL mode;
step S312, converting the target RGB value into a target HSL value; the target HSL value may specifically include: a target H value, a target S value, and a target L value;
and step 313, converting the L value of the material in the HSL mode into the target L value.
It is understood that after step S313, the material may also be converted from HSL mode to RGB mode.
In an application example of the present invention, a conversion algorithm in the image processing open source library may be used to perform conversion from RGB mode to HSL mode, and conversion from HSL mode to RGB mode, and the conversion process between RGB mode and HSL mode is not limited by the embodiment of the present invention.
For some interface rendering layers which do not support processing of materials with Alpha channels, the technical scheme B1 has better compatibility, and therefore, the technical scheme B1 has the advantage of wide application range.
Technical proposal B2,
Technical solution B2 is to perform color transformation on a material with an Alpha channel, and the step of performing color transformation on the material of the user interface may specifically include:
and step S41, converting the color value of the material in the RGB mode into a color value corresponding to the color information.
The Alpha channel is an 8-bit grayscale channel that records transparency information in an image with 256 levels of grayscale, defining transparent, opaque, and translucent regions, where black indicates transparent, white indicates opaque, and gray indicates translucent. For the material with Alpha channel, the RGB value may be an irregular value, so the technical scheme B2 may perform the color transformation of the material with Alpha channel in RGB mode.
As for the technical solution B2, since the conversion of the color mode or the additional calculation may not be performed, and the conversion of the RGB values may be directly performed, the technical solution B2 has an advantage of simple operation; moreover, the transparent or semitransparent effect of the material background can be realized through the Alpha channel, so that the technical scheme B2 can also enhance the visual experience of the user.
As described above in detail with respect to the technical solutions B1 and B2 for performing color transformation on the user interface material, it can be understood that a person skilled in the art may use any one or a combination of the above technical solutions B1 and B2 according to the actual application requirement, wherein when the technical solution B1 and the technical solution B2 are combined, two materials of the user interface may be provided: the method comprises the steps of carrying out color conversion on a material with an Alpha channel and a material without the Alpha channel respectively to obtain two corresponding new user interfaces for designers or users to select.
It should be noted that, in the process of performing color transformation on the material of the user interface, the raw material of the user interface may be read first, and the raw material is decoded into a binary stream, and color transformation is performed on the pixels in the binary stream.
In an optional embodiment of the present invention, the color information may specifically include: the step of performing color transformation on the material of the user interface may specifically include:
step S51, searching a target pixel corresponding to the interface element from a material of a user interface, and converting the color of the target pixel into a color corresponding to the color information; and/or
Step S51 may be applicable to a situation where multiple interface elements are located in the same material, for example, the interface elements specifically include: when the first interface element and the second interface element are used, a first pixel value corresponding to the first interface element and a second pixel value corresponding to the second interface element can be respectively read, the first pixel value is converted into a first target color value designated by a user, and the second pixel value is converted into a second target color value designated by the user.
Step S52, searching a target material corresponding to the interface element from a plurality of materials of the user interface, and converting the color of the target material into the color corresponding to the color information.
Step S52 may be applied to a case where each interface element has an independent material, and taking the icon of the input method status bar shown in fig. 2 as an example, each icon may have a corresponding material, so that when the user specifies the color information of the icon, the target material corresponding to each icon may be found from multiple materials of the user interface, and each target material may be processed separately to convert the color of the target material into the color corresponding to the color information.
It is to be understood that the border and/or the icon of the status bar are only used as an application example of the interface element, and are not to be construed as an application limitation of the embodiment of the present invention to the interface element, and in fact, a person skilled in the art may provide a setting interface of any interface element to a user according to the actual situation of the user interface, so that the user may specify the color information of any interface element, thereby presenting the color effect of any interface element in a new user interface.
And 103, generating a new user interface according to the material after the color conversion.
In order to enable the user interface effect after the color change to be displayed to the user more quickly and intuitively, so as to facilitate the selection of the user, in an optional embodiment of the present invention, in the interface processing process, a preview of a new user interface can be dynamically generated, and specifically, a preview of the new user interface can be generated according to the material after the color change. For example, a preview of the new user interface may be presented in the preview area 204 of fig. 2 to enable the user to quickly determine whether the current color information is the color desired by the user, thereby enabling the user to determine whether to continue selecting color information or to apply the current color information.
When the user determines to continue to select the color information, the preview of the new user interface can be regenerated according to the reselected color information, that is, the preview of the new user interface or the new user interface is dynamically generated in the running process of the application program in the embodiment of the invention.
Upon the user triggering the application control 205 of fig. 2, the current color information may be determined to apply, so that the new user interface generated in step 103 may be displayed. Of course, the function indication of the preview image as described above is an alternative embodiment, and whether to start the function of the preview image may be flexibly selected by the user through setting.
It should be noted that, in addition to performing color transformation on a material of a user interface to transform the color of the material into a color corresponding to the color information of the interface element, the embodiment of the present invention may also obtain the interface element that meets the color information in other manners, for example, the interface element that meets the color information may be obtained by drawing, that is, the embodiment of the present invention may combine material processing and drawing manners to obtain a user interface that meets the personalized requirements of the user.
In an optional embodiment of the present invention, when there is a pixel corresponding to an interface element in the material or the interface element has an independent material, the material processing method shown in fig. 1 may be adopted, and when there is no pixel corresponding to the interface element in the material and the interface element does not have an independent material, a drawing method may be adopted.
In another optional embodiment of the present invention, when the interface element has a characteristic of simple drawing, a drawing manner may be adopted, and in this case, the processing efficiency of the interface may still be ensured. For example, a frame that matches the user-specified color information may be drawn for the status bar shown in fig. 2.
In summary, the embodiment of the present invention allows a user to specify color information of a user interface, perform color transformation on a material of the user interface to transform the color of the material into a color corresponding to the color information, and generate a new user interface according to the material after the color transformation; the embodiment of the invention can generate a new user interface corresponding to any color information specified by the user, so that the embodiment of the invention can enhance the richness of the user interface, thereby meeting the personalized requirements of the user for the color of the user interface.
Compared with the traditional scheme that a plurality of materials corresponding to a plurality of color information are designed in advance, the color information input by the user is realized by performing color conversion on the original materials, and because the embodiment of the invention does not require to design a large number of materials in advance, a designer only needs to provide the original materials forming the user interface, the design cost is greatly saved; moreover, the processing of color conversion on the raw material has the advantages of simple operation and high operation efficiency.
Method embodiment two
Referring to fig. 4, a flowchart illustrating steps of a second embodiment of the interface processing method according to the present invention is shown, which may specifically include the following steps:
step 401, receiving color information input by a user;
step 402, decoding the material of the user interface into a binary stream;
step 403, performing color transformation on the binary stream to transform the color of the material into a color corresponding to the color information;
step 404, encoding the binary stream after color conversion;
and 405, rendering the coding result to obtain a corresponding new user interface.
Compared with the first method embodiment, this embodiment describes a specific process of performing color transformation on the material of the user interface through steps 402 and 403, and describes a specific process of generating a new user interface according to the material after color transformation through steps 404 and 405.
In practical applications, a corresponding decoding algorithm or encoding algorithm may be adopted according to the format of the material. The format of the material may specifically include: JPEG (joint photographic Experts Group), PNG (Portable network Graphics Format), GIF (Graphics Interchange Format), and the like, and the specific Format of the material is not limited in the embodiment of the present invention. In one example of the application of the present invention, the material loaded into the application may be decoded into a binary stream using a decoding algorithm in the CxImage library. Here, the CxImage library is a free C + + image processing open source library, which has many image processing algorithms built in. The supported picture formats specifically include: JPEG, PNG, etc.; and the open source protocol of the CxImage library uses a zlib data compression library protocol, and the source code can be changed without limitation during use. It is to be understood that the decoding or encoding process of the material is not limited by the embodiments of the present invention.
To make the embodiment of the present invention better, referring to fig. 5, a schematic structural diagram of an interface processing system of the present invention is shown, which may specifically include: an interface rendering layer 501, a material processing module 502 and an image processing open source library 503; wherein,
the interface rendering layer 501 may receive color information submitted by a user, and submit the original material of the user interface and the color information to the material processing module 502; under the condition that the user interface corresponds to a plurality of materials, the material processing module 502 can be called for a plurality of times to obtain processed materials;
after receiving the original material and the color information of the interface rendering layer 501, the material processing module 502 may first decode the material into a binary stream using a CxImage library, then process the binary stream according to the form of the material (whether there is an Alpha channel), then encode the processed binary stream using the CxImage library, and finally send the encoded binary stream to the interface rendering layer 501;
since the encoded material is the material that the interface rendering layer 501 can directly render to the user interface, the rendering result can be displayed to the user after the interface rendering layer 501 renders the material.
It should be noted that the encoded binary stream is only an example of an encoding result, and is not to be understood as a limitation to the form of the encoding result in the embodiment of the present invention, and actually, it may also be expressed in the form of a material file or the like.
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.
Apparatus embodiment one
Referring to fig. 6, a block diagram of a first embodiment of an interface processing apparatus according to the present invention is shown, which may specifically include the following modules:
a color receiving module 601, configured to receive color information input by a user;
a color transformation module 602, configured to perform color transformation on a material of a user interface, so as to transform a color of the material into a color corresponding to the color information; and
and an interface generating module 603, configured to generate a new user interface according to the material after the color conversion.
In an optional embodiment of the present invention, if the material does not have an alpha channel, the color transformation module 602 may specifically include:
and the first transformation submodule is used for transforming the L value of the material in the HSL mode into a value corresponding to the color information.
In another optional embodiment of the present invention, the color information may specifically include: the target RGB value, the first transformation submodule may specifically include:
the first conversion unit is used for converting the material from an RGB mode to an HSL mode;
a second conversion unit for converting the target RGB value into a target HSL value; wherein the target HSL value comprises: a target L value; and
and the third conversion unit is used for converting the L value of the material in the HSL mode into the target L value.
In yet another optional embodiment of the present invention, if the material has an alpha channel, the color transformation module 602 may specifically include:
and the second transformation submodule is used for transforming the color values of the material in the RGB mode into color values corresponding to the color information.
In another optional embodiment of the present invention, the receiving module 601 may specifically include:
the first display submodule is used for displaying at least one color information corresponding to a user interface or an interface element and a selection control corresponding to the color information; and
and the determining submodule is used for determining the color information corresponding to the user interface or the interface element input by the user according to the selection operation of the user on the displayed color information.
In an optional embodiment of the present invention, the receiving module 601 may specifically include:
the second display submodule is used for displaying a user interface or a color matching device corresponding to the interface element; and
and the collecting submodule is used for collecting color information input by a user through the color mixing device.
In another optional embodiment of the present invention, the apparatus may further comprise: and the preview image generating module is used for generating a preview image of the new user interface according to the material after the color conversion.
In yet another optional embodiment of the invention, the color information comprises: the color information corresponding to the interface element, the color transformation module 602 may specifically include:
and the third conversion submodule is used for converting the color of the pixel corresponding to the interface element in the material into the color corresponding to the color information.
In an optional embodiment of the present invention, the interface element may specifically include: a border and/or an icon of the status bar.
Device embodiment II
Referring to fig. 7, a block diagram of a second embodiment of the interface processing apparatus according to the present invention is shown, which may specifically include the following modules:
a color receiving module 701, configured to receive color information input by a user;
a color transformation module 702, configured to perform color transformation on a material of a user interface to transform a color of the material into a color corresponding to the color information; and
an interface generating module 703, configured to generate a new user interface according to the material after color conversion;
the color conversion module 702 may specifically include:
a decoding sub-module 721 for decoding the material of the user interface into a binary stream;
the transformation submodule 722 is used for performing color transformation on the binary stream so as to transform the color of the material into the color corresponding to the color information;
the interface generating module 703 may specifically include:
an encoding sub-module 731 for encoding the color transformed binary stream;
the rendering submodule 732 is configured to render the encoding result to obtain a corresponding new user interface.
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.
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.
In a typical configuration, the computer device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory. The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium. Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (fransitory media), such as modulated data signals and carrier waves.
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 interface processing method and the interface processing apparatus provided by the present invention are described in detail above, and the principle and the implementation of the present invention are explained in the present document by applying specific examples, and the description of the above examples is only used to help understanding the method and the core idea of the present 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 (20)

1. An interface processing method, comprising:
receiving color information input by a user;
performing color transformation on a material of a user interface to transform the color of the material into a color corresponding to the color information;
and generating a new user interface according to the material after the color conversion.
2. The method of claim 1, wherein the material is not associated with an alpha channel, and wherein the step of color transforming the material of the user interface comprises:
and converting the L value of the material in the HSL mode into a value corresponding to the color information.
3. The method of claim 2, wherein the color information comprises: the step of converting the L value of the material in the HSL mode into a value corresponding to the color information according to the target RGB value includes:
converting the material from an RGB mode to an HSL mode;
converting the target RGB value to a target HSL value; wherein the target HSL value comprises: a target L value;
and converting the L value of the material in the HSL mode into the target L value.
4. The method of claim 1, wherein the material is associated with an alpha channel, and wherein the step of color transforming the material of the user interface comprises:
and converting the color value of the material in the RGB mode into a color value corresponding to the color information.
5. The method according to any one of claims 1 to 4, wherein the step of receiving user-input color information comprises:
displaying at least one color information corresponding to a user interface or an interface element and a selection control corresponding to the color information;
and determining the color information corresponding to the user interface or the interface element input by the user according to the selection operation of the user on the displayed color information.
6. The method according to any one of claims 1 to 4, wherein the step of receiving user-input color information comprises:
displaying a user interface or a color matching device corresponding to an interface element;
and collecting color information input by a user through the color matching device.
7. The method according to any one of claims 1 to 4, further comprising: and generating a preview of the new user interface according to the material after the color conversion.
8. The method according to any one of claims 1 to 4, wherein the color information comprises: and color information corresponding to the interface element, wherein the step of performing color transformation on the material of the user interface comprises the following steps of:
searching a target pixel corresponding to the interface element from a material of a user interface, and converting the color of the target pixel into a color corresponding to the color information; and/or
And searching a target material corresponding to the interface element from a plurality of materials of the user interface, and converting the color of the target material into the color corresponding to the color information.
9. The method of any one of claims 1 to 4, wherein the step of color transforming the material of the user interface comprises:
decoding the material of the user interface into a binary stream;
performing color transformation on the binary stream to transform the color of the material into a color corresponding to the color information;
the step of generating a new user interface according to the material after color conversion comprises the following steps:
encoding the color-transformed binary stream;
and rendering the coding result to obtain a corresponding new user interface.
10. The method of claim 8, wherein the interface element comprises: a border and/or an icon of the status bar.
11. An interface processing apparatus, comprising:
the color receiving module is used for receiving color information input by a user;
the color conversion module is used for performing color conversion on a material of a user interface so as to convert the color of the material into a color corresponding to the color information; and
and the interface generation module is used for generating a new user interface according to the material after the color conversion.
12. The apparatus of claim 11, wherein the material is without an alpha channel, and wherein the color transform module comprises:
and the first transformation submodule is used for transforming the L value of the material in the HSL mode into a value corresponding to the color information.
13. The apparatus of claim 12, wherein the color information comprises: a target RGB value, the first transformation submodule comprising:
the first conversion unit is used for converting the material from an RGB mode to an HSL mode;
a second conversion unit for converting the target RGB value into a target HSL value; wherein the target HSL value comprises: a target L value; and
and the third conversion unit is used for converting the L value of the material in the HSL mode into the target L value.
14. The apparatus of claim 11, wherein the material is associated with an alpha channel, and wherein the color transform module comprises:
and the second transformation submodule is used for transforming the color values of the material in the RGB mode into color values corresponding to the color information.
15. The apparatus according to any one of claims 11 to 14, wherein the receiving module comprises:
the first display submodule is used for displaying at least one color information corresponding to a user interface or an interface element and a selection control corresponding to the color information; and
and the determining submodule is used for determining the color information corresponding to the user interface or the interface element input by the user according to the selection operation of the user on the displayed color information.
16. The apparatus according to any one of claims 11 to 14, wherein the receiving module comprises:
the second display submodule is used for displaying a user interface or a color matching device corresponding to the interface element; and
and the collecting submodule is used for collecting color information input by a user through the color mixing device.
17. The apparatus of any of claims 11 to 14, further comprising: and the preview image generating module is used for generating a preview image of the new user interface according to the material after the color conversion.
18. The apparatus according to any one of claims 11 to 14, wherein the color information comprises: and color information corresponding to the interface element, wherein the color conversion module comprises:
the third transformation submodule is used for searching a target pixel corresponding to the interface element from a material of a user interface and transforming the color of the target pixel into the color corresponding to the color information; and/or
And the fourth transformation submodule is used for searching a target material corresponding to the interface element from a plurality of materials of the user interface and transforming the color of the target material into the color corresponding to the color information.
19. The apparatus of any of claims 11 to 14, wherein the color transform module comprises:
the decoding submodule is used for decoding the material of the user interface into binary stream;
the transformation submodule is used for carrying out color transformation on the binary stream so as to transform the color of the material into the color corresponding to the color information;
the interface generation module comprises:
the encoding submodule is used for encoding the binary stream after the color transformation;
and the rendering submodule is used for rendering the coding result to obtain a corresponding new user interface.
20. The apparatus of claim 18, wherein the interface element comprises: a border and/or an icon of the status bar.
CN201510613695.5A 2015-09-23 2015-09-23 A kind of interface processing method and device Pending CN106547530A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510613695.5A CN106547530A (en) 2015-09-23 2015-09-23 A kind of interface processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510613695.5A CN106547530A (en) 2015-09-23 2015-09-23 A kind of interface processing method and device

Publications (1)

Publication Number Publication Date
CN106547530A true CN106547530A (en) 2017-03-29

Family

ID=58365128

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510613695.5A Pending CN106547530A (en) 2015-09-23 2015-09-23 A kind of interface processing method and device

Country Status (1)

Country Link
CN (1) CN106547530A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108665507A (en) * 2017-03-31 2018-10-16 珠海金山办公软件有限公司 A kind of picture Transparent color setting method and device
CN109992119A (en) * 2017-12-29 2019-07-09 北京搜狗科技发展有限公司 A kind of display methods of interface of input method, device and equipment
CN110851155A (en) * 2019-10-22 2020-02-28 北京四达时代软件技术股份有限公司 Method and device for changing theme colors of set top box interface
CN111399725A (en) * 2020-03-25 2020-07-10 北京字节跳动网络技术有限公司 Method, apparatus, electronic device, and medium for presenting information
CN112988152A (en) * 2021-03-12 2021-06-18 中国平安财产保险股份有限公司 Project icon publishing method, device, equipment and storage medium
CN113535283A (en) * 2020-04-14 2021-10-22 北京搜狗科技发展有限公司 Data processing method and device and electronic equipment
CN114489411A (en) * 2021-12-28 2022-05-13 永中软件股份有限公司 Interface icon processing method, computing device and readable medium
CN114841850A (en) * 2021-02-02 2022-08-02 Oppo广东移动通信有限公司 Image processing method and device and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1878234A (en) * 2005-06-08 2006-12-13 佳能株式会社 Imaging device, control method, and program
CN101021790A (en) * 2007-03-09 2007-08-22 华为技术有限公司 User interface changing method and system
WO2010001278A2 (en) * 2008-07-01 2010-01-07 Talisma Corporation Private Ltd. Process of inheriting colors in a customer relationship management (crm) application from windows vista colors
CN103399767A (en) * 2013-07-31 2013-11-20 深圳创维数字技术股份有限公司 Interface skin-changing method and device
CN103543995A (en) * 2012-07-12 2014-01-29 腾讯科技(北京)有限公司 Website skin change method and device
US20140089827A1 (en) * 2012-09-21 2014-03-27 International Business Machines Corporation Assisting graphical user interface design
CN103744942A (en) * 2013-12-31 2014-04-23 广州市动景计算机科技有限公司 Web browsing method, web browsing device and web browsing terminal device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1878234A (en) * 2005-06-08 2006-12-13 佳能株式会社 Imaging device, control method, and program
CN101021790A (en) * 2007-03-09 2007-08-22 华为技术有限公司 User interface changing method and system
US20110187737A1 (en) * 2008-01-07 2011-08-04 Talisma Corporation Private Ltd. Process of inheriting colors in a customer relationship management (crm) application from windows vista colors
WO2010001278A2 (en) * 2008-07-01 2010-01-07 Talisma Corporation Private Ltd. Process of inheriting colors in a customer relationship management (crm) application from windows vista colors
CN103543995A (en) * 2012-07-12 2014-01-29 腾讯科技(北京)有限公司 Website skin change method and device
US20140089827A1 (en) * 2012-09-21 2014-03-27 International Business Machines Corporation Assisting graphical user interface design
CN103399767A (en) * 2013-07-31 2013-11-20 深圳创维数字技术股份有限公司 Interface skin-changing method and device
CN103744942A (en) * 2013-12-31 2014-04-23 广州市动景计算机科技有限公司 Web browsing method, web browsing device and web browsing terminal device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108665507A (en) * 2017-03-31 2018-10-16 珠海金山办公软件有限公司 A kind of picture Transparent color setting method and device
CN109992119A (en) * 2017-12-29 2019-07-09 北京搜狗科技发展有限公司 A kind of display methods of interface of input method, device and equipment
CN109992119B (en) * 2017-12-29 2022-05-06 北京搜狗科技发展有限公司 Display method, device and equipment of input method interface
CN110851155A (en) * 2019-10-22 2020-02-28 北京四达时代软件技术股份有限公司 Method and device for changing theme colors of set top box interface
CN111399725A (en) * 2020-03-25 2020-07-10 北京字节跳动网络技术有限公司 Method, apparatus, electronic device, and medium for presenting information
CN113535283A (en) * 2020-04-14 2021-10-22 北京搜狗科技发展有限公司 Data processing method and device and electronic equipment
CN114841850A (en) * 2021-02-02 2022-08-02 Oppo广东移动通信有限公司 Image processing method and device and electronic equipment
CN112988152A (en) * 2021-03-12 2021-06-18 中国平安财产保险股份有限公司 Project icon publishing method, device, equipment and storage medium
CN114489411A (en) * 2021-12-28 2022-05-13 永中软件股份有限公司 Interface icon processing method, computing device and readable medium

Similar Documents

Publication Publication Date Title
CN106547530A (en) A kind of interface processing method and device
AU2010257231B2 (en) Collaborative image capture
US11037275B2 (en) Complex architecture for image processing
CN113593499A (en) Transitioning between video priority and graphics priority
CN109862389B (en) Video processing method, device, server and storage medium
US10067646B2 (en) Color selector for desktop publishing
US10192517B2 (en) Method of adapting a source image content to a target display
US10074193B2 (en) Controlled dynamic detailing of images using limited storage
KR20090038706A (en) Display apparatus and method
US8553977B2 (en) Converting continuous tone images
AU2015359323B2 (en) Method and graphic processor for managing colors of a user interface
CN105430393B (en) Picture processing method, picture processing device, picture processing platform and storage medium
WO2024067461A1 (en) Image processing method and apparatus, and computer device and storage medium
CN111787240B (en) Video generation method, apparatus and computer readable storage medium
CN113938750A (en) Video processing method and device, electronic equipment and storage medium
CN107077824B (en) Image display control apparatus, transmission apparatus, image display control method
CN111090384A (en) Soft keyboard display method and device
CN111199565B (en) Data processing method, device, system, electronic equipment and storage medium
CN108292319B (en) Determining an appearance for an element displayed on a user interface
CN117112090A (en) Business page theme generation method, device, computer equipment, medium and product
CN104021579A (en) Method and device for changing colors of image
JPH096573A (en) Method and system for adjusting image picture color scheme
CN115022713B (en) Video data processing method and device, storage medium and electronic equipment
JP2024046749A (en) Method and apparatus for transforming input image based on target style and target color information
CN117827179A (en) Data processing method, 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

Application publication date: 20170329

RJ01 Rejection of invention patent application after publication