CN104461614A - Method for processing theme resource and electronic device - Google Patents

Method for processing theme resource and electronic device Download PDF

Info

Publication number
CN104461614A
CN104461614A CN201410647520.1A CN201410647520A CN104461614A CN 104461614 A CN104461614 A CN 104461614A CN 201410647520 A CN201410647520 A CN 201410647520A CN 104461614 A CN104461614 A CN 104461614A
Authority
CN
China
Prior art keywords
color
colour system
subject picture
pixel
word message
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.)
Granted
Application number
CN201410647520.1A
Other languages
Chinese (zh)
Other versions
CN104461614B (en
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 CN201410647520.1A priority Critical patent/CN104461614B/en
Publication of CN104461614A publication Critical patent/CN104461614A/en
Application granted granted Critical
Publication of CN104461614B publication Critical patent/CN104461614B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method for processing a theme resource. The method includes the steps of extracting a theme picture from the current theme resource of an application program, and determining a color system of the theme picture; based on the color system of the theme picture, determining that the color of character information is a first color, wherein the character information is character information on interface elements of the application program; based on the first color, extracting a first sub-skin-resource corresponding to the first color from a current skin resource of the application program, wherein a current parameter of a preset configuration item in the first sub-skin-resource is a first color parameter corresponding to the first color, and the preset configuration item is used for controlling the color of the character information; applying the first sub-skin-resource. Meanwhile, the invention discloses an electronic device.

Description

A kind of disposal route of subject resource and electronic equipment
Technical field
The present invention relates to electronic technology field, particularly relate to a kind of disposal route and electronic equipment of subject resource.
Background technology
Relevant technical terms:
Skin resource: comprise a whole set of picture resource and for the color value of each interface element of controlling application program, the configuration file of layout parameter, skin may be used for the layout (such as: the position, shape etc. of each control) controlling each interface element.
Subject resource: comprise the pictures be presented on main interface background look, under prospect control, can use different subject resources under same skin resource, also can use different skin resources under same subject resource.
In existing browser, changing skin is a basic function, provides various the browser layout and the pattern that meet different user hobby.Usually, skin resource can provide a set of picture resource and configuration file carrys out layout window, and subject resource can provide different main interface background for same money skin, skin resource and subject resource being combined to use to meet the interface layout of user habit and aesthetic hobby.
But present inventor finds that above-mentioned technology at least exists following technical matters:
When subject resource being applied in certain a skin resource, exist due to subject picture consistent with the tone of the word on skin and cause word be difficult to recognize technical matters.Such as: the text color specifying certain control in skin is black, but subject picture is also black, word so will be caused to be difficult to identification.
Summary of the invention
The embodiment of the present application is by providing a kind of disposal route and electronic equipment of subject resource, solve in prior art when by the middle of subject application to certain a skin time, exist due to theme consistent with the tone of the word on skin and cause word be difficult to recognize technical matters.
On the one hand, the application provides following technical scheme by an embodiment of the application:
A disposal route for subject resource, comprising:
Subject picture is extracted from the current topic resource of application program;
Determine the colour system of described subject picture;
Based on the colour system of described subject picture, determine that the color of described Word message is the first color, wherein, described Word message is the Word message on the interface element of described application program, and the contrast between described first color and the colour system of described subject picture is greater than default contrast;
Based on described first color, the first sub-skin resource of answering with described first Color pair is extracted from the current skin resource of described application program, wherein, the parameter current of the preset configuration item in described first sub-skin resource is first color parameter of answering with described first Color pair, and described preset configuration item is for controlling the color of described Word message;
Apply described first sub-skin resource.
Preferably, the described colour system determining described subject picture, comprising:
Read the rgb value of each pixel in described subject picture;
The rgb value of described each pixel is converted to the gray-scale value of described each pixel;
Add up gray-scale value in described subject picture and be greater than the second number of pixels that the first number of pixels of default gray-scale value and gray-scale value be less than or equal to described default gray-scale value;
If described first number of pixels is greater than described second number of pixels, then determine that the colour system of described subject picture is light colour system;
If described first number of pixels is less than or equal to described second number of pixels, then determine that the colour system of described subject picture is dark colour system.
Preferably, the corresponding relation between the described colour system based on described subject picture and the color of Word message, determine that the color of described Word message is the first color, comprising:
If the colour system of described subject picture is described dark colour system, then determine that the color of described Word message is for light color;
If the colour system of described subject picture is described light colour system, then determine that the color of described Word message is for dark.
Preferably, the described colour system determining described subject picture, comprising:
Read the rgb value of each pixel in described subject picture;
Based on the rgb value of described each pixel, determine the colour system of described each pixel;
Add up the number of the pixel in described subject picture under each colour system, and colour systems maximum for number of pixels is defined as the colour system of described subject picture.
Preferably, the described rgb value based on described each pixel, determine the colour system of described each pixel, comprising:
Extract the R value in the rgb value of the first pixel, G value, B value respectively, wherein, described first pixel is the arbitrary pixel in described subject picture;
Determine first ratio of described R value in described rgb value, second ratio of described G value in described rgb value, three ratio of described B value in described rgb value;
If described first ratio is greater than described second ratio and described first ratio is greater than described 3rd ratio, then determine that the colour system of described first pixel is red colour system;
If described second ratio is greater than described first ratio and described second ratio is greater than described 3rd ratio, then determine that the colour system of described first pixel is green colour system;
If described 3rd ratio is greater than described first ratio and described 3rd ratio is greater than described second ratio, then determine that the colour system of described first pixel is blue colour system.
Preferably, the corresponding relation between the described colour system based on described subject picture and the color of Word message, determine that the color of described Word message is the first color, comprising:
If the colour system of described subject picture is described red colour system, then determine that the color of described Word message is for white or yellow or blue;
If the colour system of described subject picture is described green colour system, then determine that the color of described Word message is purple or red or black;
If the colour system of described subject picture is described blue colour system, then determine that the color of described Word message is for yellow or red or white.
Preferably, before the described first sub-skin resource of described application, also comprise:
Detect in described subject resource and whether comprise the first appointed information, wherein, described first appointed information is used for the color of the first Word message to be appointed as the second color, described first Word message is the Word message on the first interface element of described application program, and described second color is different from described first color;
If comprise the first appointed information in described subject resource, then extract described first appointed information;
Based on the first appointed information, the parameter current of the first preset configuration item in described first sub-skin resource is revised as second color parameter of answering with described second Color pair, wherein, described first preset configuration item is for controlling the color of described first Word message.
On the other hand, the application, by an embodiment of the application, provides following technical scheme:
A kind of electronic equipment, comprising:
First extraction unit, for extracting subject picture from the current topic resource of application program;
First determining unit, for determining the colour system of described subject picture;
Second determining unit, for the colour system based on described subject picture, determine that the color of described Word message is the first color, wherein, described Word message is the Word message on the interface element of described application program, and the contrast between described first color and the colour system of described subject picture is greater than default contrast;
Second extraction unit, for based on described first color, the first sub-skin resource of answering with described first Color pair is extracted from the current skin resource of described application program, wherein, the parameter current of the preset configuration item in described first sub-skin resource is first color parameter of answering with described first Color pair, and described preset configuration item is for controlling the color of described Word message;
Applying unit, for applying described first sub-skin resource.
Preferably, described first determining unit, specifically for:
Read the rgb value of each pixel in described subject picture; The rgb value of described each pixel is converted to the gray-scale value of described each pixel; Add up gray-scale value in described subject picture and be greater than the second number of pixels that the first number of pixels of default gray-scale value and gray-scale value be less than or equal to described default gray-scale value; If described first number of pixels is greater than described second number of pixels, then determine that the colour system of described subject picture is light colour system; If described first number of pixels is less than or equal to described second number of pixels, then determine that the colour system of described subject picture is dark colour system.
Preferably, described second determining unit, specifically for:
If the colour system of described subject picture is described dark colour system, then determine that the color of described Word message is for light color; If the colour system of described subject picture is described light colour system, then determine that the color of described Word message is for dark.
Preferably, described first determining unit, specifically for:
Read the rgb value of each pixel in described subject picture; Based on the rgb value of described each pixel, determine the colour system of described each pixel; Add up the number of the pixel in described subject picture under each colour system, and colour systems maximum for number of pixels is defined as the colour system of described subject picture.
Preferably, described first determining unit, specifically for:
Extract the R value in the rgb value of the first pixel, G value, B value respectively, wherein, described first pixel is the arbitrary pixel in described subject picture; Determine first ratio of described R value in described rgb value, second ratio of described G value in described rgb value, three ratio of described B value in described rgb value; If described first ratio is greater than described second ratio and described first ratio is greater than described 3rd ratio, then determine that the colour system of described first pixel is red colour system; If described second ratio is greater than described first ratio and described second ratio is greater than described 3rd ratio, then determine that the colour system of described first pixel is green colour system; If described 3rd ratio is greater than described first ratio and described 3rd ratio is greater than described second ratio, then determine that the colour system of described first pixel is blue colour system.
Preferably, described second determining unit, specifically for:
If the colour system of described subject picture is described red colour system, then determine that the color of described Word message is for white or yellow or blue; If the colour system of described subject picture is described green colour system, then determine that the color of described Word message is purple or red or black; If the colour system of described subject picture is described blue colour system, then determine that the color of described Word message is for yellow or red or white.
Preferably, described electronic equipment, also comprises:
Detecting unit, for detecting in described subject resource whether comprise the first appointed information before the described first sub-skin resource of described application, wherein, described first appointed information is used for the color of the first Word message to be appointed as the second color, described first Word message is the Word message on the first interface element of described application program, and described second color is different from described first color;
3rd extraction unit, if for comprising the first appointed information in described subject resource, then extracts described first appointed information;
Amendment unit, for based on the first appointed information, the parameter current of the first preset configuration item in described first sub-skin resource is revised as second color parameter of answering with described second Color pair, and wherein, described first preset configuration item is for controlling the color of described first Word message.
The one or more technical schemes provided in the embodiment of the present application, at least have following technique effect or advantage:
In the embodiment of the present application, disclose a kind of disposal route of subject resource, comprising: from the current topic resource of application program, extract subject picture; Determine the colour system of described subject picture; Based on the colour system of described subject picture, determine that the color of described Word message is the first color, wherein, described Word message is the Word message on the interface element of described application program, contrast between described first color and the colour system of described subject picture is greater than default contrast, can recognize described Word message to make user with naked eyes; Based on described first color, the first sub-skin resource of answering with described first Color pair is extracted from the current skin resource of described application program, wherein, the parameter current of the preset configuration item in described first sub-skin resource is the first color parameter that described first Color pair is answered, and described preset configuration item is for controlling the color of described Word message; Apply described first sub-skin resource.Due to the sub-skin of colour system intelligent selection according to subject picture, thus ensure that the Word message closing on (or overlapping display) with subject picture can have stronger contrast with this subject picture, so, efficiently solve in prior art when by the middle of subject application to certain a skin time, due to theme consistent with the tone of the word on skin and cause word be difficult to recognize technical matters.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the disposal route of subject resource in the embodiment of the present application;
Fig. 2 is a kind of structural representation of electronic equipment in the embodiment of the present application;
Fig. 3 is the another kind of structural representation of electronic equipment in the embodiment of the present application.
Embodiment
The embodiment of the present application is by providing a kind of disposal route and electronic equipment of subject resource, solve in prior art when by the middle of subject application to certain a skin time, due to theme consistent with the tone of the word on skin and cause word be difficult to recognize technical matters.
The technical scheme of the embodiment of the present application is for solving the problems of the technologies described above, and general thought is as follows:
A disposal route for subject resource, comprising: from the current topic resource of application program, extract subject picture; Determine the colour system of described subject picture; Based on the colour system of described subject picture, determine that the color of described Word message is the first color, wherein, described Word message is the Word message on the interface element of described application program, and the contrast between described first color and the colour system of described subject picture is greater than default contrast; Based on described first color, the first sub-skin resource of answering with described first Color pair is extracted from the current skin resource of described application program, wherein, the parameter current of the preset configuration item in described first sub-skin resource is first color parameter of answering with described first Color pair, and described preset configuration item is for controlling the color of described Word message; Apply described first sub-skin resource.
In order to better understand technique scheme, below in conjunction with Figure of description and concrete embodiment, technique scheme is described in detail.
Embodiment one
Present embodiments provide a kind of disposal route of subject resource, be applied in electronic equipment, wherein, described electronic equipment can be computer (such as: panel computer, desktop computer, notebook computer, palm PC, vehicle-mounted computer etc.) or mobile phone (such as: functional mobile phone, smart mobile phone etc.) or intelligent television, digital camera, game machine etc., for described electronic equipment specifically which kind of electronic equipment, the embodiment of the present application does not do concrete restriction.
Particularly, as shown in Figure 1, comprising:
Step S101: when current skin resource or the current topic resource generation change of described application program, extracts subject picture from the current topic resource of application program.
For example, described application program, can be: browser class application program, game class application program, music class application program, video class application program, shopping class application program, system optimization class application program, navigation type application program, virus killing class application program, communication class application program, office class application program etc., for described application program specifically which kind of application program, the embodiment of the present application does not do concrete restriction.
For example, in described current skin resource, comprise: for draw each interface element in described application program a whole set of picture resource and comprise configuration described application program in each interface element configuration item (such as: for controlling multiple configuration item such as shape, color, position of each interface element, and the multiple configuration item such as color, font, font size for controlling the word on each interface element, and the described preset configuration item in the embodiment of the present application refers in particular to the configuration item for controlling the text color on described interface element).Wherein, described interface element, comprise: text display box, edit box, label, button (such as: return push-button conventional in regular software, minimize button, maximize button, cancel button, insertion button, save button etc., and file button conventional in browser, check button, collection button, tool button, help button, back, refresh button, home button etc.), scroll bar etc.
For example, in described current topic resource, at least comprise a subject picture, described subject picture is presented at the pictures on the interface background of described application program, under each interface element described.
Step S102: the colour system determining described subject picture.
First illustrate, the term " colour system " occurred herein, include color series and netrual colour system, refer to the mixing of different amount between Essential colour, the different color that between Essential colour from netrual colour, the mixing of different amount produces, referring to the general inclination of whole color in picture, is picture overall color expression effect.
Specifically, described step S102, can have following two kinds of embodiments:
The first, described step S102, comprising:
Read RGB (Red-Green-Blue, the red-green-blue) value of each pixel in described subject picture; According to color space conversion formula, the rgb value of described each pixel is converted to the gray-scale value of described each pixel; Add up gray-scale value in described subject picture and be greater than the second number of pixels Cb that the first number of pixels Ca of default gray-scale value and gray-scale value be less than or equal to described default gray-scale value; If Ca>Cb, then determine that the colour system of described subject picture is light colour system; Otherwise, determine that the colour system of described subject picture is dark colour system.Wherein, the span of described default gray-scale value is: 120 ~ 130, and such as: 120,125,130, for the concrete value size of described gray-scale value, the embodiment of the present application does not do concrete restriction.
The second, described step S102, comprising:
Read the rgb value of each pixel in described subject picture; Based on the rgb value of described each pixel, determine the colour system of described each pixel; Add up the number of the pixel in described subject picture under each colour system, and colour systems maximum for number of pixels is defined as the colour system of described subject picture.
For example, the described rgb value based on described each pixel, determines the colour system of described each pixel, comprising: extract the red value R in the rgb value of the first pixel, green value G, blue valve B respectively, wherein, described first pixel is the arbitrary pixel in described subject picture; The ratio Rw of red value R in rgb value is determined based on equation Rw=R/ (R+G+B), determine the ratio Gw of green value G in rgb value based on equation Gw=G/ (R+G+B), determine the ratio Bw of blue valve B in rgb value based on equation Bw=B/ (R+G+B); If Rw>Gw and Rw>Bw, then determine that the colour system of described first pixel is red colour system; If Gw>Rw and Gw>Bw, then determine that the colour system of described first pixel is green colour system; If Bw>Gw and institute Bw>Rw, then determine that the colour system of described first pixel is blue colour system.
Further, if Rw and Gw difference less (as | Rw – Gw|<0.15), and | Rw – Bw|>0.15 or | Gw – Bw|>0.15, then determine that the colour system of described first pixel is yellow colour system; If Rw and Bw difference less (as | Rw – Bw|<0.15), and | Rw – Bw|>0.15 or | Gw – Bw|>0.15, then determine that the colour system of described first pixel is purple colour system; If Bw and Gw difference less (as | Gw – Bw|<0.15), and | Gw – Rw|>0.15 or | Bw – Rw|>0.15, then determine that the colour system of described first pixel is blue colour system; (if Rw – Gw) * (Rw – Bw) * (Gw – Bw) * (Rw – Gw) * (Rw – Bw) * (Gw – Bw) <0.3 and (R – 255) * (R – 255)+(G-255) * (G-255)+(B – 255) * (B-255) <125*125, then determine that the colour system of described first pixel is white colour system; (if Rw – Gw) * (Rw – Bw) * (Gw – Bw) * (Rw – Gw) * (Rw – Bw) * (Gw – Bw) <0.3 and (R – 255) * (R – 255)+(G-255) * (G-255)+(B – 255) * (B-255) >=125*125, then determine that the colour system of described first pixel is black colour system.
Step S103: based on the colour system of described subject picture, determine that the color of described Word message is the first color, wherein, described Word message is the Word message on the interface element of described application program, contrast between described first color and the colour system of described subject picture is greater than default contrast, described default contrast for user can with the minimum contrast of subject picture described in discernable by eye and described Word message.Herein, because the color of described first color and described subject picture has larger contrast, make the Word message closing on (or overlapping display) with subject picture can have stronger contrast with this subject picture, user can clearly recognize described Word message with naked eyes.
For example, if the colour system of described subject picture is described dark colour system, then determine that the color of described Word message is for light color; If the colour system of described subject picture is described light colour system, then determine that the color of described Word message is for dark.
Again for example, if the colour system of described subject picture is described red colour system, then determine that the color of described Word message is for white or yellow or blue; If the colour system of described subject picture is described green colour system, then determine that the color of described Word message is purple or red or black; If the colour system of described subject picture is described blue colour system, then determine that the color of described Word message is for yellow or red or white.
Citing comes again, if the colour system of described subject picture is yellow colour system, then determines that the color of described Word message is for red or blue; If the colour system of described subject picture is purple colour system, then determine that the color of described Word message is for yellow or white; If the colour system of described subject picture is white colour system, then determine that the color of described Word message is black or blueness; If the colour system of described subject picture is black colour system, then determine that the color of described Word message is for white or yellow.
Step S104: based on described first color, the first sub-skin resource of answering with described first Color pair is extracted from the current skin resource of described application program, wherein, the parameter current of the preset configuration item in described first sub-skin resource is the first color parameter that described first Color pair is answered, and described preset configuration item is for controlling the color of described Word message.
For example, comprise many covers skin in described current skin resource, the picture resource in every sub-skin is different, and the parameter current of described preset configuration item in every sub-skin is also different.
For example, three cover skins can be set in described current skin resource, comprise: give tacit consent to sub-skin, dark sub-skin and the sub-skin of light color.When described application program does not use any subject resource, the sub-skin of described acquiescence can be used.Picture resource in the sub-skin of described dark color mostly is dark colour system, and the parameter current of described preset configuration item is wherein pale coloration parameter, when described current topic picture is dark colour system, can use the sub-skin of described dark color.Picture resource in the sub-skin of described light color mostly is light colour system, and the parameter current of described preset configuration item is wherein dark color parameter, when described current topic picture is light colour system, can use the sub-skin of described light color.Thus make the color of Word message on described interface element and current subject picture have larger contrast, when described Word message closes on subject picture (or overlapping with subject picture show), user can clearly recognize described Word message.
Again for example, in described current skin resource, more sub-skin can also be set, comprise: the parameter current of described preset configuration item is many covers skin of different colours (such as: white, purple, yellow, black etc.) parameter.
Step S105: apply described first sub-skin resource.
For example, in the described first sub-skin resource of application, based on the parameter current of described preset configuration item, the color of described Word message can be revised as the color corresponding with described parameter current, and show.
Preferably, before described step S105, also comprise:
Detect in described subject resource and whether comprise the first appointed information, wherein, described first appointed information is used for the color of the first Word message to be appointed as the second color, described first Word message is the Word message on the first interface element of described application program, and described second color is different from described first color; If comprise the first appointed information in described subject resource, then extract described first appointed information; Based on the first appointed information, the parameter current of the first preset configuration item in described first sub-skin resource is revised as second color parameter of answering with described second Color pair, wherein, described first preset configuration item is for controlling the color of described first Word message.
For example, described first instruction is also comprised in described current topic resource, described first instruction is for being appointed as described second color by the Word message on the first interface element of described application program, wherein, described first interface element can be the arbitrary interface element in described application program, or closes on the interface element of (or overlapping show) mutually with described current topic picture.The developer that described second color is described current topic resource based on the subject picture in described current topic color specified by interface element on Word message color, the color of this second color and described current topic has larger contrast, and user can be made clearly to recognize the first Word message on described first interface.
Technical scheme in above-mentioned the embodiment of the present application, at least has following technique effect or advantage:
1, in the embodiment of the present application, disclose a kind of disposal route of subject resource, comprising: from the current topic resource of application program, extract subject picture; Determine the colour system of described subject picture; Based on the colour system of described subject picture, determine that the color of described Word message is the first color, wherein, described Word message is the Word message on the interface element of described application program, contrast between described first color and the colour system of described subject picture is greater than default contrast, can recognize described Word message to make user with naked eyes; Based on described first color, the first sub-skin resource of answering with described first Color pair is extracted from the current skin resource of described application program, wherein, the parameter current of the preset configuration item in described first sub-skin resource is the first color parameter that described first Color pair is answered, and described preset configuration item is for controlling the color of described Word message; Apply described first sub-skin resource.Due to the sub-skin of colour system intelligent selection according to subject picture, thus ensure that the Word message closing on (or overlapping display) with subject picture can have stronger contrast with this subject picture, so, efficiently solve in prior art when by the middle of subject application to certain a skin time, due to theme consistent with the tone of the word on skin and cause word be difficult to recognize technical matters.
2, in the embodiment of the present application, when comprising the first appointed information in current topic resource, (described first appointed information is used for the color of the first Word message to be appointed as the second color, described first Word message is the Word message on the first interface element of described application program), can directly according to described first appointed information, by described first word-information display for the second color (developer that described second color is described current topic resource based on the subject picture in described current topic color specified by interface element on Word message color, the color of this second color and described current topic has larger contrast), thus user can be made clearly to recognize the first Word message on described first interface.
Embodiment two
The embodiment of the present application provides a kind of electronic equipment, as shown in Figure 2, comprising:
First extraction unit 201, for extracting subject picture from the current topic resource of application program;
First determining unit 202, for determining the colour system of described subject picture;
Second determining unit 203, for the colour system based on described subject picture, determine that the color of described Word message is the first color, wherein, described Word message is the Word message on the interface element of described application program, and the contrast between described first color and the colour system of described subject picture is greater than default contrast;
Second extraction unit 204, for based on described first color, the first sub-skin resource of answering with described first Color pair is extracted from the current skin resource of described application program, wherein, the parameter current of the preset configuration item in described first sub-skin resource is the first color parameter that described first Color pair is answered, and described preset configuration item is for controlling the color of described Word message;
Applying unit 205, for applying described first sub-skin resource.
Alternatively, in the present embodiment, described first determining unit 202, specifically for:
Read the rgb value of each pixel in described subject picture; The rgb value of described each pixel is converted to the gray-scale value of described each pixel; Add up gray-scale value in described subject picture and be greater than the second number of pixels that the first number of pixels of default gray-scale value and gray-scale value be less than or equal to described default gray-scale value; If described first number of pixels is greater than described second number of pixels, then determine that the colour system of described subject picture is light colour system; If described first number of pixels is less than or equal to described second number of pixels, then determine that the colour system of described subject picture is dark colour system.
Alternatively, in the present embodiment, described second determining unit 203, specifically for:
If the colour system of described subject picture is described dark colour system, then determine that the color of described Word message is for light color; If the colour system of described subject picture is described light colour system, then determine that the color of described Word message is for dark.
Alternatively, in the present embodiment, described first determining unit 202, specifically for:
Read the rgb value of each pixel in described subject picture; Based on the rgb value of described each pixel, determine the colour system of described each pixel; Add up the number of the pixel in described subject picture under each colour system, and colour systems maximum for number of pixels is defined as the colour system of described subject picture.
Alternatively, in the present embodiment, described first determining unit 202, specifically for:
Extract the R value in the rgb value of the first pixel, G value, B value respectively, wherein, described first pixel is the arbitrary pixel in described subject picture; Determine first ratio of described R value in described rgb value, second ratio of described G value in described rgb value, three ratio of described B value in described rgb value; If described first ratio is greater than described second ratio and described first ratio is greater than described 3rd ratio, then determine that the colour system of described first pixel is red colour system; If described second ratio is greater than described first ratio and described second ratio is greater than described 3rd ratio, then determine that the colour system of described first pixel is green colour system; If described 3rd ratio is greater than described first ratio and described 3rd ratio is greater than described second ratio, then determine that the colour system of described first pixel is blue colour system.
Alternatively, in the present embodiment, described second determining unit 203, specifically for:
If the colour system of described subject picture is described red colour system, then determine that the color of described Word message is for white or yellow or blue; If the colour system of described subject picture is described green colour system, then determine that the color of described Word message is purple or red or black; If the colour system of described subject picture is described blue colour system, then determine that the color of described Word message is for yellow, red or white.
Alternatively, in the present embodiment, as shown in Figure 3, described electronic equipment, also comprises:
Detecting unit 206, for detecting in described subject resource whether comprise the first appointed information before the described first sub-skin resource of described application, wherein, described first appointed information is used for the color of the first Word message to be appointed as the second color, described first Word message is the Word message on the first interface element of described application program, and described second color is different from described first color;
3rd extraction unit 207, if for comprising the first appointed information in described subject resource, then extracts described first appointed information;
Amendment unit 208, for based on the first appointed information, the parameter current of the first preset configuration item in described first sub-skin resource is revised as second color parameter of answering with described second Color pair, and wherein, described first preset configuration item is for controlling the color of described first Word message.
The electronic equipment introduced due to the present embodiment is the electronic equipment that the method implementing information processing in the embodiment of the present application adopts, so based on the method for the information processing introduced in the embodiment of the present application, those skilled in the art can understand embodiment and its various version of the electronic equipment of the present embodiment, so introduce no longer in detail in this method how realized in the embodiment of the present application for this electronic equipment.As long as those skilled in the art implement the electronic equipment that in the embodiment of the present application, the method for information processing adopts, all belong to the application for protection scope.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disk memory, CD-ROM, optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the process flow diagram of the method for the embodiment of the present invention, equipment (system) and computer program and/or block scheme.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block scheme and/or square frame and process flow diagram and/or block scheme and/or square frame.These computer program instructions can being provided to the processor of multi-purpose computer, special purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computing machine or other programmable data processing device produce device for realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
These computer program instructions also can be loaded in computing machine or other programmable data processing device, make on computing machine or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computing machine or other programmable devices is provided for the step realizing the function of specifying in process flow diagram flow process or multiple flow process and/or block scheme square frame or multiple square frame.
Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (14)

1. a disposal route for subject resource, is characterized in that, comprising:
Subject picture is extracted from the current topic resource of application program;
Determine the colour system of described subject picture;
Based on the colour system of described subject picture, determine that the color of Word message is the first color, wherein, described Word message is the Word message on the interface element of described application program, and the contrast between described first color and the colour system of described subject picture is greater than default contrast;
Based on described first color, the first sub-skin resource of answering with described first Color pair is extracted from the current skin resource of described application program, wherein, the parameter current of the preset configuration item in described first sub-skin resource is first color parameter of answering with described first Color pair, and described preset configuration item is for controlling the color of described Word message;
Apply described first sub-skin resource.
2. the method for claim 1, is characterized in that, the described colour system determining described subject picture, comprising:
Read the rgb value of each pixel in described subject picture;
The rgb value of described each pixel is converted to the gray-scale value of described each pixel;
Add up gray-scale value in described subject picture and be greater than the second number of pixels that the first number of pixels of default gray-scale value and gray-scale value be less than or equal to described default gray-scale value;
If described first number of pixels is greater than described second number of pixels, then determine that the colour system of described subject picture is light colour system;
If described first number of pixels is less than or equal to described second number of pixels, then determine that the colour system of described subject picture is dark colour system.
3. method as claimed in claim 2, is characterized in that, the described colour system based on described subject picture, determines that the color of described Word message is the first color, comprising:
If the colour system of described subject picture is described dark colour system, then determine that the color of described Word message is for light color;
If the colour system of described subject picture is described light colour system, then determine that the color of described Word message is for dark.
4. the method for claim 1, is characterized in that, the described colour system determining described subject picture, comprising:
Read the rgb value of each pixel in described subject picture;
Based on the rgb value of described each pixel, determine the colour system of described each pixel;
Add up the number of the pixel in described subject picture under each colour system, and colour systems maximum for number of pixels is defined as the colour system of described subject picture.
5. method as claimed in claim 4, is characterized in that the described rgb value based on described each pixel is determined the colour system of described each pixel, being comprised:
Extract the R value in the rgb value of the first pixel, G value, B value respectively, wherein, described first pixel is the arbitrary pixel in described subject picture;
Determine first ratio of described R value in described rgb value, second ratio of described G value in described rgb value, three ratio of described B value in described rgb value;
If described first ratio is greater than described second ratio and described first ratio is greater than described 3rd ratio, then determine that the colour system of described first pixel is red colour system;
If described second ratio is greater than described first ratio and described second ratio is greater than described 3rd ratio, then determine that the colour system of described first pixel is green colour system;
If described 3rd ratio is greater than described first ratio and described 3rd ratio is greater than described second ratio, then determine that the colour system of described first pixel is blue colour system.
6. method as claimed in claim 5, is characterized in that, the described colour system based on described subject picture, determines that the color of described Word message is the first color, comprising:
If the colour system of described subject picture is described red colour system, then determine that the color of described Word message is for white or yellow or blue;
If the colour system of described subject picture is described green colour system, then determine that the color of described Word message is purple or red or black;
If the colour system of described subject picture is described blue colour system, then determine that the color of described Word message is for yellow or red or white.
7. the method as described in as arbitrary in claim 1 ~ 6, is characterized in that, before the described first sub-skin resource of described application, also comprise:
Detect in described subject resource and whether comprise the first appointed information, wherein, described first appointed information is used for the color of the first Word message to be appointed as the second color, described first Word message is the Word message on the first interface element of described application program, and described second color is different from described first color;
If comprise the first appointed information in described subject resource, then extract described first appointed information;
Based on described first appointed information, the parameter current of the first preset configuration item in described first sub-skin resource is revised as second color parameter of answering with described second Color pair, wherein, described first preset configuration item is for controlling the color of described first Word message.
8. an electronic equipment, is characterized in that, comprising:
First extraction unit, for extracting subject picture from the current topic resource of application program;
First determining unit, for determining the colour system of described subject picture;
Second determining unit, for the colour system based on described subject picture, determine that the color of Word message is the first color, wherein, described Word message is the Word message on the interface element of described application program, and the contrast between described first color and the colour system of described subject picture is greater than default contrast;
Second extraction unit, for based on described first color, the first sub-skin resource of answering with described first Color pair is extracted from the current skin resource of described application program, wherein, the parameter current of the preset configuration item in described first sub-skin resource is the first color parameter value of answering with described first Color pair, and described preset configuration item is for controlling the color of described Word message;
Applying unit, for applying described first sub-skin resource.
9. electronic equipment as claimed in claim 8, is characterized in that, described first determining unit, specifically for:
Read the rgb value of each pixel in described subject picture; The rgb value of described each pixel is converted to the gray-scale value of described each pixel; Add up gray-scale value in described subject picture and be greater than the second number of pixels that the first number of pixels of default gray-scale value and gray-scale value be less than or equal to described default gray-scale value; If described first number of pixels is greater than described second number of pixels, then determine that the colour system of described subject picture is light colour system; If described first number of pixels is less than or equal to described second number of pixels, then determine that the colour system of described subject picture is dark colour system.
10. electronic equipment as claimed in claim 9, is characterized in that, described second determining unit, specifically for:
If the colour system of described subject picture is described dark colour system, then determine that the color of described Word message is for light color; If the colour system of described subject picture is described light colour system, then determine that the color of described Word message is for dark.
11. electronic equipments as claimed in claim 8, is characterized in that, described first determining unit, specifically for:
Read the rgb value of each pixel in described subject picture; Based on the rgb value of described each pixel, determine the colour system of described each pixel; Add up the number of the pixel in described subject picture under each colour system, and colour systems maximum for number of pixels is defined as the colour system of described subject picture.
12. electronic equipments as claimed in claim 11, is characterized in that, described first determining unit, specifically for:
Extract the R value in the rgb value of the first pixel, G value, B value respectively, wherein, described first pixel is the arbitrary pixel in described subject picture; Determine first ratio of described R value in described rgb value, second ratio of described G value in described rgb value, three ratio of described B value in described rgb value; If described first ratio is greater than described second ratio and described first ratio is greater than described 3rd ratio, then determine that the colour system of described first pixel is red colour system; If described second ratio is greater than described first ratio and described second ratio is greater than described 3rd ratio, then determine that the colour system of described first pixel is green colour system; If described 3rd ratio is greater than described first ratio and described 3rd ratio is greater than described second ratio, then determine that the colour system of described first pixel is blue colour system.
13. electronic equipments as claimed in claim 12, is characterized in that, described second determining unit, specifically for:
If the colour system of described subject picture is described red colour system, then determine that the color of described Word message is for white or yellow or blue; If the colour system of described subject picture is described green colour system, then determine that the color of described Word message is purple or red or black; If the colour system of described subject picture is described blue colour system, then determine that the color of described Word message is for yellow or red or white.
14. as arbitrary in claim 8 ~ 13 as described in electronic equipment, it is characterized in that, described electronic equipment, also comprises:
Detecting unit, for detecting in described subject resource whether comprise the first appointed information before the described first sub-skin resource of described application, wherein, described first appointed information is used for the color of the first Word message to be appointed as the second color, described first Word message is the Word message on the first interface element of described application program, and described second color is different from described first color;
3rd extraction unit, if for comprising the first appointed information in described subject resource, then extracts described first appointed information;
Amendment unit, for based on the first appointed information, the parameter current of the first preset configuration item in described first sub-skin resource is revised as second color parameter of answering with described second Color pair, and wherein, described first preset configuration item is for controlling the color of described first Word message.
CN201410647520.1A 2014-11-14 2014-11-14 The processing method and electronic equipment of a kind of subject resource Active CN104461614B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410647520.1A CN104461614B (en) 2014-11-14 2014-11-14 The processing method and electronic equipment of a kind of subject resource

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410647520.1A CN104461614B (en) 2014-11-14 2014-11-14 The processing method and electronic equipment of a kind of subject resource

Publications (2)

Publication Number Publication Date
CN104461614A true CN104461614A (en) 2015-03-25
CN104461614B CN104461614B (en) 2018-01-02

Family

ID=52907719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410647520.1A Active CN104461614B (en) 2014-11-14 2014-11-14 The processing method and electronic equipment of a kind of subject resource

Country Status (1)

Country Link
CN (1) CN104461614B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105320488A (en) * 2015-11-16 2016-02-10 联想(北京)有限公司 Control method, display method and electronic device
CN105468158A (en) * 2015-12-22 2016-04-06 努比亚技术有限公司 Color adjustment method and mobile terminal
CN106502486A (en) * 2015-09-08 2017-03-15 腾讯科技(深圳)有限公司 Method for information display and device under screen lock state
CN106503004A (en) * 2015-09-07 2017-03-15 腾讯科技(深圳)有限公司 A kind of information processing method and device, terminal
CN106855797A (en) * 2015-12-09 2017-06-16 阿里巴巴集团控股有限公司 The method to set up and device of a kind of interface element color
CN108509196A (en) * 2018-03-06 2018-09-07 北京酷我科技有限公司 A kind of iOS color managements strategy
CN109491739A (en) * 2018-10-30 2019-03-19 北京字节跳动网络技术有限公司 A kind of theme color is dynamically determined method, apparatus, electronic equipment and storage medium
CN113556424A (en) * 2021-07-22 2021-10-26 山东浪潮通软信息科技有限公司 Mobile terminal skin switching method, design method and computer storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7120652B2 (en) * 2002-04-25 2006-10-10 Sun Microsystems, Inc. Method, system and program for determining version of storage devices and programs indicated in the resource information installed in the computer system
CN101226728A (en) * 2007-01-16 2008-07-23 乐金电子(中国)研究开发中心有限公司 Apparatus and method for dynamically setting color theme
CN101840693A (en) * 2010-03-05 2010-09-22 惠州Tcl移动通信有限公司 Electronic document display method
CN102508666A (en) * 2011-11-11 2012-06-20 宇龙计算机通信科技(深圳)有限公司 Method and device for adjusting application prompt message in application program
CN102568010A (en) * 2010-12-14 2012-07-11 上海三旗通信科技股份有限公司 Method for extracting color and changing theme coloring by utilizing traditional camera
CN103137103A (en) * 2011-12-05 2013-06-05 中兴通讯股份有限公司 Character display method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7120652B2 (en) * 2002-04-25 2006-10-10 Sun Microsystems, Inc. Method, system and program for determining version of storage devices and programs indicated in the resource information installed in the computer system
CN101226728A (en) * 2007-01-16 2008-07-23 乐金电子(中国)研究开发中心有限公司 Apparatus and method for dynamically setting color theme
CN101840693A (en) * 2010-03-05 2010-09-22 惠州Tcl移动通信有限公司 Electronic document display method
CN102568010A (en) * 2010-12-14 2012-07-11 上海三旗通信科技股份有限公司 Method for extracting color and changing theme coloring by utilizing traditional camera
CN102508666A (en) * 2011-11-11 2012-06-20 宇龙计算机通信科技(深圳)有限公司 Method and device for adjusting application prompt message in application program
CN103137103A (en) * 2011-12-05 2013-06-05 中兴通讯股份有限公司 Character display method and device

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106503004A (en) * 2015-09-07 2017-03-15 腾讯科技(深圳)有限公司 A kind of information processing method and device, terminal
CN106503004B (en) * 2015-09-07 2020-09-11 腾讯科技(深圳)有限公司 Information processing method and device, and terminal
CN106502486A (en) * 2015-09-08 2017-03-15 腾讯科技(深圳)有限公司 Method for information display and device under screen lock state
CN105320488A (en) * 2015-11-16 2016-02-10 联想(北京)有限公司 Control method, display method and electronic device
CN105320488B (en) * 2015-11-16 2019-04-26 联想(北京)有限公司 A kind of control method, display methods and electronic equipment
CN106855797A (en) * 2015-12-09 2017-06-16 阿里巴巴集团控股有限公司 The method to set up and device of a kind of interface element color
CN105468158A (en) * 2015-12-22 2016-04-06 努比亚技术有限公司 Color adjustment method and mobile terminal
CN105468158B (en) * 2015-12-22 2020-06-05 亳州鼎源科技信息有限公司 Color adjustment method and mobile terminal
CN108509196A (en) * 2018-03-06 2018-09-07 北京酷我科技有限公司 A kind of iOS color managements strategy
CN109491739A (en) * 2018-10-30 2019-03-19 北京字节跳动网络技术有限公司 A kind of theme color is dynamically determined method, apparatus, electronic equipment and storage medium
CN113556424A (en) * 2021-07-22 2021-10-26 山东浪潮通软信息科技有限公司 Mobile terminal skin switching method, design method and computer storage medium

Also Published As

Publication number Publication date
CN104461614B (en) 2018-01-02

Similar Documents

Publication Publication Date Title
CN104461614A (en) Method for processing theme resource and electronic device
US10467776B2 (en) Information processing method and apparatus, terminal, and storage medium
EP3220249B1 (en) Method, device and terminal for implementing regional screen capture
CN104135684B (en) A kind of interface display method and device based on Firefox OS
CN104778047B (en) A kind of content display method and terminal
EP2871560B1 (en) Image processing method and apparatus
CN104866755B (en) Setting method and device for background picture of application program unlocking interface and electronic equipment
CN104978739B (en) A kind of image object choosing method and device
CN110865862B (en) Page background setting method and device and electronic equipment
CN106658139B (en) Focus control method and device
CN103853562A (en) Video frame rendering method and device
CN103065338A (en) Method and device providing shadow for foreground image in background image
CN102385482B (en) Methods and apparatuses for enhancing wallpaper display
CN103237113A (en) Information display method and electronic equipment
CN106780635A (en) The picture adapting method and system of a kind of intelligent terminal
CN109785408B (en) Mapping method and device and electronic equipment
CN103870123A (en) Information processing method and electronic equipment
CN104571842A (en) Information processing method and electronic equipment
CN106162303A (en) Information processing method, information processor and subscriber equipment
CN105607917B (en) A kind of page loading method and device
CN105955754B (en) A kind of user interface character displaying method and device
CN110880164B (en) Image processing method, device, equipment and computer storage medium
CN105556570A (en) Generating screen data
CN106775548B (en) page processing method and device
CN110597429A (en) Desktop icon management method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant