CN106775747A - A kind of method and apparatus of color configuration - Google Patents

A kind of method and apparatus of color configuration Download PDF

Info

Publication number
CN106775747A
CN106775747A CN201611238111.1A CN201611238111A CN106775747A CN 106775747 A CN106775747 A CN 106775747A CN 201611238111 A CN201611238111 A CN 201611238111A CN 106775747 A CN106775747 A CN 106775747A
Authority
CN
China
Prior art keywords
background
color value
color
pixel
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.)
Granted
Application number
CN201611238111.1A
Other languages
Chinese (zh)
Other versions
CN106775747B (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.)
TCL Corp
Original Assignee
TCL Corp
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 TCL Corp filed Critical TCL Corp
Priority to CN201611238111.1A priority Critical patent/CN106775747B/en
Publication of CN106775747A publication Critical patent/CN106775747A/en
Application granted granted Critical
Publication of CN106775747B publication Critical patent/CN106775747B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Abstract

The present invention is applied to smart machine field, there is provided a kind of method and apparatus of color configuration, it is intended to solve the problems, such as that text color can not automatically be arranged in pairs or groups with the change of background color in the prior art.Methods described includes:If the background picture for detecting user interface is replaced, it is determined that corresponding background area in the background picture of word in the user interface after replacing;Calculate the background color value of the background area;The text color value of the word is set according to the background color value so that the corresponding color of text color value color corresponding from the background color value is different.Technical scheme is realized when background picture is replaced, the color of word can automatically be arranged in pairs or groups with the change of background color, so that user no longer needs to manually adjust the color of word come the color of background picture of arranging in pairs or groups, so as to improve intelligent level, strengthen Consumer's Experience.

Description

A kind of method and apparatus of color configuration
Technical field
The present invention relates to smart machine field, more particularly to a kind of method and apparatus of color configuration.
Background technology
With widely using for the smart machines such as various intelligent terminals and intelligent appliance, user is various on smart machine Using the requirement more and more higher of the user interface (User Interface, UI) of (Application, APP).
When the background picture of user interface is replaced, the color of the background picture after replacing be displayed in the background picture On the color of word there may be unmatched situation.Text color in such as original user interface is white, Background The color of piece is that based on black, then font color is reasonable with the colour match of background picture, and word is eye-catching, but works as background picture Color when being changed to white partially, if now text color remains as white, the color of font color and background picture Collocation is unreasonable, causes the word in user interface not see Chu, influences Consumer's Experience.
The content of the invention
It is an object of the invention to provide a kind of method and apparatus of color configuration, it is intended to solve word face in the prior art Color can not be with the automatic problem arranged in pairs or groups of the change of background color.
A kind of the first aspect of the present invention, there is provided method of color configuration, including:
If the background picture for detecting user interface is replaced, it is determined that the word in the user interface is after replacing Corresponding background area in background picture;
Calculate the background color value of the background area;
The text color value of the word is set according to the background color value so that the corresponding face of the text color value Color color corresponding from the background color value is different.
A kind of the second aspect of the present invention, there is provided device of color configuration, including:
Detection module, if being replaced for detecting the background picture of user interface, it is determined that in the user interface Corresponding background area in background picture of the word after replacing;
Computing module, the background color value for calculating the background area;
Setup module, the text color value for setting the word according to the background color value so that the word The corresponding color of color value color corresponding from the background color value is different.
The beneficial effect that exists compared with prior art of the present invention is:If smart machine detects the Background of user interface Piece is replaced, it is determined that corresponding background area in the background picture of word in the user interface after replacing, by calculating The background color value of background area, and the text color value of word is set according to the background color value so that text color value pair The color answered color corresponding from background color value is different, realizes when background picture is replaced, and the color of word can be with The change for background color is arranged in pairs or groups automatically so that user no longer needs the color for manually adjusting word come background picture of arranging in pairs or groups Color, so as to improve intelligent level, strengthen Consumer's Experience.
Brief description of the drawings
Fig. 1 is a kind of flow chart of the method for color configuration that the embodiment of the present invention one is provided;
Fig. 2 is a kind of flow chart of the method for color configuration that the embodiment of the present invention two is provided;
Fig. 3 be the embodiment of the present invention two provide a kind of color configuration method in use A-Star algorithm search shortest paths The schematic diagram in footpath;
Fig. 4 is a kind of structural representation of the device of color configuration that the embodiment of the present invention three is provided;
Fig. 5 is a kind of structural representation of the device of color configuration that the embodiment of the present invention four is provided.
Specific embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
Realization of the invention is described in detail below in conjunction with specific accompanying drawing.
Embodiment one:
Fig. 1 is a kind of flow chart of the method for the color configuration that the embodiment of the present invention one is provided, and the embodiment of the present invention is held Row main body is the functional module of smart machine or smart machine, and the method for the color configuration of Fig. 1 examples can specifically include step Rapid S101 to S103, details are as follows:
If S101, the background picture for detecting user interface are replaced, it is determined that the word in the user interface is being changed Corresponding background area in background picture afterwards.
In operating in smart machine using APP, when the user of application APP actively changes user interface during this applies APP During background picture, or when applying the background picture of the corresponding server update deployment of APP, smart machine can be by the application The background picture that APP detects user interface is replaced.
Specifically, if the background picture that smart machine detects user interface is replaced, the Background after changing is obtained Piece, and determine corresponding background area in background picture of the word in the user interface after replacing.
It should be noted that word in user interface layout in the user interface is fixed, smart machine according to The display location of word can determine the word corresponding background area in background picture.
S102, the background color value for calculating background area.
Specifically, the background area that smart machine is obtained according to step S101, calculates the background color value of the background area.
Because background area may be made up of multiple color, therefore the background color value that smart machine is calculated only needs energy The integral color of the background area is enough identified, it by obtaining the body color of background area, and can specifically be calculated The color of the theme colors is worth to, it is also possible to be worth to by the average of color value for calculating shades of colour in background area, Or obtained using other calculations, it is not limited herein.
S103, the text color value that word is set according to the background color value of background area so that the word color value pair The color answered color corresponding from background color value is different.
Specifically, the background color value of the background area that smart machine is obtained according to step S102, is set and the background face The different text color value of colour, and the color of word is set using the word color value so that the word color value is corresponding Color color corresponding with background color value can be reasonably combined, so as to allow users to clearly recognize on background picture Word.
In the present embodiment, if the background picture that smart machine detects user interface is replaced, it is determined that the user interface In background picture of the word after replacing in corresponding background area, by calculating the background color value of background area, and root The text color value of word is set according to the background color value so that the corresponding color of text color value is corresponding with background color value Color is different, realizes when background picture is replaced, and the color of word can automatically be taken with the change of background color Match somebody with somebody so that user no longer needs to manually adjust the color of word come the color of background picture of arranging in pairs or groups, so that intelligent level is improved, Enhancing Consumer's Experience.
Embodiment two:
Fig. 2 is a kind of flow chart of the method for the color configuration that the embodiment of the present invention two is provided, and the embodiment of the present invention is held Row main body is the functional module of smart machine or smart machine, and the method for the color configuration of Fig. 2 examples can specifically include step Rapid S201 to S205, details are as follows:
If S201, the background picture for detecting user interface are replaced, it is determined that the word in the user interface is being changed Corresponding background area in background picture afterwards.
In operating in smart machine using APP, when the user of application APP actively changes user interface during this applies APP During background picture, or when applying the background picture of the corresponding server update deployment of APP, smart machine can be by the application The background picture that APP detects user interface is replaced.
Specifically, if the background picture that smart machine detects user interface is replaced, the Background after changing is obtained Piece, and determine corresponding background area in background picture of the word in the user interface after replacing.
It should be noted that word in user interface layout in the user interface is fixed, smart machine according to The display location of word can determine the word corresponding background area in background picture.
S202, assessment pixel is chosen in background area according to predetermined manner.
Specifically, the background area that smart machine determines according to step S201, according to predetermined manner in the background area Assessment pixel is chosen, assessment pixel is used to assess the color of the background area.
Predetermined manner can be selection mode set in advance, and it can be specifically the whole pixels for choosing background area Pixel is randomly selected as assessment pixel, or in background area as assessment pixel, or be can also be Other choose mode, are not limited herein.
It should be noted that after being replaced due to background picture, the color of the word in user interface is needed by time more Newly, so that the color with background picture matches, this requires that smart machine can be according to the color of the background picture after replacing The quick color for determining word, therefore, on the one hand need to use the efficient predetermined manner for choosing assessment pixel, on the other hand Also need to ensure the color of the background picture that the assessment pixel for selecting can be identified accurately after changing.
Further, choosing assessment pixel in background area according to predetermined manner can be by step S2021 to step Rapid S2022 is realized, described in detail as follows:
S2021, using A-Star algorithms calculate background area nodal line, wherein, the nodal line be starting pixels point with Shortest path between end pixel point, starting pixels point and end pixel point are the edge pixel point of background area.
A-Star (A*) algorithm is a kind of solution maximally effective direct search method of shortest path in static road network, is also solution The efficient algorithm of certainly many search problems.
The formula of A-Star algorithms is expressed as f (n)=g (n)+h (n), wherein, f (n) is via state n from original state Cost to dbjective state estimates that g (n) is that h (n) is from shape from original state to the actual cost of state n in state space Estimate costs of the state n to the optimal path of dbjective state.For route searching problem, state is node, and cost is distance.
A-Star algorithms ensure to find the selection that it is critical only that evaluation function h (n) of shortest path.Assuming that being represented with d (n) To the distance of dbjective state, then the selection of h (n) can have following three kinds of situations to state n:
(1) if h (n)<=d (n), the then points searched for are more, and hunting zone is big, and efficiency is low, but can obtain optimal solution;
(2) if h (n)=d (n), i.e. distance estimations h (n) are equal to beeline, then search will strictly along shortest path Footpath is carried out, and search efficiency now is highest;
(3) if h (n)>D (n), the then points searched for are few, and hunting zone is small, efficiency high, but it cannot be guaranteed that obtain optimal Solution.
Specifically, smart machine is gone out most short between starting pixels point and end pixel point using A-Star algorithm search Path, the shortest path is the nodal line of background area.
Starting pixels point and end pixel point are the edge pixel point of background area, and specifically, starting pixels point can be The pixel at the most edge in the background area lower left corner, or the most edge in the lower left corner pixel separately down and to moving to left The pixel of dynamic fixed pixel number;End pixel point can be the pixel at the most edge in the upper right corner, or the upper right corner Most edge pixel respectively upwards and the pixel of fixed pixel number of moving right, the fixed number can be 5.But This is not limited to, the position of starting pixels point and end pixel point can be according to being chosen, herein not the need for practical application Do concrete restriction.
In order to be better understood from the embodiment of the present invention, it is exemplified below and uses the mistake of A-Star algorithm calculate node lines Journey.Fig. 3 shows a schematic diagram using A-Star algorithm search shortest paths, as shown in figure 3, containing in the figure Start nodes, barrier, end nodes, and A nodes are to K node, now need to find one to end nodes from start nodes Shortest path.
For each step sought, all its eight adjacent node can be scanned with present node as basic point, and can only be upper and lower Move left and right, the cell for often moving adjacent to, that is, think a distance of having walked.By taking start nodes as an example, from start sections It is g (A)=2 to have put to A node motions two distances, moves six distances if obstacle is ignored from A nodes to end nodes That is h (A)=6, f (A)=g (A)+h (A)=2+6=8 is obtained according to formula f (n)=g (n)+h (n).Similarly, f can be calculated (B)=g (B)+h (B)=1+5=6, the like, the f (n) of other adjacent nodes of start nodes can be calculated, If the adjacent all nodes of start nodes are carried out facilitating comparing, select a minimum node of f (n) and be designated as X nodes, and The father node for setting X nodes is start nodes, and with X nodes as present node, then judge the effective node around X nodes, then Select the minimum nodes of f (n), and X nodes be set for its father node, the like, be formed one from start nodes to The nodal line of end nodes.
S2022, the pixel for including the nodal line of background area as assessment pixel.
Specifically, the nodal line that smart machine is calculated according to step S2021, obtains and records what the nodal line was included Each pixel background area position coordinates, using these pixels as background area assessment pixel.
Can be stored in the position coordinates of each pixel in two-dimensional array and preserve by smart machine.
S203, the pixel color value according to assessment pixel, determine the background color value of background area.
Specifically, smart machine determines that the background color value of background area can according to the pixel color value of assessment pixel Realized with by step S2031 to step S2033, described in detail as follows:
S2031, the pixel color value for obtaining each assessment pixel.
The nodal line that smart machine is obtained according to step S202, obtains the pixel face of each pixel that the nodal line is included Colour.
Pixel color value can include the transparency and trichromatic rgb value of pixel, i.e. R (red) value, G (green) value With B (blue) value.It should be noted that in following inventive embodiments, it is unless otherwise instructed, all to be related to the ground of color value Side, mentioned color value includes transparency and rgb value.
Specifically, smart machine can be as follows with the Bitmap objects in background region:
Bitmap src
=BitmapFactory.decodeResource (getResources (), R.drawable.imgbg);
By the transparency A of each pixel of Bitmap object acquisitions, and trichromatic R values, G values and B values, wherein, (x, y) is the coordinate of the assessment pixel of preservation in step S2022.
PixelColor=src.getPixel (x, y);
A=Color.alpha (pixelColor);
R=Color.red (pixelColor);
G=Color.green (pixelColor);
B=Color.blue (pixelColor).
S2032, the average value for calculating each pixel color value for assessing pixel.
Specifically, transparency A, R value, the G values of each assessment pixel that smart machine difference calculation procedure S2031 is obtained With the average value of B values.
S2033, using each assessment pixel pixel color value average value as background area background color value.
Specifically, the average value of the transparency A that smart machine obtains step S2032, the average value of R values, G values it is average Value and B values average value as background area background color value.
S204, judge background color value and background picture be replaced before former background color value it is whether identical.
Specifically, if smart machine judge background color value and the background picture that step S203 determines be replaced before the former back of the body Scape color value is identical, then the color of word need not be modified, and flow terminates.
If the former background color value before background color value is replaced with background picture is differed, step is continued executing with S205。
S205, according to background color value, from the colour match information for prestoring obtain corresponding with the background color value Mix colours value, and using the matching color value as word text color value, wherein, colour match information includes different colours Corresponding relation between color value.
Colour match information includes the corresponding relation between the color value of different colours, and the colour match information can be with face The mode of color collocation table is pre-stored in the application APP of smart machine, and every record of the colour match table is included and can taken mutually The two kinds of color values of color matched somebody with somebody.For example, the R values of white, G values and B values are respectively 255,255 and 255, then the face arranged in pairs or groups with it Color could be arranged to black, and its R value, G values and B values are respectively 0,0 and 0.
Specifically, the background color value including transparency and rgb value that smart machine determines according to step S203, in color The corresponding matching color value arranged in pairs or groups mutually with the background color value is searched in collocation table, and using the matching color value as word Text color value, enable the corresponding color of the word color value color corresponding with background color value reasonably combined so that Allow users to clearly recognize the word on background picture.
In the present embodiment, if the background picture that smart machine detects user interface is replaced, it is determined that the user interface In background picture of the word after replacing in corresponding background area, assessment picture is chosen in background area according to predetermined manner Vegetarian refreshments, and the background color value of background area is determined according to the pixel color value of assessment pixel, if then judging the background face Former background color value before colour is replaced with background picture is differed, then obtained and the back of the body from the colour match information for prestoring The corresponding matching color value of scape color value, and using the matching color value as word text color value so that text color value Corresponding color color corresponding from background color value is different, realizes when background picture is replaced, and the color of word can As the change of background color is arranged in pairs or groups automatically so that user no longer needs the color for manually adjusting word come Background of arranging in pairs or groups The color of piece, so as to improve intelligent level, strengthens Consumer's Experience.Meanwhile, chosen in background area according to predetermined manner During assessment pixel, smart machine calculates the nodal line of background area using A-Star algorithms, and the nodal line is included Pixel as assessment pixel, and calculate assessment pixel pixel color value average value by way of, can be fast The fast background color value for accurately determining background area, so as to improve the efficiency and accuracy of whole colour match process, enters one Step enhancing intelligent level.
Embodiment three:
Fig. 4 is a kind of structural representation of the device of color configuration that the embodiment of the present invention three is provided, for convenience of description, Illustrate only the part related to the embodiment of the present invention.A kind of device of color configuration of Fig. 4 examples can be previous embodiment The executive agent of the method for one color configuration for providing.A kind of device of color configuration of Fig. 4 examples includes:Detection module 31, Computing module 32 and setup module 33.Each functional module describes in detail as follows:
Detection module 31, if being replaced for detecting the background picture of user interface, it is determined that in the user interface Corresponding background area in background picture of the word after replacing;
Computing module 32, the background color value of the background area for calculating the determination of detection module 31;
Setup module 33, the background color value for being obtained according to computing module 32 sets the text color value of word, makes Obtain the corresponding color of the word color value color corresponding from background color value different.
Each module realizes the process of respective function in a kind of device of color configuration that the present embodiment is provided, and specifically refers to The description of foregoing embodiment illustrated in fig. 1, here is omitted.
Knowable to a kind of device of color configuration of above-mentioned Fig. 3 examples, in the present embodiment, if smart machine detects user The background picture at interface is replaced, it is determined that corresponding background area in the background picture of word in the user interface after replacing Domain, by calculating the background color value of background area, and sets the text color value of word according to the background color value so that text The corresponding color of word color value color corresponding from background color value is different, realizes when background picture is replaced, word Color can automatically be arranged in pairs or groups with the change of background color so that user no longer needs to manually adjust the color of word to take Color with background picture, so as to improve intelligent level, strengthens Consumer's Experience.
Example IV:
Fig. 5 is a kind of structural representation of the device of color configuration that the embodiment of the present invention four is provided, for convenience of description, Illustrate only the part related to the embodiment of the present invention.A kind of device of color configuration of Fig. 5 examples can be previous embodiment The executive agent of the method for two color configurations for providing.A kind of device of color configuration of Fig. 5 examples includes:Detection module 41, Computing module 42 and setup module 43.Each functional module describes in detail as follows:
Detection module 41, if being replaced for detecting the background picture of user interface, it is determined that in the user interface Corresponding background area in background picture of the word after replacing;
Computing module 42, the background color value of the background area for calculating the determination of detection module 41;
Setup module 43, the background color value for being obtained according to computing module 42 sets the text color value of word, makes Obtain the corresponding color of the word color value color corresponding from background color value different.
Further, computing module 42 includes:
Submodule 421 is chosen, for choosing assessment picture in the background area that detection module 41 determines according to predetermined manner Vegetarian refreshments;
Determination sub-module 422, for the pixel color value according to the assessment pixel for choosing the selection of submodule 421, it is determined that The background color value of background area.
Further, choosing submodule 421 includes:
Nodal line acquiring unit 4211, the section for calculating the background area that detection module 41 determines using A-Star algorithms Dotted line, wherein, the nodal line is the shortest path between starting pixels point and end pixel point, starting pixels point and end pixel Point is the edge pixel point of the background area;
Assessment pixel acquiring unit 4212, for the pixel for including the nodal line that nodal line acquiring unit 4211 is obtained Point is used as assessment pixel.
Determination sub-module 422 includes:
Pixel color value acquiring unit 4221, the picture of each assessment pixel that submodule 421 is chosen is chosen for obtaining Plain color value;
Average calculation unit 4222, for calculating each assessment pixel that pixel color value acquiring unit 4221 is obtained Pixel color value average value;
Background color value acquiring unit 4223, for the average value that calculates average calculation unit 4222 as background The background color value in region.
Further, setup module 43 includes:
Judging submodule 431, for judging background color value and Background that background color value acquiring unit 4223 is obtained Whether the former background color value before piece is replaced is identical;
Configuration submodule 432, if being to differ for the judged result of judging submodule 431, according to background color value, Obtain corresponding with background color value matching color value from the colour match information for prestoring, and using the matching color value as The text color value of word, wherein, colour match information includes the corresponding relation between the color value of different colours.
Each module realizes the process of respective function in a kind of device of color configuration that the present embodiment is provided, and specifically refers to The description of foregoing embodiment illustrated in fig. 2, here is omitted.
Knowable to a kind of device of color configuration of above-mentioned Fig. 5 examples, in the present embodiment, if smart machine detects user The background picture at interface is replaced, it is determined that corresponding background area in the background picture of word in the user interface after replacing Domain, assessment pixel is chosen according to predetermined manner, and determine the back of the body according to the pixel color value of assessment pixel in background area The background color value of scene area, if then judge the background color value be replaced with background picture before former background color value not phase Together, then corresponding with background color value matching color value is obtained from the colour match information for prestoring, and by the matching color It is worth as the text color value of word so that the corresponding color of text color value color corresponding from background color value is different, it is real Show when background picture is replaced, the color of word can automatically be arranged in pairs or groups with the change of background color so that user The color for manually adjusting word is no longer needed come the color of background picture of arranging in pairs or groups, so as to improve intelligent level, strengthens user's body Test.Meanwhile, during assessment pixel is chosen in background area according to predetermined manner, smart machine is calculated using A-Star Method calculates the nodal line of background area, and the pixel that the nodal line is included assesses picture as assessment pixel by calculating The mode of the average value of the pixel color value of vegetarian refreshments, can fast and accurately determine the background color value of background area, so as to carry The efficiency and accuracy of whole colour match process high, further enhance intelligent level.
It should be noted that each embodiment in this specification is described by the way of progressive, each embodiment What is stressed is all the difference with other embodiment, between each embodiment same or similar part mutually referring to .For device class embodiment, because it is substantially similar to embodiment of the method, so description is fairly simple, it is related Part is illustrated referring to the part of embodiment of the method.
It is worth noting that, in said apparatus embodiment, included modules are to be drawn according to function logic Point, but above-mentioned division is not limited to, as long as corresponding function can be realized;In addition, each functional module is specific Title is also only to facilitate mutually distinguish, the protection domain being not intended to limit the invention.
It will appreciated by the skilled person that realize that all or part of step in the various embodiments described above method is can Completed with instructing the hardware of correlation by program, corresponding program can be stored in a computer read/write memory medium In, described storage medium, such as ROM/RAM, disk or CD.
Presently preferred embodiments of the present invention is the foregoing is only, is not intended to limit the invention, it is all in essence of the invention Any modification, equivalent and improvement made within god and principle etc., should be included within the scope of the present invention.

Claims (10)

1. a kind of method of color configuration, it is characterised in that methods described includes:
If the background picture for detecting user interface is replaced, it is determined that the background of word in the user interface after replacing Corresponding background area in picture;
Calculate the background color value of the background area;
The text color value of the word is set according to the background color value so that the corresponding color of the text color value and The corresponding color of the background color value is different.
2. method according to claim 1, it is characterised in that the background color value bag of the calculating background area Include:
Assessment pixel is chosen in the background area according to predetermined manner;
According to the pixel color value of the assessment pixel, the background color value of the background area is determined.
3. method according to claim 2, it is characterised in that described to be chosen in the background area according to predetermined manner Assessment pixel includes:
The nodal line of the background area is calculated using A-Star algorithms, wherein, the nodal line is starting pixels point and end Shortest path between pixel, the starting pixels point and the edge pixel that end pixel point is the background area Point;
The pixel that the nodal line is included is used as the assessment pixel.
4. according to the method in claim 2 or 3, it is characterised in that the pixel color according to the assessment pixel Value, determining the background color value of the background area includes:
Obtain the pixel color value of each assessment pixel;
Calculate the average value of the pixel color value of each assessment pixel;
Using the average value as the background area background color value.
5. the method according to any one of claims 1 to 3, it is characterised in that described to be set according to the background color value The text color value of the word so that the corresponding color of text color value color corresponding with the background color value is not It is same to include:
Judge the background color value be replaced with the background picture before former background color value it is whether identical;
If differing, according to the background color value, obtained from the colour match information for prestoring and the background color value Corresponding matching color value, and using the matching color value as the word text color value, wherein, the colour match Information includes the corresponding relation between the color value of different colours.
6. a kind of device of color configuration, it is characterised in that described device includes:
Detection module, if being replaced for detecting the background picture of user interface, it is determined that the word in the user interface Corresponding background area in background picture after replacing;
Computing module, the background color value for calculating the background area;
Setup module, the text color value for setting the word according to the background color value so that the text color It is worth corresponding color color corresponding from the background color value different.
7. device according to claim 6, it is characterised in that the computing module includes:
Submodule is chosen, for choosing assessment pixel in the background area according to predetermined manner;
Determination sub-module, for the pixel color value according to the assessment pixel, determines the background color of the background area Value.
8. device according to claim 7, it is characterised in that the selection submodule includes:
Nodal line acquiring unit, the nodal line for calculating the background area using A-Star algorithms, wherein, the nodal line It is the shortest path between starting pixels point and end pixel point, the starting pixels point and end pixel point are the back of the body The edge pixel point of scene area;
Assessment pixel acquiring unit, for the pixel that includes the nodal line as the assessment pixel.
9. the device according to claim 7 or 8, it is characterised in that the determination sub-module includes:
Pixel color value acquiring unit, the pixel color value for obtaining each assessment pixel;
Average calculation unit, the average value of the pixel color value for calculating each assessment pixel;
Background color value acquiring unit, for using the average value as the background area background color value.
10. the device according to any one of claim 6 to 8, it is characterised in that the setup module includes:
Judging submodule, for judge the background color value be replaced with the background picture before former background color value whether It is identical;
Configuration submodule, if for differing, according to the background color value, from the colour match information for prestoring obtain with The corresponding matching color value of the background color value, and using the matching color value as the word text color value, its In, the colour match information includes the corresponding relation between the color value of different colours.
CN201611238111.1A 2016-12-28 2016-12-28 Color configuration method and device Active CN106775747B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611238111.1A CN106775747B (en) 2016-12-28 2016-12-28 Color configuration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611238111.1A CN106775747B (en) 2016-12-28 2016-12-28 Color configuration method and device

Publications (2)

Publication Number Publication Date
CN106775747A true CN106775747A (en) 2017-05-31
CN106775747B CN106775747B (en) 2020-03-24

Family

ID=58925178

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611238111.1A Active CN106775747B (en) 2016-12-28 2016-12-28 Color configuration method and device

Country Status (1)

Country Link
CN (1) CN106775747B (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108961346A (en) * 2018-08-08 2018-12-07 浙江工商大学 The method that color harmony degree is predicted based on BP neural network
CN109087364A (en) * 2018-08-08 2018-12-25 浙江工商大学 The method that color harmony degree is predicted according to mode
CN109408177A (en) * 2018-09-29 2019-03-01 北京金山安全软件有限公司 Method and device for configuring color of characters in picture and electronic equipment
CN109410295A (en) * 2018-09-14 2019-03-01 广州视源电子科技股份有限公司 Color setting method, device, equipment and computer readable storage medium
CN109766153A (en) * 2018-12-11 2019-05-17 新视家科技(北京)有限公司 Background dynamics switching method and its device, the electronic equipment of application program
CN110264545A (en) * 2019-06-19 2019-09-20 北京字节跳动网络技术有限公司 Picture Generation Method, device, electronic equipment and storage medium
CN110658202A (en) * 2019-09-30 2020-01-07 贵州航天云网科技有限公司 Industrial component appearance defect detection method based on deep learning
CN110865856A (en) * 2018-08-27 2020-03-06 华为技术有限公司 Interface element color display method and device
CN111125999A (en) * 2019-12-25 2020-05-08 上海云从企业发展有限公司 Character color adjusting method, system, equipment and machine readable medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103151022A (en) * 2013-01-31 2013-06-12 广东欧珀移动通信有限公司 Method for automatically changing font colors according to background color and system
CN104978189A (en) * 2015-06-19 2015-10-14 深圳天珑无线科技有限公司 Method, device and mobile terminal for changing text color of application description
CN105912321A (en) * 2016-04-01 2016-08-31 乐视控股(北京)有限公司 Word color setting method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103151022A (en) * 2013-01-31 2013-06-12 广东欧珀移动通信有限公司 Method for automatically changing font colors according to background color and system
CN104978189A (en) * 2015-06-19 2015-10-14 深圳天珑无线科技有限公司 Method, device and mobile terminal for changing text color of application description
CN105912321A (en) * 2016-04-01 2016-08-31 乐视控股(北京)有限公司 Word color setting method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JOEY_ZHOU: "A*算法详解", 《简书(HTTPS://WWW.JIANSHU.COM/P/768B6DB850DA)》 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109087364A (en) * 2018-08-08 2018-12-25 浙江工商大学 The method that color harmony degree is predicted according to mode
CN108961346A (en) * 2018-08-08 2018-12-07 浙江工商大学 The method that color harmony degree is predicted based on BP neural network
CN108961346B (en) * 2018-08-08 2022-02-18 浙江工商大学 Method for predicting color harmony based on BP neural network
US11423590B2 (en) 2018-08-27 2022-08-23 Huawei Technologies Co., Ltd. Interface element color display method and apparatus
CN110865856A (en) * 2018-08-27 2020-03-06 华为技术有限公司 Interface element color display method and device
US11663754B2 (en) 2018-08-27 2023-05-30 Huawei Technologies Co., Ltd. Interface element color display method and apparatus
CN110865856B (en) * 2018-08-27 2022-04-22 华为技术有限公司 Interface element color display method and device
CN109410295A (en) * 2018-09-14 2019-03-01 广州视源电子科技股份有限公司 Color setting method, device, equipment and computer readable storage medium
CN109410295B (en) * 2018-09-14 2023-09-15 广州视源电子科技股份有限公司 Color setting method, device, equipment and computer readable storage medium
CN109408177A (en) * 2018-09-29 2019-03-01 北京金山安全软件有限公司 Method and device for configuring color of characters in picture and electronic equipment
CN109766153A (en) * 2018-12-11 2019-05-17 新视家科技(北京)有限公司 Background dynamics switching method and its device, the electronic equipment of application program
CN110264545A (en) * 2019-06-19 2019-09-20 北京字节跳动网络技术有限公司 Picture Generation Method, device, electronic equipment and storage medium
CN110658202A (en) * 2019-09-30 2020-01-07 贵州航天云网科技有限公司 Industrial component appearance defect detection method based on deep learning
CN110658202B (en) * 2019-09-30 2021-01-01 贵州航天云网科技有限公司 Industrial component appearance defect detection method based on deep learning
CN111125999A (en) * 2019-12-25 2020-05-08 上海云从企业发展有限公司 Character color adjusting method, system, equipment and machine readable medium

Also Published As

Publication number Publication date
CN106775747B (en) 2020-03-24

Similar Documents

Publication Publication Date Title
CN106775747A (en) A kind of method and apparatus of color configuration
US10922716B2 (en) Creating targeted content based on detected characteristics of an augmented reality scene
US10049466B2 (en) Color name generation from images and color palettes
CN104346370B (en) Picture search, the method and device for obtaining image text information
US9135719B1 (en) Color name generation from images and color palettes
CN107093172A (en) character detecting method and system
CN104899586B (en) Method and device is identified to the word content for including in image
CN104778047A (en) Content display method and terminal
CN104133665B (en) The localization method detected based on image and device
CN110490232B (en) Method, device, equipment and medium for training character row direction prediction model
KR20150036128A (en) Method and apparatus of recommending clothing products
US20200126268A1 (en) Method and apparatus for generating file color scheme
CN105812888A (en) Character display method and device
CN107862562B (en) Method and device for recommending commodities according to picture preference selection of user
CN106293325B (en) The method and apparatus of automatic seeking window
CN106131630A (en) Web page browsing control method based on television set and relevant apparatus
CN109977952A (en) Candidate target detection method based on local maximum
CN109858542A (en) A kind of character identifying method and device
CN106874818A (en) A kind of Digital Object Unique Identifier DOI recognition methods and device
CN104462526A (en) Multi-user online collaboration rapid vectorization method for high-resolution remote sensing images
JP2007208941A (en) Generating method of color chart for color evaluation and information processing apparatus thereof
CN103500017B (en) A kind of many of photoelectricity interaction module identifies and tracking
CN107103628A (en) Image detecting method and device
RU2510935C2 (en) Method of indexing and searching digital images
Gunduz et al. A better way of extracting dominant colors using salient objects with semantic segmentation

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
GR01 Patent grant
GR01 Patent grant