(19)
(11)EP 3 309 679 B1

(12)EUROPEAN PATENT SPECIFICATION

(45)Mention of the grant of the patent:
04.09.2019 Bulletin 2019/36

(21)Application number: 17187710.3

(22)Date of filing:  28.03.2014
(51)Int. Cl.: 
G06F 9/445  (2018.01)
G06T 11/00  (2006.01)
G06F 9/451  (2018.01)
G06F 3/0481  (2013.01)
G06F 9/44  (2018.01)

(54)

METHOD, APPARATUS, AND TERMINAL DEVICE FOR DETERMINING COLOR OF INTERFACE CONTROL

VERFAHREN, VORRICHTUNG UND ENDGERÄTEVORRICHTUNG ZUR BESTIMMUNG DER FARBE EINER SCHNITTSTELLENSTEUERUNG

PROCÉDÉ, APPAREIL, ET DISPOSITIF TERMINAL POUR DÉTERMINER LA COULEUR D'UNE COMMANDE D'INTERFACE


(84)Designated Contracting States:
AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

(43)Date of publication of application:
18.04.2018 Bulletin 2018/16

(62)Application number of the earlier application in accordance with Art. 76 EPC:
14887196.5 / 2996037

(73)Proprietor: Huawei Device Co., Ltd.
Dongguan, Guangdong 523808 (CN)

(72)Inventors:
  • QIAN, Kai
    Shenzhen, Guangdong 518129 (CN)
  • LI, Jianhua
    Shenzhen, Guangdong 518129 (CN)

(74)Representative: Pfenning, Meinig & Partner mbB 
Patent- und Rechtsanwälte Joachimsthaler Straße 10-12
10719 Berlin
10719 Berlin (DE)


(56)References cited: : 
US-A1- 2006 044 324
US-A1- 2012 154 420
  
      
    Note: Within nine months from the publication of the mention of the grant of the European patent, any person may give notice to the European Patent Office of opposition to the European patent granted. Notice of opposition shall be filed in a written reasoned statement. It shall not be deemed to have been filed until the opposition fee has been paid. (Art. 99(1) European Patent Convention).


    Description

    TECHNICAL FIELD



    [0001] The present invention relates to the multimedia field, and in particular, to a method and an apparatus for determining a color of an interface control in a user interface.

    BACKGROUND



    [0002] With wide popularization of smart terminal devices, visual attraction of a user interface of an operating system of a smart terminal device becomes more important.

    [0003] In a current smart terminal device, visual attraction of a user interface is improved by using a desktop wallpaper and a theme (which is mainly an interface control) of a user interface.

    [0004] A user can set a desktop wallpaper according to a personal preference. However, if the user wants to change an interface control, a theme with a given style has to be used. Therefore, consistency of color and style of the desktop wallpaper and the interface control cannot be ensured, and a case may even occur in which color and style of the user's favorite desktop wallpaper mismatch those of a given interface control, which reduces visual attraction of a user interface and seriously affects user experience.

    [0005] Therefore, it is expected to provide a technology, which can enhance visual attraction of a user interface and improve user experience.

    [0006] US 2012/0154420 A1 discloses a method for identifying a characteristic color from an image, such as a computer wallpaper by separating pixels of the image into groups and determining the average RGB color components for each group. The characteristic color is then based on the group with the maximum difference between the highest average color component and the lowest average color component.

    [0007] US 2006/0044324 A1 discloses techniques for adaptively changing a foreground color when a conflict, for example a legibility conflict, between the foreground color and an extracted background color is detected. The new foreground color is selected so that a legibility value of the foreground color in relationship to the background color exceeds a set legibility threshold.

    SUMMARY



    [0008] The subject matter of the present invention is defined by the accompanying claims. Further embodiments not covered by the claims are provided as background information, to promote a deeper understanding of the invention.

    [0009] Embodiments of the preset invention provide a method, an apparatus, and a terminal device for determining a color of an interface control, which can enhance visual attraction of a user interface and improve user experience.

    [0010] According to a first aspect, a method for determining a color of an interface control is provided, where the method includes: acquiring at least one pixel from a desktop wallpaper; acquiring a color value of the at least one pixel; and determining a color value of each pixel in the interface control according to the color value of the at least one pixel.

    [0011] With reference to the first aspect, in a first implementation manner of the first aspect, the acquiring at least one pixel from a desktop wallpaper includes: acquiring a target image block from the desktop wallpaper according to a preset rule, where the target image block includes the at least one pixel.

    [0012] With reference to the first aspect and the foregoing implementation manner, in a second implementation manner of the first aspect, the acquiring a target image block from the desktop wallpaper according to a preset rule includes: acquiring the target image block from the desktop wallpaper according to a preset position; and/or acquiring the target image block from the desktop wallpaper according to a preset size.

    [0013] With reference to the first aspect and the foregoing implementation manner, in a third implementation manner of the first aspect, the acquiring the target image block from the desktop wallpaper according to a preset position includes: acquiring the target image block from the desktop wallpaper according to a position of the interface control on a screen, so that a position of the target image block in the desktop wallpaper is corresponding to the position of the interface control on the screen.

    [0014] With reference to the first aspect and the foregoing implementation manner, in a fourth implementation manner of the first aspect, the acquiring the target image block from the desktop wallpaper includes: acquiring the target image block from the desktop wallpaper according to a size of the interface control, so that a size of the target image block is larger than or equal to the size of the interface control.

    [0015] With reference to the first aspect and the foregoing implementation manners, in a fifth implementation manner of the first aspect, if a quantity of the pixel is one, the determining a color value of each pixel in the interface control according to the color value of the at least one pixel includes: using the color value of the pixel as the color value of each pixel in the interface control; or if a quantity of the pixel is at least two, the determining a color value of each pixel in the interface control according to the color value of the at least one pixel includes: using color values of the at least two pixels as a color value of each corresponding pixel in the interface control.

    [0016] With reference to the first aspect and the foregoing implementation manner, in a sixth implementation manner of the first aspect, the method further includes: performing first processing on the color value of each pixel in the interface control, and acquiring a color value of each pixel after the first processing, where the first processing includes at least one of the following processing: blurring processing, transparent processing, blackening processing, or color-changing processing.

    [0017] With reference to the first aspect and the foregoing implementation manners, in a seventh implementation manner of the first aspect, if a quantity of the pixel is at least two, the determining a color value of each pixel in the interface control according to the color value of the at least one pixel includes: determining a target color value according to color values of the at least two pixels; and determining the color value of each pixel in the interface control according to the target value color.

    [0018] With reference to the first aspect and the foregoing implementation manner, in an eighth implementation manner of the first aspect, the determining a target color value according to color values of the at least two pixels includes: performing calculation on the color values of the at least two pixels according to a preset algorithm, and using a result of the calculation as the target color value, where the algorithm includes: using a color value that appears most from the color values of the at least two pixels as the target color value; or calculating an average of the color values of the at least two pixels, and using the average as the target color value.

    [0019] With reference to the first aspect and the foregoing implementation manner, in a ninth implementation manner of the first aspect, the determining the color value of each pixel in the interface control according to the target value color includes: performing second processing on the target color value, and using a target color value after the second processing as the color value of each pixel in the interface control, where the second processing includes at least one of the following processing: blurring processing, transparent processing, blackening processing, or color-changing processing.

    [0020] According to a second aspect, an apparatus for determining a color of an interface control is provided, where the apparatus includes: a pixel acquiring unit, configured to acquire at least one pixel from a desktop wallpaper; a color value acquiring unit, configured to acquire a color value of the at least one pixel; and a color value determining unit, configured to determine a color value of each pixel in the interface control according to the color value of the at least one pixel.

    [0021] With reference to the second aspect, in a first implementation manner of the second aspect, the pixel acquiring unit is specifically configured to acquire a target image block from the desktop wallpaper according to a preset rule, where the target image block includes the at least one pixel.

    [0022] With reference to the second aspect and the foregoing implementation manner, in a second implementation manner of the second aspect, the pixel acquiring unit is specifically configured to acquire the target image block from the desktop wallpaper according to a preset position; and/or acquire the target image block from the desktop wallpaper according to a preset size.

    [0023] With reference to the second aspect and the foregoing implementation manner, in a third implementation manner of the second aspect, the pixel acquiring unit is specifically configured to acquire the target image block from the desktop wallpaper according to a position of the interface control on a screen, so that a position of the target image block in the desktop wallpaper is corresponding to the position of the interface control on the screen.

    [0024] With reference to the second aspect and the foregoing implementation manner, in a fourth implementation manner of the second aspect, the pixel acquiring unit is specifically configured to acquire the target image block from the desktop wallpaper according to a size of the interface control, so that a size of the target image block is larger than or equal to the size of the interface control.

    [0025] With reference to the second aspect and the foregoing implementation manners, in a fifth implementation manner of the second aspect, if a quantity of the pixel is one, the color value determining unit is specifically configured to use the color value of the pixel as the color value of each pixel in the interface control; or if a quantity of the pixel is at least two, the color value determining unit is specifically configured to use color values of the at least two pixels as a color value of each corresponding pixel in the interface control.

    [0026] With reference to the second aspect and the foregoing implementation manner, in a sixth implementation manner of the second aspect, the color value determining unit is further configured to: perform first processing on the color value of each pixel in the interface control, and acquire a color value of each pixel after the first processing, where the first processing includes at least one of the following processing: blurring processing, transparent processing, blackening processing, or color-changing processing.

    [0027] With reference to the second aspect and the foregoing implementation manners, in a seventh implementation manner of the second aspect, if a quantity of the pixel is at least two, the color value determining unit is specifically configured to determine a target color value according to color values of the at least two pixels; and determine a color of the interface control according to the target color value.

    [0028] With reference to the second aspect and the foregoing implementation manner, in an eighth implementation manner of the second aspect, the color value determining unit is specifically configured to perform calculation on the color values of the at least two pixels according to a preset algorithm, and use a result of the calculation as the target color value, where the algorithm includes: using a color value that appears most from the color values of the at least two pixels as the target color value; or calculating an average of the color values of the at least two pixels, and using the average as the target color value.

    [0029] With reference to the second aspect and the foregoing implementation manner, in a ninth implementation manner of the second aspect, the color value determining unit is further configured to perform second processing on the target color value, and use a target color value after the second processing as a color value of the interface control, where the second processing includes at least one of the following processing: blurring processing, transparent processing, blackening processing, or color-changing processing.

    [0030] According to a third aspect, a terminal device is provided, where the terminal device includes: a display, configured to present an operation interface corresponding to a function provided by the terminal device; and a processor, configured to: acquire at least one pixel from a desktop wallpaper of the operation interface, acquire a color value of the at least one pixel, and determine, according to the color value of the at least one pixel, a color value of each pixel in the interface control of the operation interface.

    [0031] With reference to the third aspect, in a first implementation manner of the third aspect, the processor is specifically configured to acquire a target image block from the desktop wallpaper according to a preset rule, where the target image block includes the at least one pixel.

    [0032] With reference to the third aspect and the foregoing implementation manner, in a second implementation manner of the third aspect, the processor is specifically configured to acquire the target image block from the desktop wallpaper according to a preset position; and/or acquire the target image block from the desktop wallpaper according to a preset size.

    [0033] With reference to the third aspect and the foregoing implementation manner, in a third implementation manner of the third aspect, the processor is specifically configured to acquire the target image block from the desktop wallpaper according to a position of the interface control on a screen, so that a position of the target image block in the desktop wallpaper is corresponding to the position of the interface control on the screen.

    [0034] With reference to the third aspect and the foregoing implementation manner, in a fourth implementation manner of the third aspect, the processor is specifically configured to acquire the target image block from the desktop wallpaper according to a size of the interface control, so that a size of the target image block is larger than or equal to the size of the interface control.

    [0035] With reference to the third aspect and the foregoing implementation manners, in a fifth implementation manner of the third aspect, if a quantity of the pixel is one, the processor is specifically configured to use the color value of the pixel as the color value of each pixel in the interface control; or if a quantity of the pixel is at least two, the processor is specifically configured to use color values of the at least two pixels as a color value of each corresponding pixel in the interface control.

    [0036] With reference to the third aspect and the foregoing implementation manner, in a sixth implementation manner of the third aspect, the processor is further configured to: perform first processing on the color value of each pixel in the interface control, and acquire a color value of each pixel after the first processing, where the first processing includes at least one of the following processing: blurring processing, transparent processing, blackening processing, or color-changing processing.

    [0037] With reference to the third aspect and the foregoing implementation manners, in a seventh implementation manner of the third aspect, if a quantity of the pixel is at least two, the processor is specifically configured to determine a target color value according to color values of the at least two pixels; and determine a color of the interface control according to the target color value.

    [0038] With reference to the third aspect and the foregoing implementation manner, in an eighth implementation manner of the third aspect, the processor is specifically configured to perform calculation on the color values of the at least two pixels according to a preset algorithm, and use a result of the calculation as the target color value, where the algorithm includes: using a color value that appears most from the color values of the at least two pixels as the target color value; or calculating an average of the color values of the at least two pixels, and using the average as the target color value.

    [0039] With reference to the third aspect and the foregoing implementation manner, in a ninth implementation manner of the third aspect, the processor is further configured to perform second processing on the target color value, and use a target color value after the second processing as a color value of the interface control, where the second processing includes at least one of the following processing: blurring processing, transparent processing, blackening processing, or color-changing processing.

    [0040] According to the method and the apparatus for determining a color of an interface control in the embodiments of the present invention, at least one pixel is determined from a desktop wallpaper, and the color of the interface control is determined according to a color value of the at least one pixel, so that color and style matching between the desktop wallpaper and the interface control can be implemented, thereby enhancing visual attraction of a user interface and improving user experience.

    BRIEF DESCRIPTION OF DRAWINGS



    [0041] To describe the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings required for describing the embodiments or the prior art. Apparently, the accompanying drawings in the following description show merely some embodiments of the present invention, and a person of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts.

    FIG. 1 is a schematic flowchart of a method for determining a color of an interface control according to an embodiment of the present invention;

    FIG. 2 is a schematic diagram of an example of a correspondence between an interface control and a target image block according to an embodiment of the present invention;

    FIG. 3 is a schematic diagram of another example of a correspondence between an interface control and a target image block according to an embodiment of the present invention;

    FIG. 4 is a schematic diagram of still another example of a correspondence between an interface control and a target image block according to an embodiment of the present invention;

    FIG. 5 is a schematic block diagram of an apparatus for determining a color of an interface control according to an embodiment of the present invention; and

    FIG. 6 is a schematic structural diagram of a device for determining a color of an interface control according to an embodiment of the present invention.


    DESCRIPTION OF EMBODIMENTS



    [0042] The following clearly and completely describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

    [0043] The technical solutions of the present invention may be applied to various devices that present a user interface for a user by using a screen (or a display), such as a smartphone, a tablet computer, and a personal computer. For ease of understanding and description, the foregoing devices are collectively referred to as "terminal devices" in the following description.

    [0044] A user interface (UI, User Interface) is also referred to as an interface of a user, which is a medium for interaction and information exchange between a system and a user. The user interface implements conversion between an internal form of information and an acceptable form for human being. The user interface includes software and hardware parts for implementing information exchange between a user and a system. The software part includes processing software, such as a convention and an operation command for information exchange between a user and a system. The hardware part includes an input apparatus and an output apparatus (including but not limited to a display screen, a touchscreen, a soft keyboard, a virtual control, a physical keyboard, a function key (such as a volume control pushbutton and a switch pushbutton), a trackball, a mouse, a joystick, a camera, and an input and output apparatus that can be implemented in future technologies). A purpose of the user interface is to enable a user to clearly perform an operation on hardware conveniently and efficiently, so as to implement interaction and complete work that is expected to be completed by using the hardware. The user interface has a broad definition and a user interface exits in any field involved in information communication between human being and a machine.

    [0045] In the embodiments of the present invention, a user interface may include a graphical user interface, that is, a graphical user interface (GUI, Graphic User Interface), which is a most common user interface in the world nowadays. For example, an interface of a mobile phone displayed in a power-on state is a graphical user interface, and a user performs interaction with hardware of a device by using a displayed graph (an icon), a virtual keyboard (soft keyboard), and a virtual mouse. The foregoing information in interaction and information exchange between the system and the user may include auditory information, visual information, tactile information, action information, odor information, and the like. The user may directly perform information exchange with the system in the user interface, and may also use devices including a stylus and a touch glove to perform interaction with the system.

    [0046] In the embodiments of the present invention, a desktop wallpaper refers to an image of a main user interface (generally the first interface that appears after unlocking) that is displayed on a screen.

    [0047] In the embodiments of the present invention, the interface control is a graphic component presented on an operation interface, where the graphic component has an execution function or a function of responding to a trigger event.

    [0048] Specifically, the interface control refers to a visual graphic "component" that can be placed on the user interface, such as a button and a file edit box. The component generally has an execution function or a function of triggering code to run by using a "trigger event" and completing a response. A response to the trigger event refers to a response of a control to an input operation (for example, an operation on a keyboard, a mouse or a touchscreen). Any control has its event collection. If an event of a control occurs, execution of a corresponding event procedure may be triggered. An event object has its particular name, event procedure code is written by a programmer according to a problem or requirement of the programmer. In the embodiments of the present invention, used as an example but not a limitation, an interface control may include a tab (Tab), a title bar (Title bar), an action bar (Action bar), a progress bar (Progress bar), a check box (Checkbox), and the like.

    [0049] It should be understood that, the above-enumerated user interface is only one embodiment of the present invention, and the present invention is not limited thereto. Another user interface that can be presented to a user on a screen or the like for the user to perform an operation falls within the protection scope of the present invention.

    [0050] In addition, aspects or features of the present invention may be implemented as a method, an apparatus or a product that uses standard programming and/or engineering technologies. The term "product" used in this application covers a computer program that can be accessed from any computer readable component, carrier or medium. For example, the computer readable medium may include but is not limited to: a magnetic storage component (for example, a hard disk, a floppy disk or a magnetic tape), an optical disc (for example, a CD (Compact Disk, compact disk), a DVD (Digital Versatile Disk, digital versatile disk), a smart card and a flash memory component (for example, EPROM (Erasable Programmable Read-Only Memory, erasable programmable read-only memory), a card, a stick, or a key drive). In addition, various storage media described in this specification may indicate one or more devices and/or other machine readable media that is used to store information. The term "machine readable media" may include but is not limited to a radio channel, and various other media that can store, contain and/or carry an instruction and/or data.

    [0051] FIG. 1 shows a schematic flowchart of a method 100 for determining a color of an interface control according to an embodiment of the present invention. As shown in FIG. 1, the method 100 includes:

    S110. Acquire at least one pixel from a desktop wallpaper.

    S120. Acquire a color value of the at least one pixel.

    S130. Determine a color value of each pixel in the interface control according to the color value of the at least one pixel.



    [0052] According to the method for determining a color of an interface control in this embodiment of the present invention, at least one pixel is determined from a desktop wallpaper, and the color of the interface control is determined according to a color value of the at least one pixel, so that color and style matching between the desktop wallpaper and the interface control can be implemented, thereby enhancing visual attraction of a user interface, improving operational efficiency of a terminal device, and improving user experience.

    [0053] Specifically, in S110, a terminal device may randomly acquire the at least one pixel from the desktop wallpaper, which is not specially limited in the present invention. For example,
    optionally, the acquiring at least one pixel from a desktop wallpaper includes:
    acquiring a target image block from the desktop wallpaper according to a preset rule, where the target image block includes the at least one pixel.

    [0054] Specifically, the terminal device may acquire an image block (that is, the target image block) from a currently used desktop wallpaper according to the preset rule.

    [0055] The target image block includes at least one pixel, that is, in this embodiment of the present invention, the target image block may be a pixel in the desktop wallpaper, or the target image block may also be an image that is formed by some (more than two) pixels in the desktop wallpaper, or the target image block may also be an entire desktop wallpaper (that is, including all pixels in the desktop wallpaper), which is not specially limited in the present invention.

    [0056] Without loss of generality, the following description is based on a case in which the target image block includes some (more than two) pixels in the desktop wallpaper.

    [0057] Optionally, the acquiring a target image block from a currently used desktop wallpaper according to a preset rule includes:

    acquiring the target image block from the desktop wallpaper according to a preset position; and/or

    acquiring the target image block from the desktop wallpaper according to a preset size.



    [0058] Specifically, in this embodiment of the present invention, a position-based rule (that is case 1) and a size-based rule (that is, case 2) may be enumerated and used as the preset rule. The following respectively describes the foregoing two cases.

    Case 1



    [0059] Optionally, the acquiring a target image block from a currently used desktop wallpaper according to a preset position includes:
    acquiring the target image block from the desktop wallpaper according to a position of the interface control on a screen, so that a position of the target image block in the desktop wallpaper is corresponding to the position of the interface control on the screen.

    [0060] Specifically, in this embodiment of the present invention, the terminal device may acquire the target image block from the desktop wallpaper according to a position (hereinafter referred to as a target position) of an interface control whose color needs to be changed on the screen.

    [0061] As shown in FIG. 2 to FIG. 4, without loss of generality, in an example in which a title bar is used as an interface control whose color needs to be changed, a terminal may determine a position of the title bar on the screen, for example, the terminal may acquire coordinates of a pixel in the upper left corner of the title bar, and a width and a height of the title bar, so as to determine the position of the title bar.

    [0062] In this way, a position of the target image block in the desktop wallpaper may be determined according to the position of the title bar on the screen.

    [0063] For example, in a case in which the desktop wallpaper is displayed in full screen (that is, a status shown in FIG. 2), an image block located or approximately located in the foregoing target position may be acquired from the desktop wallpaper as the target image block.

    [0064] It should be understood that, because of generation of an actual error, a specific offset is allowed to exist between a position of the target image block on the screen and a position of the interface control on the screen, or a specific offset is allowed to exist between a size of the target image block and a size of the interface control.

    [0065] Moreover, the above-enumerated method for determining, according to a position of the title bar on the screen, the position of the target image block in the desktop wallpaper is only an exemplary description, and the present invention is not limited thereto. For example, in a case in which the desktop wallpaper cannot be displayed in full screen for reasons such as a size of the desktop wallpaper (for example, a desktop wallpaper is tiled, or covers only a part of the screen), a position of the desktop wallpaper on the screen may also be first located, and the target image block is determined based on the position of the desktop wallpaper on the screen and a position of an interface control on the screen, so that a position relationship between the target image block and the desktop wallpaper is consistent with or is approximately consistent with a position relationship between the interface control and the screen. In addition, in this case, a size proportion between the target image block and the desktop wallpaper is consistent with or approximately consistent with a size proportion between the interface control and the screen.

    [0066] It should be understood that, the above-enumerated method for acquiring by the terminal device, according to the position of the interface control on the screen, the target image block from the desktop wallpaper, is only one example of the position-based rule, and the present invention is not limited thereto. For example, according to the position-based rule, the method may further be that an image block at a fixed position in the desktop wallpaper is selected; for example, an image located in a 1/3 upper part of the desktop wallpaper may be selected as the target image block, an image located in a 1/3 middle part of the desktop wallpaper may be selected as the target image block, or an image located in a 1/3 lower part of the desktop wallpaper may be selected as the target image block. In addition, the above-enumerated positions (or coverage areas) of image blocks in the desktop wallpaper are only exemplary description, which is not specially limited in the present invention and may be changed randomly.

    [0067] In addition, according to the position-based rule, an image block based on user selection may further be enumerated as the target image block. For example, in a case in which the method 100 is applied to a touch display, after a procedure of the method 100 is started, in S110, a touch signal of the touch display may further be detected, and a position of the touch display from which the touch signal comes is determined, so that an image block presented at the position is used as the target image block. In addition, an icon for instruct a user to select the target image block may further be presented on the display.

    [0068] According to the method 100 for determining a color of an interface control in this embodiment of the present invention, it may be satisfied that a user generates or changes a color of an interface control in a timely manner according to the user's preference and requirement, and a current color of a desktop wallpaper, thereby improving operation efficiency and user experience.

    Case 2



    [0069] Optionally, the acquiring the target image block from a currently used desktop wallpaper according to a preset size includes:
    acquiring the target image block from the desktop wallpaper according to a size of the interface control, so that a size of the target image block is larger than or equal to the size of the interface control.

    [0070] Specifically, in this embodiment of the present invention, the size of the target image block may be determined according to the size of the interface control, for example, the size of the target image block may be consistent with the size of the interface control, or the size of the target image block may be larger than the size of the interface control, so that it may be ensured that a quantity of pixels of the target image block is greater than or equal to a quantity of pixels of the interface control. For example, when a color value of a pixel of the target image block is directly used as a color value of a pixel of the interface control, it can be ensured that every pixel of the interface control can obtain a corresponding color value, thereby further improving effect of the present invention.

    [0071] It should be understood that, the above-enumerated relationship between the size of the target image block and the size of the interface control is only exemplary description, and the present invention is not limited thereto. For example, the size of the target image block may also be smaller than the size of the interface control. In this case, for example, two or more (for example, adjacent) pixels in the interface control may be enabled to use a color value of a same pixel in the target image block.

    [0072] It should be understood that, the above-enumerated position-based rule and size-based rule that are used as the preset rule are only exemplary description, and the present invention is not limited thereto. For example, a most characteristic image block, for example, a face image block in a character image, may further be determined from the desktop wallpaper by using various algorithms, and is used as the target image block.

    [0073] After at least one pixel is acquired according to the foregoing description, a pixel value of the at least one pixel may be acquired in S120. In this embodiment of the present invention, a method for acquiring a color value of a pixel, for example, may be implemented by using a getPixels (getPixels) function in a bitmap (Bitmap), where the getPixels function may be expressed as:
    getPixels (pixels, offset, stride, x, y, width, height), where:
    pixels denote an array of bitmap color values acquired based on an image (which is a desktop wallpaper here); offset denotes a first pixel index value that is read; stride denotes a quantity of row spacings ; x denotes an x coordinate value of the first pixel that is read; y denotes a y coordinate value of the first pixel that is read; width denotes a pixel width that is read from each row; and height denotes a quantity of rows that are read.

    [0074] For example, it is assumed that a width of the desktop wallpaper is w and a height of the desktop wallpaper is h. In this case, pixels may be determined according to a color value of each pixel of the desktop wallpaper, and w and h; stride is w, the parameter offset is determined based on a position of a pixel in the upper left corner of the target image block in the desktop wallpaper; the parameters x and y are a start position of a screenshot; and the parameters width and height are a width and a height of the screenshot, that is, the target image block is the screenshot that is read from (x, y) point of the desktop wallpaper, the size of the screenshot is width x height, and then a color value of the target image block is calculated.

    [0075] In this case, because the color value of each pixel of the desktop wallpaper is input in the foregoing, the foregoing acquired data may be directly used as the color value of each pixel of the target image block in S120.

    [0076] It should be understood that, the above-enumerated method for acquiring a color value of each pixel of the target image block is only exemplary description, and the present invention is not limited thereto. In a case in which the target image block is acquired from the desktop wallpaper by using another method, a color value of each pixel of the target image block may be read by using drawing software and the like. Alternatively, a color value of each pixel may be acquired by using another parameter of each pixel, for example, an ARGB value may be converted to a color value.

    [0077] After the color value of each pixel of the target image block is acquired according to the foregoing description, the color of the interface control may be determined in S130.

    [0078] Optionally, if a quantity of the pixel is one, the determining a color value of each pixel in the interface control according to the color value of the at least one pixel includes: using the color value of the pixel as the color value of each pixel in the interface control.

    [0079] Specifically, when the target image block includes only one pixel, the color value of the pixel may be directly used as the color value of each pixel in the interface control, thereby determining the color of the interface control.

    [0080] Optionally, if a quantity of the pixel is at least two, the determining a color value of each pixel in the interface control according to the color value of the at least one pixel includes: using color values of the at least two pixels as a color value of each corresponding pixel in the interface control.

    [0081] Specifically, for example, if the size of the target image block is the same as or approximately the same as the size of the interface control (or a quantity of pixels included in the target image block is the same as or approximately the same as a quantity of pixels included in the interface control), a color value of each pixel in the target image block may be used as the color value of each corresponding pixel (for example, having a same relative position) in the interface control, so that the color of the interface control is determined.

    [0082] Likewise, if a quantity of acquired pixels is the same as or approximately the same as the quantity of pixels included in the interface control, the color value of each pixel may be used as the color value of each corresponding pixel (for example, having a same relative position) in the interface control, so that the color of the interface control is determined.

    [0083] For another example, if the size of the target image block is corresponding to the size of the interface control (for example, a quantity of pixels included in the target image block is an integer multiple of a quantity of pixels included in the interface control), a color value of a pixel at a specified position in the target image block may be used as the color value of each corresponding pixel (for example, having a same relative position) in the interface control, so that the color of the interface control is determined. For example, if the quantity of pixels included in the target image block is twice the quantity of pixels included in the interface control (for example, the quantity of pixels included in the target image block is the same as the quantity of pixels included in the interface control in the y direction, the quantity of pixels included in the target image block is twice the quantity of pixels included in the interface control in the x direction), a color value of a pixel whose coordinate in x direction is an even number (or an odd number) in the target image block may be used as the color value of each corresponding pixel in the interface control, where the specified position may be set by a system or a user, which is not limited in this embodiment of the present invention.

    [0084] Likewise, if the quantity of acquired pixels is corresponding to the quantity of pixels included in the interface control (for example, a quantity of selected pixels is an integer multiple of the quantity of pixels included in the interface control), a color value of a pixel at a specified position in the acquired pixels may be used as the color value of each corresponding pixel (for example, having a same relative position) in the interface control, so that the color of the interface control is determined.

    [0085] For another example, if the size of the target image block is smaller than the size of the interface control, in this case, two or more (for example, adjacent) pixels in the interface control may be enabled to use a color value of a same pixel in the target image block.

    [0086] Likewise, if the quantity of acquired pixels is smaller than the quantity of pixels included in the interface control, two or more (for example, adjacent) pixels in the interface control may be enabled to use a color value of a same pixel.

    [0087] Optionally, the method further includes: performing first processing on the color value of each pixel in the interface control, and acquiring a color value of each pixel after the first processing, where the first processing includes at least one of the following processing:
    blurring processing, transparent processing, blackening processing, or color-changing processing.

    [0088] Specifically, in this embodiment of the present invention, blurring processing, transparent processing, or color-changing processing may be performed on the foregoing determined color value of the interface control, and a color of the interface control is determined according to a processed color value.

    [0089] In addition, different processing manners may further be used according to different light and dark conditions of a wallpaper. For example, if an overall color style of a desktop wallpaper is relatively dark, blurring or blackening processing may be performed on the target image block in a case in which a color style of the target image block (for example, the foregoing determined color value of the interface control) is relatively light.

    [0090] Optionally, if a quantity of the pixel is at least two, the determining a color value of each pixel in the interface control according to the color value of the at least one pixel includes:

    determining a target color value according to color values of the at least two pixels; and

    determining the color value of each pixel in the interface control according to the target value color.



    [0091] Specifically, for example, if the target image block includes multiple pixels with different colors, or at least one pair of different color values exists in the foregoing acquired color values of pixels of the target image block, a target color value may be determined from multiple (at least two) different color values, and a color value of each pixel in the interface control is determined according to the target color value.

    [0092] Optionally, the determining a target color value according to color values of the at least two pixels includes:
    performing calculation on the color values of the at least two pixels according to a preset algorithm, and using a result of the calculation as the target color value, where the algorithm includes:
    using a color value that appears most from the color values of the at least two pixels as the target color value.

    [0093] Specifically, in this embodiment of the present invention, times of color values may be counted, and a color value that appears most may be considered as a dominant hue of the target image block, so that the color value may be used as the target color value.

    [0094] Optionally, the determining a target color value according to color values of the at least two pixels includes:
    performing calculation on the color values of the at least two pixels according to a preset algorithm, and using a result of the calculation as the target color value, where the algorithm includes:
    calculating an average of the color values of the at least two pixels, and using the average as the target color value.

    [0095] Specifically, in this embodiment of the present invention, if the algorithm is that an average (which may include an arithmetic mean or a weighted mean) of color values of pixels is calculated, an average of color values of pixels is calculated, and the average is used as the target color value.

    [0096] It should be understood that, the above-enumerated method for determining the target color value is only exemplary description, and the present invention is not limited thereto. All algorithms that can achieve an inventive purpose of the present invention shall fall within the protection scope of the embodiments of the present invention. For example, a pixel may also be randomly selected from the target image block, and a color value of the pixel is used as the target color value.

    [0097] After the target color value is determined according to the foregoing description, a color value of each pixel in the interface control may be determined according to the target color value, so that a color of the interface control is determined.

    [0098] For example, the determining the color value of each pixel in the interface control according to the target value color includes:
    performing second processing on the target color value, and using a target color value after the second processing as the color value of each pixel in the interface control, where the second processing includes at least one of the following processing:
    blurring processing, transparent processing, blackening processing, or color-changing processing.

    [0099] Specifically, blurring processing, transparent processing, blackening processing, or color-changing processing may be performed on the foregoing determined color value of the interface control, and a color of the interface control is determined according to a processed color value.

    [0100] Here, the foregoing color-changing processing may include color gradient processing, that is, a color of the target image block is gradually deepened or lightened, so that multiple color values are acquired, and sequentially assigned to pixels of the interface control in a specific order (for example, from light to dark or from dark to light), so that the interface control is presented in gradient colors.

    [0101] In addition, different processing manners may further be used according to different light and dark conditions of a wallpaper. For example, if an overall color style of a desktop wallpaper is relatively dark, blurring or blackening processing may be performed on a target color in a case in which a target color value is relatively light.

    [0102] Optionally, the acquiring a target image block from a desktop wallpaper according to a preset rule includes:
    when the desktop wallpaper is changed, acquiring the target image block from a changed desktop wallpaper according to the preset rule.

    [0103] Specifically, the method 100 for determining a color of the interface control according to this embodiment of the present invention may be performed when a terminal device detects that a user changes a desktop wallpaper, so that after the user changes the desktop wallpaper, an interface control whose color is consistent with a style of the changed desktop wallpaper is generated in a timely manner for the user, thereby further improving user experience.

    [0104] Moreover, the method 100 for determining a color of an interface control according to this embodiment of the present invention may also be performed periodically, which is not specially limited in the present invention.

    [0105] According to the method for determining a color of an interface control in this embodiment of the present invention, at least one pixel is determined from a desktop wallpaper, and the color of the interface control is determined according to a color value of the at least one pixel, so that color and style matching between the desktop wallpaper and the interface control can be implemented, thereby enhancing visual attraction of a user interface and improving user experience.

    [0106] With reference to FIG. 1 and FIG. 4, the foregoing describes the method for determining a color of an interface control in detail according to the embodiments of the present invention. With reference to FIG. 5, the following describes an apparatus for determining a color of an interface control in detail according to an embodiment of the present invention.

    [0107] FIG. 5 shows a schematic block diagram of an apparatus 200 for determining a color of an interface control according to an embodiment of the present invention. As shown in FIG. 5, the apparatus 200 includes:

    a pixel acquiring unit 210, configured to acquire at least one pixel from a desktop wallpaper;

    a color value acquiring unit 220, configured to acquire a color value of the at least one pixel; and

    a color value determining unit 230, configured to determine a color value of each pixel in the interface control according to the color value of the at least one pixel.



    [0108] Optionally, the pixel acquiring unit 210 is specifically configured to acquire a target image block from the desktop wallpaper according to a preset rule, where the target image block includes the at least one pixel.

    [0109] Optionally, the pixel acquiring unit 210 is specifically configured to acquire the target image block from the desktop wallpaper according to a preset position; and/or
    acquire the target image block from the desktop wallpaper according to a preset size.

    [0110] Optionally, the pixel acquiring unit 210 is specifically configured to acquire the target image block from the desktop wallpaper according to a position of the interface control on a screen, so that a position of the target image block in the desktop wallpaper is corresponding to the position of the interface control on the screen.

    [0111] Optionally, the pixel acquiring unit 210 is specifically configured to acquire the target image block from the desktop wallpaper according to a size of the interface control, so that a size of the target image block is larger than or equal to the size of the interface control.

    [0112] Optionally, if a quantity of the pixel is one, the color value determining unit 230 is specifically configured to use the color value of the pixel as the color value of each pixel in the interface control; or
    if a quantity of the pixel is at least two, the color value determining unit 230 is specifically configured to use color values of the at least two pixels as a color value of each corresponding pixel in the interface control.

    [0113] Optionally, the color value determining unit 230 is further configured to: perform first processing on the color value of each pixel in the interface control, and acquire a color value of each pixel after the first processing, where the first processing includes at least one of the following processing:
    blurring processing, transparent processing, blackening processing, or color-changing processing.

    [0114] Optionally, if a quantity of the pixel is at least two, the color value determining unit 230 is specifically configured to determine a target color value according to color values of the at least two pixels; and
    determine a color of the interface control according to the target color value.

    [0115] Optionally, the color value determining unit 230 is specifically configured to perform calculation on the color values of the at least two pixels according to a preset algorithm, and use a result of the calculation as the target color value, where the algorithm includes:

    using a color value that appears most from the color values of the at least two pixels as the target color value; or

    calculating an average of the color values of the at least two pixels, and using the average as the target color value.



    [0116] Optionally, the color value determining unit 230 is further configured to perform second processing on the target color value, and use a target color value after the second processing as a color value of the interface control, where the second processing includes at least one of the following processing:
    blurring processing, transparent processing, blackening processing, or color-changing processing.

    [0117] The apparatus 200 for determining a color of an interface control according to this embodiment of the present invention may be corresponding to an execution body of a method of the embodiments of the present invention, and units in the apparatus 200 for determining a color of an interface control and the foregoing operations and/or functions are respectively for implementing corresponding procedures of the method 100 in FIG. 1. For brevity, details are not described herein again.

    [0118] According to the apparatus for determining a color of an interface control in this embodiment of the present invention, a target image block is determined from a desktop wallpaper, and the color of the interface control is determined according to a color value of a pixel in the target image block, so that color and style matching between the desktop wallpaper and the interface control can be implemented, thereby enhancing visual attraction of a user interface and improving user experience.

    [0119] With reference to FIG. 1 and FIG. 4, the foregoing describes the method for determining a color of an interface control in detail according to the embodiments of the present invention. With reference to FIG. 6, the following describes a terminal device in detail that is applicable to the method for determining a color of an interface control according to an embodiment of the present invention.

    [0120] FIG. 6 shows a schematic block diagram of a terminal device 300 that is applicable to the method for determining a color of an interface control according to an embodiment of the present invention. The terminal device 300 includes:

    a display 310, configured to present an operation interface corresponding to a function provided by the terminal device; and

    a processor 320, configured to: acquire at least one pixel from a desktop wallpaper of the operation interface, acquire a color value of the at least one pixel, and determine, according to the color value of the at least one pixel, a color value of each pixel in the interface control of the operation interface.



    [0121] Optionally, the processor 320 is specifically configured to acquire a target image block from the desktop wallpaper according to a preset rule, where the target image block includes the at least one pixel.

    [0122] Optionally, the processor 320 is specifically configured to acquire the target image block from the desktop wallpaper according to a preset position; and/or
    acquire the target image block from the desktop wallpaper according to a preset size.

    [0123] Optionally, the processor 320 is specifically configured to acquire the target image block from the desktop wallpaper according to a position of the interface control on a screen, so that a position of the target image block in the desktop wallpaper is corresponding to the position of the interface control on the screen.

    [0124] Optionally, the processor 320 is specifically configured to acquire the target image block from the desktop wallpaper according to a size of the interface control, so that a size of the target image block is larger than or equal to the size of the interface control.

    [0125] Optionally, if a quantity of the pixel is one, the processor 320 is specifically configured to use the color value of the pixel as the color value of each pixel in the interface control; or
    if a quantity of the pixel is at least two, the processor 320 is specifically configured to use color values of the at least two pixels as a color value of each corresponding pixel in the interface control.

    [0126] Optionally, the processor 320 is further configured to: perform first processing on the color value of each pixel in the interface control, and acquire a color value of each pixel after the first processing, where the first processing includes at least one of the following processing:
    blurring processing, transparent processing, blackening processing, or color-changing processing.

    [0127] Optionally, if a quantity of the pixel is at least two, the processor 320 is specifically configured to determine a target color value according to color values of the at least two pixels; and
    determine a color of the interface control according to the target color value.

    [0128] Optionally, the processor 320 is specifically configured to perform calculation on the color values of the at least two pixels according to a preset algorithm, and use a result of the calculation as the target color value, where the algorithm includes:

    using a color value that appears most from the color values of the at least two pixels as the target color value; or

    calculating an average of the color values of the at least two pixels, and using the average as the target color value.



    [0129] Optionally, the processor 320 is further configured to perform second processing on the target color value, and use a target color value after the second processing as a color value of the interface control, where the second processing includes at least one of the following processing:
    blurring processing, transparent processing, blackening processing, or color-changing processing.

    [0130] Moreover, in this embodiment of the present invention, the terminal device 300 may further include a memory 330, and the memory 330 may include a RAM and a ROM, or any fixed storage medium, or a removable storage medium, and is configured to store a program that is executed by the processor 320 and can implement the embodiments of the present invention, or to-be-processed data in the embodiments of the present invention, or various preset rules and algorithms.

    [0131] In addition, the processor 320 and the memory 330 may also be integrated into a physical device that is applied to the embodiments of the present invention, and the physical device stores and runs a program that implements the embodiments of the present invention.

    [0132] In this embodiment of the present invention, components of the terminal device 300 are coupled together by using a bus. The bus includes a data bus, and further includes a power bus, a control bus, and a status signal bus.

    [0133] The processor 320 can implement or execute the steps, and the logical block diagrams disclosed in the embodiments of the present invention. The processor 320 may be a microprocessor, or the processor may also be any conventional processor or decoder, or the like. The steps of the methods disclosed in the embodiments of the present invention may be directly executed by a hardware processor, or executed by a combination of hardware and software modules in a decoding processor. The software module may be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, or a register. The storage medium is located in the memory. The processor reads information from the memory, and completes the steps of the foregoing methods in combination with the hardware.

    [0134] It should be understood that, in this embodiment of the present invention, the processor 320 may be a central processing unit (Central Processing Unit, "CPU" for short), may also be a graphic processing unit (GPU, Graphic Processing Unit), and may also be another general purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or another programmable logic device, a discrete gate, or a transistor logic device, a discrete hardware assembly, and the like. The general purpose processor may be a microprocessor, or the processor may also be any conventional processor, or the like.

    [0135] The memory may include a read-only memory and a random access memory, and provide an instruction and data for the processor 320. A part of the memory may further include a nonvolatile random access memory. For example, the memory may further store information of a device type.

    [0136] In an implementation process, the steps in the foregoing methods may be completed by means of an integrated logic circuit of hardware in the processor 320 or an instruction in a form of software. The steps of the methods disclosed in the embodiments of the present invention may be directly executed by a hardware processor, or executed by a combination of hardware and software modules in a processor. The software module may be located in a mature storage medium in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, or a register.

    [0137] The terminal device 300 that is applicable to the embodiments of the present invention may be corresponding to an execution body of a method 100 of the embodiments of the present invention, and units in the terminal device 300 and the foregoing operations and/or functions are respectively for implementing corresponding procedures of the method 100 in FIG. 1. For brevity, details are not described herein again.

    [0138] According to the device for determining a color of an interface control in this embodiment of the present invention, a target image block is determined from a desktop wallpaper, and the color of the interface control is determined according to a color value of a pixel in the target image block, so that color and style matching between the desktop wallpaper and the interface control can be implemented, thereby enhancing visual attraction of a user interface and improving user experience.

    [0139] It should be understood that sequence numbers of the foregoing processes do not mean execution sequences in the embodiments of the present invention. The execution sequences of the processes should be determined according to functions and internal logic of the processes, and should not be construed as any limitation on the implementation processes of the embodiments of the present invention.

    [0140] A person of ordinary skill in the art may be aware that, in combination with the examples described in the embodiments disclosed in this specification, units and algorithm steps may be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on particular applications and design constraint conditions of the technical solutions. A person skilled in the art may use different apparatuses to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of the present invention.

    [0141] It may be clearly understood by a person skilled in the art that, for ease and brevity of description, for a detailed working process of the foregoing system, apparatus, and unit, reference may be made to a corresponding process in the foregoing apparatus embodiments, and details are not described herein again.

    [0142] In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus, and apparatus may be implemented in other manners. For example, the described apparatus embodiment is merely exemplary. For example, the unit division is merely logical function division and may be other division in actual implementation. For example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.

    [0143] The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual requirements to achieve the purposes of the solutions of the embodiments.

    [0144] In addition, functional units in the embodiments of the present invention may be integrated into one processor, or each of the units may exist alone physically, or two or more units are integrated into one unit.

    [0145] When the functions are implemented in the form of a software functional unit and sold or used as an independent product, the functions may be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of the present invention essentially, or the part contributing to the prior art, or a part of the technical solutions may be implemented in a form of a software product. The software product is stored in a storage medium, and includes several instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to perform all or a part of the steps of the apparatuses described in the embodiments of the present invention. The foregoing storage medium includes: any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc.

    [0146] The foregoing descriptions are merely specific implementation manners of the present invention, but are not intended to limit the protection scope of the present invention. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in the present invention shall fall within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

    [0147] The term "and/or" in this specification describes only an association relationship for describing associated objects and represents that three relationships may exist. For example, A and/or B may represent the following three cases: Only A exists, both A and B exist, and only B exists. In addition, the character "/" in this specification generally indicates an "or" relationship between the associated objects.

    [0148] It should be understood that sequence numbers of the foregoing processes do not mean execution sequences in various embodiments of the present invention. The execution sequences of the processes should be determined according to functions and internal logic of the processes, and should not be construed as any limitation on the implementation processes of the embodiments of the present invention.

    [0149] A person of ordinary skill in the art may be aware that, in combination with the examples described in the embodiments disclosed in this specification, units and algorithm steps may be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on particular applications and design constraint conditions of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of the present invention.

    [0150] It may be clearly understood by a person skilled in the art that, for ease and brevity of description, for a detailed working process of the foregoing system, apparatus, and unit, reference may be made to a corresponding process in the foregoing method embodiments, and details are not described herein again.

    [0151] In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other manners. For example, the described apparatus embodiment is merely exemplary. For example, the unit division is merely logical function division and may be other division in actual implementation. For example, a plurality of units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, the displayed or discussed mutual couplings or direct couplings or communication connections may be implemented through some interfaces. The indirect couplings or communication connections between the apparatuses or units may be implemented in electronic, mechanical, or other forms.

    [0152] The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual requirements to achieve the purposes of the solutions of the embodiments.

    [0153] In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each of the units may exist alone physically, or two or more units are integrated into one unit.

    [0154] When the functions are implemented in the form of a software functional unit and sold or used as an independent product, the functions may be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of the present invention essentially, or the part contributing to the prior art, or some of the technical solutions may be implemented in a form of a software product. The software product is stored in a storage medium, and includes several instructions for instructing a computer device (which may be a personal computer, a server, or a network device) to perform all or some of the steps of the methods described in the embodiments of the present invention. The foregoing storage medium includes: any medium that can store program code, such as a USB flash drive, a removable hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc.

    [0155] Further embodiments of the present invention are provided in the following. It should be noted that the numbering used in the following section does not necessarily need to comply with the numbering used in the previous sections.

    Embodiment 1. A method for determining a color of an interface control, wherein the method comprises:

    acquiring at least one pixel from a desktop wallpaper;

    acquiring a color value of the at least one pixel; and

    determining a color value of each pixel in the interface control according to the color value of the at least one pixel.

    Embodiment 2. The method according to Embodiment 1, wherein the acquiring at least one pixel from a desktop wallpaper comprises:
    acquiring a target image block from the desktop wallpaper according to a preset rule, wherein the target image block comprises the at least one pixel.

    Embodiment 3. The method according to Embodiment 2, wherein the acquiring a target image block from the desktop wallpaper according to a preset rule comprises:

    acquiring the target image block from the desktop wallpaper according to a preset position; and/or

    acquiring the target image block from the desktop wallpaper according to a preset size.

    Embodiment 4. The method according to Embodiment 3, wherein the acquiring the target image block from the desktop wallpaper according to a preset position comprises:
    acquiring the target image block from the desktop wallpaper according to a position of the interface control on a screen, so that a position of the target image block in the desktop wallpaper is corresponding to the position of the interface control on the screen.

    Embodiment 5. The method according to Embodiment 3, wherein the acquiring the target image block from the desktop wallpaper according to a preset size comprises:
    acquiring the target image block from the desktop wallpaper according to a size of the interface control, so that a size of the target image block is larger than or equal to the size of the interface control.

    Embodiment 6. The method according to any one of Embodiments 1 to 5, wherein:

    if a quantity of the pixel is one, the determining a color value of each pixel in the interface control according to the color value of the at least one pixel comprises: using the color value of the pixel as the color value of each pixel in the interface control; or

    if a quantity of the pixel is at least two, the determining a color value of each pixel in the interface control according to the color value of the at least one pixel comprises: using color values of the at least two pixels as a color value of each corresponding pixel in the interface control.

    Embodiment 7. The method according to Embodiment 6, wherein the method further comprises: performing first processing on the color value of each pixel in the interface control, and acquiring a color value of each pixel after the first processing, wherein the first processing comprises at least one of the following processing:
    blurring processing, transparent processing, blackening processing, or color-changing processing.

    Embodiment 8. The method according to any one of Embodiments 1 to 5, wherein if a quantity of the pixel is at least two, the determining a color value of each pixel in the interface control according to the color value of the at least one pixel comprises:

    determining a target color value according to color values of the at least two pixels; and

    determining the color value of each pixel in the interface control according to the target value color.

    Embodiment 9. The method according to Embodiment 8, wherein the determining a target color value according to color values of the at least two pixels comprises:
    performing calculation on the color values of the at least two pixels according to a preset algorithm, and using a result of the calculation as the target color value, wherein the algorithm comprises:

    using a color value that appears most from the color values of the at least two pixels as the target color value; or

    calculating an average of the color values of the at least two pixels, and using the average as the target color value.

    Embodiment 10. The method according to Embodiment 8 or 9, wherein the determining the color value of each pixel in the interface control according to the target value color comprises:
    performing second processing on the target color value, and using a target color value after the second processing as the color value of each pixel in the interface control, wherein the second processing comprises at least one of the following processing:
    blurring processing, transparent processing, blackening processing, or color-changing processing.

    Embodiment 11. An apparatus for determining a color of an interface control, wherein the apparatus comprises:

    a pixel acquiring unit, configured to acquire at least one pixel from a desktop wallpaper;

    a color value acquiring unit, configured to acquire a color value of the at least one pixel; and

    a color value determining unit, configured to determine a color value of each pixel in the interface control according to the color value of the at least one pixel.

    Embodiment 12. The apparatus according to Embodiment 11, wherein the pixel acquiring unit is specifically configured to acquire a target image block from the desktop wallpaper according to a preset rule, wherein the target image block comprises the at least one pixel.

    Embodiment 13. The apparatus according to Embodiment 12, wherein the pixel acquiring unit is specifically configured to acquire the target image block from the desktop wallpaper according to a preset position; and/or
    acquire the target image block from the desktop wallpaper according to a preset size.

    Embodiment 14. The apparatus according to Embodiment 13, wherein the pixel acquiring unit is specifically configured to acquire the target image block from the desktop wallpaper according to a position of the interface control on a screen, so that a position of the target image block in the desktop wallpaper is corresponding to the position of the interface control on the screen.

    Embodiment 15. The apparatus according to Embodiment 13, wherein the pixel acquiring unit is specifically configured to acquire the target image block from the desktop wallpaper according to a size of the interface control, so that a size of the target image block is larger than or equal to the size of the interface control.

    Embodiment 16. The apparatus according to any one of Embodiments 11 to 15, wherein:

    if a quantity of the pixel is one, the color value determining unit is specifically configured to use the color value of the pixel as the color value of each pixel in the interface control; or

    if a quantity of the pixel is at least two, the color value determining unit is specifically configured to use color values of the at least two pixels as a color value of each corresponding pixel in the interface control.

    Embodiment 17. The apparatus according to Embodiment 16, wherein the color value determining unit is further configured to: perform first processing on the color value of each pixel in the interface control, and acquire a color value of each pixel after the first processing, wherein the first processing comprises at least one of the following processing:
    blurring processing, transparent processing, blackening processing, or color-changing processing.

    Embodiment 18. The apparatus according to any one of Embodiments 11 to 15, wherein if a quantity of the pixel is at least two, the color value determining unit is specifically configured to determine a target color value according to color values of the at least two pixels; and
    determine a color of the interface control according to the target color value.

    Embodiment 19. The apparatus according to Embodiment 18, wherein the color value determining unit is specifically configured to perform calculation on the color values of the at least two pixels according to a preset algorithm, and use a result of the calculation as the target color value, wherein the algorithm comprises:

    using a color value that appears most from the color values of the at least two pixels as the target color value; or

    calculating an average of the color values of the at least two pixels, and using the average as the target color value.

    Embodiment 20. The apparatus according to Embodiment 18 or 19, wherein the color value determining unit is further configured to perform second processing on the target color value, and use a target color value after the second processing as a color value of the interface control, wherein the second processing comprises at least one of the following processing:
    blurring processing, transparent processing, blackening processing, or color-changing processing.

    Embodiment 21. A terminal device for determining a color of an interface control, wherein the terminal device comprises:

    a display, configured to present an operation interface corresponding to a function provided by the terminal device; and

    a processor, configured to: acquire at least one pixel from a desktop wallpaper of the operation interface, acquire a color value of the at least one pixel, and determine, according to the color value of the at least one pixel, a color value of each pixel in the interface control of the operation interface.

    Embodiment 22. The device according to Embodiment 21, wherein the processor is specifically configured to acquire a target image block from the desktop wallpaper according to a preset rule, wherein the target image block comprises the at least one pixel.

    Embodiment 23. The device according to Embodiment 22, wherein the processor is specifically configured to acquire the target image block from the desktop wallpaper according to a preset position; and/or
    acquire the target image block from the desktop wallpaper according to a preset size.

    Embodiment 24. The device according to Embodiment 23, wherein the processor is specifically configured to acquire the target image block from the desktop wallpaper according to a position of the interface control on a screen, so that a position of the target image block in the desktop wallpaper is corresponding to the position of the interface control on the screen.

    Embodiment 25. The device according to Embodiment 23, wherein the processor is specifically configured to acquire the target image block from the desktop wallpaper according to a size of the interface control, so that a size of the target image block is larger than or equal to the size of the interface control.

    Embodiment 26. The device according to any one of Embodiments 21 to 25, wherein:

    if a quantity of the pixel is one, the processor is specifically configured to use the color value of the pixel as the color value of each pixel in the interface control; or

    if a quantity of the pixel is at least two, the processor is specifically configured to use color values of the at least two pixels as a color value of each corresponding pixel in the interface control.

    Embodiment 27. The device according to Embodiment 26, wherein the processor is further configured to: perform first processing on the color value of each pixel in the interface control, and acquire a color value of each pixel after the first processing, wherein the first processing comprises at least one of the following processing:
    blurring processing, transparent processing, blackening processing, or color-changing processing.

    Embodiment 28. The device according to any one of Embodiments 21 to 25, wherein if a quantity of the pixel is at least two, the processor is specifically configured to determine a target color value according to color values of the at least two pixels; and
    determine a color of the interface control according to the target color value.

    Embodiment 29. The device according to Embodiment 28, wherein the processor is specifically configured to perform calculation on the color values of the at least two pixels according to a preset algorithm, and use a result of the calculation as the target color value, wherein the algorithm comprises:

    using a color value that appears most from the color values of the at least two pixels as the target color value; or

    calculating an average of the color values of the at least two pixels, and using the average as the target color value.

    Embodiment 30. The device according to Embodiment 28 or 29, wherein the processor is further configured to perform second processing on the target color value, and use a target color value after the second processing as a color value of the interface control, wherein the second processing comprises at least one of the following processing:
    blurring processing, transparent processing, blackening processing, or color-changing processing.



    [0156] The foregoing descriptions are merely specific implementation manners of the present invention, but are not intended to limit the protection scope of the present invention. Any variation or replacement readily figured out by a person skilled in the art within the technical scope disclosed in the present invention shall fall within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.


    Claims

    1. A method for determining a color of an interface control, wherein the method comprises:

    detecting a touch signal of a touch display of the terminal device and a position of the touch display from which the touch signal comes;

    acquiring at least one pixel from a desktop wallpaper (S110);

    acquiring a color value of the at least one pixel (S120); and

    determining a color value of each pixel in the interface control according to the color value of the at least one pixel (S130),

    wherein the acquiring at least one pixel from a desktop wallpaper (S110) comprises:

    acquiring a target image block from the desktop wallpaper according to the detected position, wherein a position of the target image block in the desktop wallpaper is corresponding to the position of the image block presented at the detected position,

    wherein the target image block comprises the at least one pixel.


     
    2. The method according to claim 1, further comprising:
    displaying an icon for instruct a user to select the target image block.
     
    3. The method according to any one of claims 1 to 2, further comprising:
    displaying the determined color value of each pixel in the interface control.
     
    4. The method according to any one of claims 1 to 3, wherein:

    if a quantity of the pixel is one, the determining a color value of each pixel in the interface control according to the color value of the at least one pixel (S130) comprises: using the color value of the pixel as the color value of each pixel in the interface control; or

    if a quantity of the pixel is at least two, the determining a color value of each pixel in the interface control according to the color value of the at least one pixel (S130) comprises: using color values of the at least two pixels as a color value of each corresponding pixel in the interface control.


     
    5. The method according to any one of claims 1 to 3, wherein if a quantity of the pixel is at least two, the determining a color value of each pixel in the interface control according to the color value of the at least one pixel (S130) comprises:

    performing calculation on the color values of the at least two pixels according to a preset algorithm, and using a result of the calculation as a target color value; and

    determining the color value of each pixel in the interface control according to the target value color;

    wherein, the algorithm comprises:

    using a color value that appears most from the color values of the at least two pixels as the target color value; or

    calculating an average of the color values of the at least two pixels, and using the average as the target color value.


     
    6. The method according to any one of claims 1 to 5, wherein the step of determining a color value of each pixel in the interface control according to the color value of the at least one pixel comprises:

    determining a color value of each pixel in the interface control according to the color value of the at least one pixel;

    performing blurring processing, transparent processing, blackening processing, color-changing processing, or color gradient processing on the determined color value of the interface control, and

    determining a color of the interface control according to a processed color value.


     
    7. A terminal device (300) for determining a color of an interface control, wherein the apparatus comprises:

    a display (310), configured to: present an operation interface corresponding to a function provided by the terminal device;

    a processor (320), configured to execute the method according to any one of claims 1 to 6; and

    a memory (330), configured to store a program that is executed by the processor 320.


     
    8. A computer-readable storage medium, comprising computer program code, wherein when a computing unit executes the computer program code, the computing unit executes actions according to any one of claims 1 to 6.
     


    Ansprüche

    1. Verfahren zur Bestimmung der Farbe einer Schnittstellensteuerung, wobei das Verfahren umfasst:

    Detektieren eines Berührungssignals einer berührungssensiblen Anzeige der Endgeräteeinrichtung und einer Position der berührungssensiblen Anzeige, von der das Berührungssignal kommt;

    Erfassen von mindestens einem Pixel aus einem Desktop-Hintergrundbild (S110);

    Erfassen eines Farbwerts des mindestens einen Pixels (S120); und

    Festlegen eines Farbwerts von jedem Pixel in der Schnittstellensteuerung entsprechend dem Farbwert des mindestens einen Pixels (S130),

    wobei das Erfassen des mindestens einen Pixels aus einem Desktop-Hintergrundbild (S110) umfasst:

    Erfassen eines Zielbildblocks aus dem Desktop-Hintergrundbild entsprechend der detektierten Position, wobei eine Position des Zielbildblocks in dem Desktop-Hintergrundbild der an der detektierten Position präsentierten Position des Bildblocks entspricht,

    wobei der Zielbildblock das mindestens eine Pixel umfasst.


     
    2. Verfahren nach Anspruch 1, ferner umfassend:
    Anzeigen eines Symbols zum Anweisen eines Benutzers zum Auswählen des Zielbildblocks.
     
    3. Verfahren nach einem der Ansprüche 1 bis 2, ferner umfassend:
    Anzeigen des ermittelten Farbwerts für jedes Pixel in der Schnittstellensteuerung.
     
    4. Verfahren nach einem der Ansprüche 1 bis 3, wobei,
    falls eine Menge der Pixel eins ist, das Festlegen eines Farbwerts von jedem Pixel in der Schnittstellensteuerung entsprechend dem Farbwert des mindestens einen Pixels (S130) umfasst: Verwenden des Farbwerts des Pixels als Farbwert von jedem Pixel in der Schnittstellensteuerung; oder
    falls eine Menge der Pixel mindestens zwei ist, das Festlegen eines Farbwerts von jedem Pixel in der Schnittstellensteuerung entsprechend dem Farbwert des mindestens einen Pixels (S130) umfasst: Verwenden von Farbwerten der mindestens zwei Pixel als ein Farbwert von jedem entsprechenden Pixel in der Schnittstellensteuerung.
     
    5. Verfahren nach einem der Ansprüche 1 bis 3, wobei, falls eine Menge der Pixel mindestens zwei ist, das Festlegen eines Farbwerts von jedem Pixel in der Schnittstellensteuerung entsprechend dem Farbwert des mindestens einen Pixels (S130) umfasst:

    Durchführen einer Berechnung an den Farbwerten der mindestens zwei Pixel entsprechend einem vorgegebenen Algorithmus und Verwenden eines Resultats der Berechnung als Zielfarbwert; und

    Festlegen des Farbwerts von jedem Pixel in der Schnittstellensteuerung entsprechend dem Zielfarbwert;

    wobei der Algorithmus umfasst:

    Verwenden eines Farbwerts, der unter den Farbwerten der mindestens zwei Pixel am häufigsten als der Zielfarbwert erscheint; oder

    Berechnen eines Durchschnitts der Farbwerte der mindestens zwei Pixel und Verwenden des Durchschnitts als Zielfarbwert.


     
    6. Verfahren nach einem der Ansprüche 1 bis 5, wobei der Schritt des Festlegens eines Farbwerts von jedem Pixel in der Schnittstellensteuerung entsprechend dem Farbwert des mindestens einen Pixels umfasst:

    Festlegen eines Farbwerts von jedem Pixel in der Schnittstellensteuerung entsprechend dem Farbwert des mindestens einen Pixels;

    Durchführen von Unschärfeverarbeitung, Transparenzverarbeitung, Schwärzungsverarbeitung, Farbänderungsverarbeitung oder Farbgradientenverarbeitung an dem ermittelten Farbwert der Schnittstellensteuerung, und

    Festlegen einer Farbe der Schnittstellensteuerung entsprechend einem verarbeiteten Farbwert.


     
    7. Endgeräteeinrichtung (300) zum Ermitteln einer Farbe einer Schnittstellensteuerung, wobei die Vorrichtung umfasst:

    eine Anzeige (310), ausgelegt zum Präsentieren einer Operationsschnittstelle entsprechend einer durch die Endgeräteeinrichtung bereitgestellten Funktion;

    einen Prozessor (320), ausgelegt zum Ausführen des Verfahrens nach einem der Ansprüche 1 bis 6; und

    einen Speicher (330), ausgelegt zum Speichern eines Programms, das durch den Prozessor 320 ausgeführt wird.


     
    8. Rechnerlesbares Speichermedium, umfassend Rechnerprogrammcode, wobei, wenn eine Recheneinheit den Rechnerprogrammcode ausführt, die Recheneinheit Vorgänge entsprechend einem der Ansprüche 1 bis 6 ausführt.
     


    Revendications

    1. Procédé permettant de déterminer une couleur d'une commande d'interface, dans lequel le procédé comprend :

    la détection d'un signal tactile d'un écran tactile du dispositif terminal et d'une position de l'écran tactile d'où provient le signal tactile ;

    l'acquisition d'au moins un pixel à partir d'un fond d'écran de bureau (S110) ;

    l'acquisition d'une valeur de couleur de l'au moins un pixel (S 120) ; et

    la détermination d'une valeur de couleur de chaque pixel dans la commande d'interface en fonction de la valeur de couleur de l'au moins un pixel (S130),

    dans lequel l'acquisition d'au moins un pixel à partir d'un fond d'écran de bureau (S110) comprend :

    l'acquisition d'un bloc d'image cible à partir du fond d'écran de bureau en fonction de la position détectée, dans lequel une position du bloc d'image cible dans le fond d'écran de bureau correspond à la position du bloc d'image présenté au niveau de la position détectée,

    dans lequel le bloc d'image cible comprend l'au moins un pixel.


     
    2. Procédé selon la revendication 1, comprenant en outre :
    l'affichage d'une icône pour donner instruction à un utilisateur de sélectionner le bloc d'image cible.
     
    3. Procédé selon l'une quelconque des revendications 1 à 2, comprenant en outre :
    l'affichage de la valeur de couleur déterminée de chaque pixel dans la commande d'interface.
     
    4. Procédé selon l'une quelconque des revendications 1 à 3, dans lequel :

    si une quantité du pixel est un, la détermination d'une valeur de couleur de chaque pixel dans la commande d'interface en fonction de la valeur de couleur de l'au moins un pixel (S130) comprend : l'utilisation de la valeur de couleur du pixel en tant que valeur de couleur de chaque pixel dans la commande d'interface ; ou

    si une quantité du pixel est au moins deux, la détermination d'une valeur de couleur de chaque pixel dans la commande d'interface en fonction de la valeur de couleur de l'au moins un pixel (S130) comprend : l'utilisation de valeurs de couleur des deux pixels, ou plus, en tant que valeur de couleur de chaque pixel correspondant dans la commande d'interface.


     
    5. Procédé selon l'une quelconque des revendications 1 à 3, dans lequel si une quantité du pixel est au moins deux, la détermination d'une valeur de couleur de chaque pixel dans la commande d'interface en fonction de la valeur de couleur de l'au moins un pixel (S130) comprend :

    l'exécution du calcul sur les valeurs de couleur des deux pixels, ou plus, en fonction d'un algorithme prédéfini, et l'utilisation d'un résultat du calcul en tant que valeur de couleur cible ; et

    la détermination de la valeur de couleur de chaque pixel dans la commande d'interface en fonction de la couleur de la valeur cible ;

    dans lequel l'algorithme comprend :

    l'utilisation d'une valeur de couleur qui apparaît le plus à partir des valeurs de couleur des deux pixels, ou plus, en tant que valeur de couleur cible ; ou

    le calcul d'une moyenne des valeurs de couleur des deux pixels, ou plus, et l'utilisation de la moyenne en tant que valeur de couleur cible.


     
    6. Procédé selon l'une quelconque des revendications 1 à 5, dans lequel l'étape de détermination d'une valeur de couleur de chaque pixel dans la commande d'interface en fonction de la valeur de couleur de l'au moins un pixel comprend :

    la détermination d'une valeur de couleur de chaque pixel dans la commande d'interface en fonction de la valeur de couleur de l'au moins un pixel ;

    l'exécution d'un traitement de flou, d'un traitement transparent, d'un traitement de noircissement, d'un traitement de changement de couleur ou d'un traitement de gradient de couleur sur la valeur de couleur déterminée de la commande d'interface, et

    la détermination d'une couleur de la commande d'interface en fonction d'une valeur de couleur traitée.


     
    7. Dispositif terminal (300) permettant de déterminer une couleur d'une commande d'interface, dans lequel l'appareil comprend :

    un écran d'affichage (310), conçu pour : présenter une interface de fonctionnement correspondant à une fonction fournie par le dispositif terminal ;

    un processeur (320), conçu pour exécuter le procédé selon l'une quelconque des revendications 1 à 6 ; et

    une mémoire (330), conçue pour stocker un programme qui est exécuté par le processeur 320.


     
    8. Support de stockage lisible par ordinateur, comprenant un code de programme informatique, dans lequel lorsqu'une unité informatique exécute le code de programme informatique, l'unité informatique exécute des actions selon l'une quelconque des revendications 1 à 6.
     




    Drawing












    REFERENCES CITED IN THE DESCRIPTION



    This list of references cited by the applicant is for the reader's convenience only. It does not form part of the European patent document. Even though great care has been taken in compiling the references, errors or omissions cannot be excluded and the EPO disclaims all liability in this regard.

    Patent documents cited in the description