Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The interface color adaptation method provided by the application can be applied to an application environment as shown in fig. 1, wherein a client communicates with a server through a network, the server receives an acquired basic preference picture sent by the client, and an image palette is adopted to extract a color value of the basic preference picture; then determining the dominant hue of the basic preference picture according to the proportion of the number of the color values to all the color values; then, page element information contained in the interface is obtained, wherein the page element information comprises an element identifier, an element area and an element attribute, and the element area comprises an upper left corner coordinate and a lower right corner coordinate of the page element; then, based on the page element information, calculating the importance level of the element corresponding to each element identifier by adopting the following formula; and finally, filling the element areas of the element identifications corresponding to each important grade according to a preset mapping relation to obtain the target color matching of the interface. The client may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices. The server can be implemented by an independent server or a server cluster composed of a plurality of servers.
In an embodiment, as shown in fig. 2, taking the application of the method to the server in fig. 1 as an example for explanation, the method includes the following steps:
s10: and acquiring a basic preference picture, wherein the basic preference picture comprises at least one item of a theme picture or a wallpaper picture on the equipment, and extracting a color value of the basic preference picture by adopting an image palette.
The basic preference picture includes at least one of a theme picture or a wallpaper picture on the device, that is, the basic preference picture may be a theme picture or a wallpaper picture of a user mobile phone APP, and the color value refers to a color value of pixel information corresponding to the color information of the basic preference picture, such as an ARGB value, that is, information that can represent a specific color condition (such as a pixel), such as a shade degree of a color, hue information, or HSV color model information. Optionally, the theme picture may be obtained by calling an interface (API) of the user mobile phone APP theme as the basic preference picture, and the user mobile phone screen image may also be captured in real time as the basic preference picture.
The image Palette (Palette) is a help class which can extract colors from the picture (Bitmap), so that a User Interface (UI) of the APP can be more attractive, corresponding colors are dynamically displayed according to the picture, the colors are extracted by using the Palette, and the colors of the theme picture can dynamically adapt to the tone of the current page, so that the color tone of the whole APP is harmonious and uniform. Specifically, the corresponding color values of the color samples in the basic preference picture can be extracted through the image Palette, that is, the final color values of the basic preference picture can be obtained through a getRgb () method in the Palette class and applied to the UI, so that the main color to be adapted can be determined more efficiently in the following.
S20: and determining the dominant hue of the basic preference picture according to the proportion of the number of the color values to all the color values.
The dominant hue refers to the preference degree of a certain color value or a certain number of color values preferred by the user in each color value of the basic preference picture, that is, the dominant hue in the basic preference picture, that is, the color corresponding to the color value with the highest proportion in the current page is the dominant hue. Taking the Window7 classic theme picture as an example, the most dominant color in the picture is sky blue, the next most dominant color is light blue, and if the color value of the dominant color is 2, the dominant color of the Window7 classic theme picture is sky blue and light blue. Optionally, the color values are quantified, and the description range of the color values is (0,0,0,0) - (255,255,255,255) by describing the color values in the ARGB format. Thus, all color values ranged from 256 × 256. It is easy to understand that the statistics of the number of dominant hues is affected by the over-refined color value differentiation, and the color value differentiation in a smaller difference range is also very small, so the color values in a certain difference range can be used for classification calculation, if the current statistical standard point color value is described as (250,44,55,66), the color values in the range of (250 ± 3,44 ± 3,55 ± 5,66 ± 3) can be classified into one class, and the dominant hue is considered when the number of the certain class of color values is large.
Specifically, the ratio of the number of each color value to the number of all color values, that is, the total number of all color values to be generated is calculated, and the dominant hue of the basic preference picture is determined according to the size of the ratio value.
It can be understood that the ratio of the occurrence number of each color value to the occurrence number of all color values is used as a basis for determining the dominant hue, so that the dominant hue can be determined according to the specific actual situation of the basic preference color information, and further, the dominant hue in the basic preference color information can be determined in a self-adaptive manner.
Optionally, the dominant hue in this embodiment is at least two color values, so as to better meet the color matching requirement of the user, and improve the richness of color matching.
S30: the method comprises the steps of obtaining page element information contained in an interface, wherein the page element information comprises an element identifier and an element area, and the element area comprises a left upper corner coordinate and a right lower corner coordinate of a page element.
The interface may be an APP interface or an interface of a web application, and the page element information refers to element layout information of the opened interface, such as layout information of elements such as a button, an input box, or a drop-down box. The element identifier is used for uniquely identifying different page elements, and each page element can be identified by different numerical values. In one embodiment, the element identification may be a combination of a page element name and a number or character. Specifically, each page element can be traversed according to a preset sequence through the layout of the traversal interface, and the attribute of the element, that is, the element type, is determined. The element region is position information of a region where a page element corresponding to the element identifier is located, and if two coordinates are given, the position and the area size of the page element can be determined. It can be understood that the larger the area of the page element is, the closer the position of the page element region is to the interface center, and the higher the importance level of the element type corresponding to the page element identifier in the preset correspondence table is, the higher the eye-catching degree of the page element can be determined, so that the front dominant hue needs to be used as the adaptive dominant hue of the page element, and the effect of eye-catching enhancement prompt is further played, thereby being beneficial to improving the use efficiency of the APP or the web application.
S40: based on the page element information, calculating the importance level of the element corresponding to each element identifier by adopting the following formula:
wherein, P
iA value, λ, representing the importance level of the element corresponding to the identification of the ith element
iRepresenting a preset element weight, m, for an element corresponding to the ith element identification
iA numerical value representing a preset importance level identifying the corresponding element for the ith element, η
iExpressed as area weight preset for the area of the element corresponding to the ith element identification, ξ
iDistance weight (x) indicating a preset distance to the element corresponding to the ith element identification
i,y
i) The coordinates of the upper left corner of the corresponding element are identified for the ith element, (X)
i,Y
i) Lower right corner coordinates, denoted as identifying the corresponding element for the ith element, (x)
c,y
c) Expressed as the center coordinates of the interface.
Specifically, the importance level of the element corresponding to each element identifier may be calculated by using a preset importance level calculation formula, where the importance level calculation formula is as follows:
from the above formula, the importance level of the element and the importance level of the page element itself (λ)
im
iExpressed as the product of the element's preset weight and the value of the preset importance level of the element corresponding to the element's identification) and the size of the area in which the element's region is located (η)
i(x
i-X
i)*(y
i-Y
i) Expressed as the size of the area of the element area) is positively correlated with the distance between the area of the page element and the center of the interface (
Expressed as the distance between the area where the page element is located and the interface center), that is, the higher the level of the page element itself, the larger the area of the page element, and the smaller the distance between the page element and the interface, the higher the importance level of the page element, that is, the higher the importance level of the element type itself corresponding to the element identifier, and the larger the occupied area and the position near the interface center, the higher the importance level calculated by the page element. In the formula, λ is
iThe preset element weight corresponding to the ith element identifier is represented, and in this embodiment, the preset element weight is determined by a product design team, and the determined criterion is the importance or criticality of the element in the page. For example, the importance of such guidance elements as "determine" and "next" is stronger than that of such suggestive elements as "please fill in the following information", and the λ of the element can be increased
iThe numerical value of (c). Understandably, different color values are set for different page elements, key functions can be highlighted, prompt functions are weakened, flow function guiding is clear and clear, and therefore the use efficiency of the APP or the web application is improved.
S50: and filling the element areas of the element identifications corresponding to each important grade according to a preset mapping relation to obtain the target color matching of the interface, wherein the mapping relation is the mapping relation between each main tone and each important grade.
Wherein, the filling refers to filling the whole picture or the selected area with the foreground color or other colors so that the color of the filled whole picture or the selected area is consistent with the foreground color or other colors. The target color matching of the interface refers to a user's favorite color matching displayed in the APP interface or in the interface of the web application. Specifically, the element region corresponding to each element may be filled with a main tone using the setShader method of Paint, resulting in a target color matching of the interface:
setShader(Shader s);
s=LinearGradient(x,y,X,Y,colors,null,TileMode.REPEAT);
optionally, the function drawPath inside the Canvas may also be used to fill the element region corresponding to each element with the main tone, so as to obtain the target color matching of the interface. Firstly, determining a drawing area, designating a main tone for filling one area, then paving a piece of cloth (Canvas object in android) on the element area, and finally updating the element area to be a theme color to obtain the target color matching of the interface. In the embodiment, the interface color matching is realized after the filling is carried out according to the mapping relation between the main tones and the important levels of the element areas, and only a few main tones are used in the filling process, so that the filling time and the data amount in the filling process are reduced.
It can be understood that, because the element region corresponding to each element is filled with the main tone of the basic preference picture of the user, and the mapping relation of the element region with higher importance level of the element is filled with the main tone with the front position to obtain the target color matching of the interface, so that the color matching level displayed in the interface corresponds to the importance level of the element, and the target color matching is the main tone liked by the user, thereby satisfying the individual requirement of each user, realizing the diversification of the interface expression and realizing 'thousands of people and thousands of faces', and meanwhile, the invention realizes the complete automatic adaptation of the interface change based on the front-end code, so that the edition iteration of the APP or the web application does not need to be issued, thereby reducing the workload of a resource processor, saving the processing resources, realizing the automatic adaptation of the color matching of the interface, and greatly improving the color adaptation efficiency of the interface.
In the embodiment, firstly, a basic preference picture is obtained, and a color value of the basic preference picture is extracted by adopting an image palette; then, determining the main tone of the basic preference picture according to the proportion of the number of the color values to the number of all the color values, so as to better meet the color matching requirement of a user and improve the richness of color matching; then, page element information contained in the interface is obtained, and the page element information comprises an element identifier and an element area; then, based on the page element information, the following formula is adopted to calculate the importance level of the element corresponding to each element identifier, so that different color values are set for different page elements according to the importance levels in the following process, the key function can be highlighted, the prompt function is weakened, the process function is guided more clearly and clearly, and the use efficiency of the APP or the web application is improved; and finally, filling the element areas of the element identifications corresponding to each important grade according to a preset mapping relation to obtain the target color matching of the interface, wherein the mapping relation is the mapping relation between each main tone and each important grade, the individual requirements of each user are met, the diversification of the interface expression is realized, thousands of people and thousands of faces are realized, meanwhile, the automatic adaptation of the interface color matching is realized, and the interface color adaptation efficiency is greatly improved.
In an embodiment, as shown in fig. 3, in step S50, filling the element region of the element identifier corresponding to each importance level according to a preset mapping relationship to obtain a target color matching of the interface, which specifically includes the following steps:
s51: and counting the proportion of the number of each color value in the basic preference color information to all color values in the basic preference picture, and sequencing the color values from large to small according to the proportion to obtain a sequencing result.
In one embodiment, taking the example of having K pixels in the base preference picture, that is, the number of all color values in the basic preference picture is K, there are five color values corresponding to 5 keytones, A, B, C, D and E respectively, the number of occurrences is a, b, c, d and E respectively, the ratio of the color value corresponding to each main hue to the number of all color values in the base preference picture is a/K, b/K, c/K, d/K, e/K, and if a/K is 15%, b/K is 33%, c/K is 12%, d/K is 18%, and e/K is 22%, the result of sorting the ratios from large to small is b/K, d/K, e/K, c/K, a/K.
S52: and determining the color value with the sum of the appearance proportions of the M color values larger than a preset proportion threshold value as the M dominant tones in the dominant tones of the preference picture based on the color values, wherein the M color values are the first M color values in the sorting result.
The preset proportion threshold is a preset critical proportion value used for determining the proportion of the number of the color values corresponding to the number of the keytones to all the number of the color values. Taking the preset proportion threshold value of 95% as an example, the screening sorting result is screened from front to back, the sum of b/K and d/K is 55%, which is smaller than the preset proportion threshold value, and the sum of b/K, d/K and e/K is 73%, which still does not exceed the preset proportion threshold value, and the addition is continued until a/K is added, the sum of which is 100%, which exceeds the preset proportion threshold value of 95%, so that, in this example, the number of the dominant hues is 5, which is a, b, c, d and e, respectively.
It can be understood that, the number of the keytones in the basic preference picture in this embodiment is not determined in a unified manner, but is determined adaptively by setting a proportional threshold according to the number of the color values of the basic preference picture itself, and therefore, because the hobby pictures of different users are different, the corresponding color values are also different, and further, the determined keytones are different, thereby realizing the diversification of the expression of different user interfaces, that is, "thousands of people and thousands of faces", and satisfying the personalized requirements of the users. S53 sequentially numbering the M main tones from 0, acquiring the number N of the element identifications, and sequencing the N element identifications according to the order of the importance levels corresponding to the element identifications from low to high to obtain the sequence number corresponding to each importance level, wherein the sequence number is from 1 to N, and M and N are positive integers.
Specifically, the number of keytones is acquired, each keytone is numbered in turn, and the numbering is sequentially performed from 0, and since there are M keytones, the keytones are numbered from number 0 to number M-1. And then, acquiring the number N of the element identifications, and sequencing the N element identifications according to the order of the importance levels corresponding to the element identifications from low to high to obtain the serial numbers corresponding to each importance level, wherein the serial numbers are from the serial number 1 to the serial number N. In one embodiment, the number M of keytones is 4, the number N of element identifiers is 9, each keytone is numbered sequentially from 0 to 4 numbers numbered 0 to 3, and the maximum value of the numbers is 3(M-1) and the numbers are numbered 1 to 9.
S54: and if M is less than or equal to N, performing integer division quotient calculation on M-1 by using the serial number according to the important level corresponding to each element identifier to obtain the serial number quotient of the serial number.
The quotient calculation is a mathematical operation, and the basic form of the quotient calculation is a/b or a/b, the quotient of a divided by b is represented, and the integer division of the quotient is the integer part of the quotient. Specifically, the maximum value M-1 of the numbers is subjected to integer division and quotient calculation using the numbers obtained in step S51, and the number quotient of the number corresponding to the importance level is obtained.
Taking the 9 numbers in step S53 as an example, the maximum value M-1 of the numbers is 3, and integer division and quotient calculation are performed on 3 using 1 to 9, respectively, to obtain the numbers having the quotients of 0, 1, 2, and 3, respectively.
S55: and filling the element areas of the element marks of the important levels corresponding to the numbering quotient by using the main tone corresponding to the main tone number equal to the numbering quotient.
Specifically, taking step S52 as an example, the element regions to be marked with the elements corresponding to the importance levels corresponding to the keytone filling number quotients equal to the keytone quotients are filled with the keytones with the element region numbers 1 and 2 being filled with the keytones with the element regions 0, the element regions with the numbers 3,4, and 5 being filled with the keytones with the element region numbers 1, the element regions with the numbers 6, 7, and 8 being filled with the keytones with the element region number 2, and the element region with the number 9 being filled with the keytone with the element region number 3. Therefore, the element areas of the element identifications corresponding to each important level are filled according to the preset mapping relation, the accuracy of the corresponding relation between the interface color and the elements is guaranteed, the individual requirements of each user are met, and the diversification of APP interface expression is realized.
In the embodiment, the proportion of the number of each color value in the basic preference color information to all color values in the basic preference picture is counted, and the color values are sorted from large to small according to the proportion to obtain a sorting result; then, the color values with the sum of the appearance proportions of the M color values larger than the preset proportion threshold are determined to be the M dominant tones in the dominant tones of the preference picture based on the M color values, wherein the M color values are the first L color values in the sorting result, so that the diversification of the expression of different user interfaces can be realized, that is, "thousands of people and thousands of faces" can be realized, and the personalized requirements of the user are met. Sequentially numbering the M main tones from 0, acquiring the number N of the element identifications, and sequencing the N element identifications according to the sequence of the importance levels corresponding to the element identifications from low to high to obtain the sequence number corresponding to each importance level; next, if M is less than or equal to N, performing integer division quotient calculation on M-1 by using the sequence number according to the importance level corresponding to each element identifier to obtain a serial number quotient of the sequence number; and finally, the keytone corresponding to the keytone number equal to the numbering quotient is adopted to fill the element area of the element identifier of the important level corresponding to the numbering quotient, so that the accuracy of the corresponding relation between the interface color and the element is ensured, the individual requirements of each user are met, and the diversification of the interface expression is realized.
In view of unified vision, the number of element identifiers is generally greater than the number of keytones, and therefore, by assigning corresponding numbers of keytones according to the calculation method in steps S53 to S55, it is possible to avoid a problem of a reduction in user experience due to excessive page colors.
In an embodiment, after step S53, that is, after the N element identifiers are sorted according to the order of the importance levels corresponding to the element identifiers from low to high to obtain the serial number corresponding to each importance level, the interface color adaptation method further includes:
and if M is larger than N, filling the element areas of the element identifications corresponding to the important levels in sequence according to the main tones corresponding to the main tone number sequence.
Specifically, when M is greater than N, that is, the number of the keytones is greater than the number of the element identifiers, at this time, the element regions of the element identifiers corresponding to the important levels are filled in sequence according to the keytone numbering sequence. For example, if M is 4 and the number of element identifiers is 3, the reference numeral of the keytone filled with the corresponding element identifier having the highest importance level is 2, the reference numeral of the keytone filled with the corresponding element identifier having the second importance level is 1, and the reference numeral of the keytone filled with the corresponding element identifier having the second importance level is 0. It can be understood that, because M is greater than N, the element regions of the element identifiers corresponding to the important levels can be directly and sequentially filled according to the main hues corresponding to the main hue number sequence, so that the method is simple and convenient, the accuracy of color matching and the important intermediate levels of the elements is ensured, and the improvement of the experience of the user is facilitated.
In this embodiment, if M is greater than N, the element regions of the element identifiers corresponding to the important levels are filled in the main hues corresponding to the main hue number sequence in sequence, which is not only simple and convenient, but also ensures the accuracy of color matching and important intermediate levels of elements, and is beneficial to improving the experience of the user.
In an embodiment, in step S10, the obtaining of the basic preference picture specifically includes the following steps:
and calling a theme interface API of the client, and taking the acquired theme wallpaper as a basic preference picture.
The theme Interface API refers to an Application Programming Interface (API) related to a theme, and the theme wallpaper refers to a picture included in the theme, which is a commonly used picture set by a user of the electronic device, that is, a basic preference picture. Specifically, themes of various colors are preset in the electronic equipment of the user, and the tone information of the mobile phone theme can be returned by calling a theme interface Application Program Interface (API) of the client (such as an APP device), so that theme wallpaper, namely a basic preference picture, can be acquired, and the basic preference picture acquisition efficiency is improved.
In the embodiment, the theme interface API of the client is called, the acquired theme wallpaper is used as the basic preference picture, and the basic preference picture acquisition efficiency is improved.
In an embodiment, as shown in fig. 4, in step S10, the obtaining of the basic preference picture specifically includes the following steps:
s11: and acquiring a bitmap of an area corresponding to the client screen.
The Bitmap of the area corresponding to the client screen in this step is the Bitmap of the client that needs to perform screen capture in real time, that is, the Bitmap can reflect the basic preference.
S12: and drawing the bitmap on the canvas, and taking the obtained picture as a basic preference picture.
Specifically, the Bitmap is drawn through an android canvas to obtain a picture as a basic preference picture, so that adaptation can be performed subsequently according to the color of the basic preference picture.
In the embodiment, a bitmap of an area corresponding to a client screen is acquired; and drawing the bitmap on the canvas, and taking the obtained picture as a basic preference picture so as to be adapted according to the color of the basic preference picture.
In an embodiment, as shown in fig. 5, in step S30, the acquiring page element information included in the interface specifically includes the following steps:
s31: a tag name for each element in the interface is determined using hypertext markup language techniques.
The HyperText Markup Language, HTML (HTML for short), is a standard Markup Language for creating web pages. Specifically, with the node of the element object in the HTML DOM (document object model), a tag name of each element is acquired from the node of the element object, where the tag name refers to the name of the element attribute, and may be a button, a dialog box, or a drop-down list box, for example.
S32: and traversing each element according to the label name to obtain page element information.
Specifically, in the HTML DOM, each element is searched in a traversal mode to obtain page element information, so that the obtained page element information is more accurate and comprehensive.
In the embodiment, the tag name of each element in the interface is determined by adopting an HTML technology, and the page element information is obtained by traversing each element according to the tag name, so that the obtained page element information is more accurate and comprehensive.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In an embodiment, an interface color adaptation device is provided, and the interface color adaptation device corresponds to the interface color adaptation method in the above embodiment one to one. As shown in fig. 6, the interface color adapting apparatus includes a color value extracting module 10, a dominant hue determining module 20, an element information obtaining module 30, an importance level calculating module 40, and a target color matching obtaining module 50. The functional modules are explained in detail as follows:
the color value extraction module 10 is configured to acquire a basic preference picture and extract a color value of the basic preference picture by using an image palette;
a dominant hue determination module 20, configured to determine a dominant hue of the basic preference picture according to a ratio of the number of color values to all color values;
the element information acquiring module 30 is configured to acquire page element information included in the interface, where the page element information includes an element identifier and an element area, and the element area includes an upper left corner coordinate and a lower right corner coordinate of a page element;
an importance level calculating module 40, configured to calculate, based on the page element information, an importance level of an element corresponding to each element identifier by using the following formula:
wherein, P
iA value, λ, representing the importance level of the element corresponding to the identification of the ith element
iRepresenting a preset element weight, m, for an element corresponding to the ith element identification
iA numerical value represented as a preset importance level of the element corresponding to the ith element attribute, η
iExpressed as area weight preset for the area of the element corresponding to the ith element identification, ξ
iDistance weight (x) indicating a preset distance to the element corresponding to the ith element identification
i,y
i) The coordinates of the upper left corner of the corresponding element are identified for the ith element, (X)
i,Y
i) Lower right corner coordinates, denoted as identifying the corresponding element for the ith element, (x)
c,y
c) Expressed as the center coordinates of the interface;
and the target color matching obtaining module 50 is configured to fill the element areas of the element identifiers corresponding to each important level according to a preset mapping relationship, so as to obtain a target color matching of the interface, where the mapping relationship is a mapping relationship between each main hue and each important level.
Preferably, as shown in fig. 7, the target color matching acquisition module 50 includes a sorting result acquisition unit 51, a main tone determination unit 52, a number order determination unit 53, a number quotient calculation unit 54, and a first filling unit 55.
The sorting result obtaining unit 51 is configured to count a proportion of the number of each color value in the basic preference color information to all color values in the basic preference picture, and sort the color values according to a descending proportion to obtain a sorting result;
a dominant hue determining unit 52, configured to determine that a color value with a sum of M color values greater than a preset proportion threshold is M dominant hues in the dominant hue of the preference picture based on the color value, where the M color values are the first M color values in the sorting result;
a number sequence number determining unit 53, configured to number M dominant hues sequentially from 0, obtain the number N of the element identifiers, and sort the N element identifiers according to the order from low to high of the importance levels corresponding to the element identifiers, to obtain a sequence number corresponding to each importance level, where the sequence numbers are 1 to N, and M and N are positive integers;
a serial number quotient calculation unit 54, configured to, if M is less than or equal to N, perform integer division quotient calculation on M-1 using the serial number to obtain a serial number quotient of the serial number for the importance level corresponding to each element identifier;
and a first filling unit 55 for filling the element area identified by the element of the importance level corresponding to the keytone numbering quotient equal to the numbering quotient.
Preferably, the interface color adaptation further includes a second filling unit, configured to sequentially fill the element regions of the element identifiers corresponding to the importance levels according to the keytones corresponding to the keytone numbering order if M is greater than N.
Preferably, the color value extraction module includes a picture obtaining unit, configured to call a theme interface API of the client, and use the obtained theme wallpaper as the basic preference picture.
Preferably, the color value extraction module further includes a bitmap acquisition unit and a picture determination unit.
The bitmap acquiring unit is used for acquiring a bitmap of an area corresponding to a client screen;
and the picture determining unit is used for drawing the bitmap on the canvas, and the obtained picture is used as a basic preference picture.
Preferably, the element information acquisition module includes a tag name acquisition unit and a page element information acquisition unit.
The tag name acquisition unit is used for determining the tag name of each element in the interface by adopting a hypertext markup language technology;
and the page element information acquisition unit is used for traversing each element according to the tag name to obtain page element information.
For specific definition of the interface color adaptation means, reference may be made to the above definition of the interface color adaptation method, which is not described herein again. The modules in the interface color adaptation device can be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 8. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing data used in the interface color adaptation method. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an interface color adaptation method.
In one embodiment, a computer device is provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the interface color adaptation method in the above embodiments is implemented.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, implements the interface color adaptation method in the above-described embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.