Method for Displaying Colors and Electronic Device
By implementing cross-process interaction and global color acquisition in the terminal device, users can perform color acquisition at any interface location, solving the problem of limited color acquisition function in the prior art and meeting users' needs for various colors.
Patent Information
- Application Number
- CN202411003323.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-11
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2043-07-11
AI Technical Summary
The existing terminal devices have limited functions to obtain color during drawing, and cannot achieve cross-process interaction and global color selection, which cannot meet users' diverse needs for different colors.
By implementing a method of displaying colors in an electronic device, the user allows the color to be picked at any position in the interface. The specific steps include displaying the color picker controls, and interacting across processes with the input module through the stylus tool module to obtain color information in the screenshot.
Cross-process interaction and global color collection are realized. Users can place the color collector control at any position to obtain color, meeting users' diverse needs for color when drawing pictures.
Smart Images

Figure CN119048617B_ABST
Abstract
Description
[0001] This application is a divisional application. The application number of the original application is 202310849391.3, and the filing date of the original application is July 11, 2023. The entire content of the original application is incorporated herein by reference. Technical Field
[0002] This application relates to the field of terminal devices, and in particular, to a method for displaying colors and an electronic device. Background Art
[0003] With the development of terminal device technology, the types of applications of terminal devices are increasing, and the functions provided are becoming more and more abundant. Current note applications and the like can provide a drawing function, enabling users to draw images within the application. During the drawing process, the user can use the color picking function provided by the note application to pick colors at specified positions within the interface, so as to attach the required color to the brush. Summary of the Invention
[0004] This application provides a method for displaying colors and an electronic device. In this method, the electronic device can pick colors at any position within the interface to meet user needs.
[0005] In a first aspect, this application provides a method for displaying colors. The method includes: at a first time, the electronic device displays a first interface, which includes a second interface of a first application and a third interface of a second application. Among them, the second interface is a part of the first interface, and the second interface includes a first icon, and the color of the first icon is a first color. At a second time, in response to a first operation on the second interface received by the electronic device, a color picker control is displayed at a first position on the first interface. Then, in response to a second operation on the color picker control received by the electronic device, the color picker control is displayed at a second position on the first interface. Among them, the second position is outside the display area range of the second interface, and a second color is displayed in the color picker control, where the second color is the color of the pixel corresponding to the second position in the first interface. At a third time, in response to a third operation received by the electronic device, the color picker control is not displayed, and the color of the first icon changes to the second color. In this way, this application can achieve cross-process interaction, and the user can place the color picker control at any position outside the display area range of the interface of the first application to pick colors, so as to meet the different color requirements of the user when drawing.
[0006] Exemplarily, the user can operate the electronic device according to the color picking requirements, so that different color picking objects are displayed in the display interface of the electronic device, thereby achieving color picking for different color picking objects.
[0007] Exemplarily, the first time and the third time are different times. It can be understood that the content displayed on the first interface at the first time is different from the content displayed on the first interface at the third time. For example, at the first time, the first interface includes a second interface and a third interface, where the first icon in the second interface is of a first color. At the second time, the first interface still includes the second interface and the third interface, and the first icon in the second interface is of a second color.
[0008] Exemplarily, the first position can be the position where the color picker control last stayed during the previous color picking. The first position can also be a preset position, such as the center of the first interface. Among them, the first position can be included in the second interface or the third interface, which is not limited in this application.
[0009] Exemplarily, the size of the second interface is smaller than the size of the first interface, and the size of the third interface is smaller than the size of the first interface.
[0010] Exemplarily, the second interface and the first interface can be displayed overlapping, in split screen, or in the form of a floating window, which is not limited in this application.
[0011] Exemplarily, the first operation is Figure 4b a click operation on the color pick option in
[0012] Exemplarily, the second operation is a drag operation without lifting the hand during the dragging process.
[0013] Exemplarily, the third operation is a hand-lifting operation.
[0014] Exemplarily, the color picker control can also be referred to as a color picker or a color picker icon, etc., which is not limited in this application.
[0015] Exemplarily, the user can perform each user operation in this application, such as the first operation, the second operation, and the third operation, etc., through a finger or a stylus.
[0016] In a possible implementation manner, the method further includes: at the fourth time, in response to receiving a first operation on the second interface, the color picker control is displayed at a third position on the first interface. In response to receiving a press operation on a second icon in the first interface, the color picker control is displayed at a fourth position on the first interface, and a third color is displayed in the color picker, where the third color is the color of the pixel corresponding to the fourth position in the first interface. At the fifth time, in response to receiving a fourth operation, the color picker control is not displayed, and the color of the first icon is changed to the third color. In this way, when the electronic device executes the global color picking process, the touch events of the electronic device are locked, and all touch events only act on the global color picking.
[0017] Exemplarily, the fourth operation is a hand-lifting operation.
[0018] Exemplarily, when the color picker control is in the third position, the lower half of the outer ring of the color picker control displays the second color, that is, the color picked last time.
[0019] In a possible implementation, the method further includes: at a sixth time, in response to a click operation received on the second icon, the electronic device displays a fourth interface, the fourth interface includes the second interface, and the fourth interface does not include the color picker control. In this way, before the electronic device completes the global color picking process or does not execute the global color picking process, the touch events of the electronic device are executed according to the normal process, that is, the touch events are not locked. The electronic device can display the corresponding interface in response to the user's operation. For example, when the user clicks on the calendar application icon, the fourth interface displayed includes the calendar application interface and the second interface.
[0020] In a possible implementation, the second application is a video application, the third interface is a video playback interface, and the video playback interface includes a video playback window in which a video image is played. In response to a second operation received on the color picker control, the color picker control is displayed at a second position on the first interface, including: in response to the second operation received on the color picker control, the color picker control is displayed at the second position on the first interface, the second position is within the video playback window, and the color displayed by the color picker control is the color of the pixel corresponding to the second position within the video playback interface; the color picker control remains at the second position, and the color displayed by the color picker control changes as the color of the pixel corresponding to the second position in the played video image changes. In this way, the color picking object corresponding to the global color picking in this application can be a video stream, that is, the user can select a color in the video stream through the color picker.
[0021] In a possible implementation, the second application is a camera application, the third interface is a camera preview interface, and the preview image captured by the camera is displayed in the camera preview interface; in response to a second operation received on the color picker control, the color picker control is displayed at a second position on the first interface, including: in response to the second operation received on the color picker control, the color picker control is displayed at the second position on the first interface, the second position is within the camera preview interface, and the color displayed by the color picker control is the color of the pixel corresponding to the second position within the camera preview interface. The color picker control remains at the second position, and the color displayed by the color picker control changes as the color of the pixel corresponding to the second position in the preview image changes. In this way, the color picking object corresponding to the global color picking in this application can be the image captured by the camera, that is, the user can select a color in the preview image through the color picker, so as to obtain the color in the real world.
[0022] In a possible implementation, the color picker control includes an inner ring area and an outer ring area. The inner ring area includes a first color picking area and at least one second color picking area, and the outer ring area includes a first half ring and a second half ring. When the color picker control is displayed at a second position on the first interface, the first color picking area displays a second color, at least one second color picking area displays the color corresponding to at least one pixel around the second position, the first half ring displays the second color, and the second half ring displays a preset color.
[0023] Exemplarily, the preset color can be the color obtained from the previous color picking.
[0024] Exemplarily, the first color picking area can be at the center position of at least one second color picking area.
[0025] Exemplarily, the first color picking area and the second color picking area have the same size.
[0026] Exemplarily, the shape of the color picker control is circular or square.
[0027] In a possible implementation, in response to a second operation received on the color picker control, the color picker control is displayed at a second position on the first interface, including: receiving a second operation on a fifth position within the color picker control, and the color picker control is displayed at the second position on the first interface; wherein, the color picking center of the color picker control is located at the second position, and the fifth position deviates from the color picking center. In this way, to avoid occlusion, the user can drag any position of the color picker control except the first color picking area to move the color picker control, so as to pick the color at a specified position.
[0028] In a possible implementation, the method further includes: at a seventh time, the electronic device, in response to a fifth operation received, displays ink marks in the second interface, and the color of the ink marks is the second color. In this way, the user can pick the color at any position in the interface through the global color picking solution in the present application. For example, the color picking object can be any point in the video stream or a point on the interface of other applications. The electronic device can attach the color to the paintbrush based on the color picking result. The user can draw or write in the second interface of the first application through the paintbrush tool, and the color of the corresponding ink marks is the color picked through the global color picking.
[0029] In a possible implementation, in response to a first operation received on the second interface, the color picker control is displayed at a first position on the first interface, including: the electronic device calls the stylus tool module to display the color picker control, and subscribes to touch events from the input module through the stylus tool module. In this way, cross-process calls are realized among the modules in the electronic device, and the stylus tool module can subscribe to touch events to obtain the touch events obtained by the input module. And after the stylus tool module subscribes to the touch events, the touch events of the electronic device are locked.
[0030] In a possible implementation, in response to a second operation received on the color picker control, the color picker control is displayed at a second position on the first interface, including: the electronic device triggers the global writing module through the stylus tool module to obtain a first bitmap corresponding to a screenshot of the first interface. The electronic device outputs, through the stylus tool module, a touch event obtained by the input module to the global writing module, and obtains a regional color value obtained by the global writing module based on the touch event and the first bitmap, where the regional color value includes the color of a first pixel corresponding to the second position in the first interface, and the colors corresponding to at least one pixel around the first pixel. The electronic device updates the color displayed in the color picker control through the stylus tool, and the regional color value is displayed in the color picker control. In this way, the stylus tool performs cross-process interaction with the global writing module, that is, cross-module interaction, so as to realize global color picking of the screen display interface.
[0031] In a possible implementation, in response to a third operation received, the color picker control is not displayed, including: the stylus tool module cancels subscribing to the touch event. In this way, the stylus tool module cancels subscribing to the touch event, so that the touch event of the electronic device can act on other applications.
[0032] In a second aspect, the present application provides an electronic device. The electronic device includes: one or more processors, a memory; and one or more computer programs, where one or more computer programs are stored on the memory, and when the computer programs are executed by one or more processors, the electronic device is caused to perform the following steps: at a first time, display a first interface, the first interface includes a second interface of a first application and a third interface of a second application, the second interface is part of the first interface, the second interface includes a first icon, and the color of the first icon is a first color; at a second time, in response to a first operation received on the second interface, the color picker control is displayed at a first position on the first interface; in response to a second operation received on the color picker control, the color picker control is displayed at a second position on the first interface, the second position is outside the display area range of the second interface, and a second color is displayed in the color picker control, the second color is the color of the pixel corresponding to the second position in the first interface; at a third time, in response to a third operation received, the color picker control is not displayed, and the color of the first icon is changed to the second color.
[0033] In a possible implementation, when the computer program is executed by one or more processors, the electronic device is caused to perform the following steps: At a fourth time, in response to a first operation on a second interface, a color picker control is displayed at a third position on a first interface; in response to a press operation on a second icon in the first interface, the color picker control is displayed at a fourth position on the first interface, and a third color is displayed in the color picker, where the third color is the color of the pixel corresponding to the fourth position in the first interface; at a fifth time, in response to a fourth operation received, the color picker control is not displayed, and the color of the first icon is changed to the third color.
[0034] In a possible implementation, when the computer program is executed by one or more processors, the electronic device is caused to perform the following steps: At a sixth time, in response to a click operation on a second icon, a fourth interface is displayed, where the fourth interface includes the second interface and does not include the color picker control.
[0035] In a possible implementation, the second application is a video application, the third interface is a video playback interface, and the video playback interface includes a video playback window in which a video image is played; when the computer program is executed by one or more processors, the electronic device is caused to perform the following steps: In response to a second operation on the color picker control, the color picker control is displayed at a second position on the first interface, where the second position is within the video playback window, and the color displayed by the color picker control is the color of the pixel corresponding to the second position within the video playback interface; the color picker control remains at the second position, and the color displayed by the color picker control changes as the color of the pixel corresponding to the second position in the played video image changes.
[0036] In a possible implementation, the second application is a camera application, the third interface is a camera preview interface, and the camera preview interface displays a preview image captured by a camera; when the computer program is executed by one or more processors, the electronic device is caused to perform the following steps: In response to a second operation on the color picker control, the color picker control is displayed at a second position on the first interface, where the second position is within the camera preview interface, and the color displayed by the color picker control is the color of the pixel corresponding to the second position within the camera preview interface; the color picker control remains at the second position, and the color displayed by the color picker control changes as the color of the pixel corresponding to the second position in the preview image changes.
[0037] In a possible implementation, the color picker control includes an inner ring area and an outer ring area. The inner ring area includes a first color picking area and at least one second color picking area, and the outer ring area includes a first half ring and a second half ring. When the color picker control is displayed at a second position on the first interface, the first color picking area displays a second color, at least one second color picking area displays the color corresponding to at least one pixel around the second position, the first half ring displays the second color, and the second half ring displays a preset color.
[0038] In a possible implementation, when the computer program is executed by one or more processors, the electronic device is caused to perform the following steps: receiving a second operation on a fifth position within the color picker control, the color picker control being displayed at a second position on the first interface; wherein, the color picking center of the color picker control is located at the second position, and the fifth position deviates from the color picking center.
[0039] In a possible implementation, when the computer program is executed by one or more processors, the electronic device is caused to perform the following steps: at a seventh time, in response to a received fifth operation, displaying ink marks in the second interface, the color of the ink marks being the second color.
[0040] In a possible implementation, when the computer program is executed by one or more processors, the electronic device is caused to perform the following steps: the electronic device calls a stylus tool module to display the color picker control, and subscribes to touch events from the input module through the stylus tool module.
[0041] In a possible implementation, when the computer program is executed by one or more processors, the electronic device is caused to perform the following steps: the electronic device triggers the global writing module through the stylus tool module to obtain a first bitmap corresponding to a screenshot of the first interface. The electronic device outputs the touch events obtained by the input module to the global writing module through the stylus tool module, and obtains the area color value obtained by the global writing module based on the touch events and the first bitmap, wherein the area color value includes the color of a first pixel corresponding to the second position in the first interface and the colors corresponding to at least one pixel around the first pixel.
[0042] In a possible implementation, when the computer program is executed by one or more processors, the electronic device is caused to perform the following steps: the stylus tool module cancels subscribing to touch events. In this way, the stylus tool module cancels subscribing to touch events so that the touch events of the electronic device can act on other applications.
[0043] The second aspect and any implementation manner of the second aspect respectively correspond to the first aspect and any implementation manner of the first aspect. For the technical effects corresponding to the second aspect and any implementation manner of the second aspect, reference may be made to the technical effects corresponding to the first aspect and any implementation manner of the first aspect above, which will not be elaborated herein.
[0044] In a third aspect, the present application provides a computer-readable medium for storing a computer program, where the computer program includes instructions for executing the method in the first aspect or any possible implementation manner of the first aspect.
[0045] In a fourth aspect, the present application provides a computer program, where the computer program includes instructions for executing the method in the first aspect or any possible implementation manner of the first aspect.
[0046] In a fifth aspect, the present application provides a chip, which includes a processing circuit and transceiver pins. Among them, the transceiver pins and the processing circuit communicate with each other through an internal connection path, and the processing circuit executes the method in the first aspect or any possible implementation manner of the first aspect to control the receive pin to receive a signal and control the transmit pin to transmit a signal. Description of the Drawings
[0047] Figure 1 Schematic diagram of the hardware structure of an exemplary electronic device;
[0048] Figure 2 Schematic diagram of the hardware structure of an exemplary electronic device;
[0049] Figure 3 Schematic diagram of an exemplary global color picking process;
[0050] Figures 4a - 4c Schematic diagram of an exemplary user interface;
[0051] Figures 5a - 5b Schematic diagram of an exemplary user interface;
[0052] Figure 6 Schematic diagram of an exemplary screenshot;
[0053] Figures 7a - 7b Schematic diagram of an exemplary user interface;
[0054] Figures 8a - 8b Schematic diagram of an exemplary position coordinate;
[0055] Figure 9 Schematic diagram of an exemplary color picking;
[0056] Figure 10 Schematic diagram of an exemplary color picker update;
[0057] Figure 11 Schematic diagram of a color picker shown by way of example;
[0058] Figures 12a - 12b Schematic diagram of a user interface shown by way of example;
[0059] Figure 13 Schematic diagram of a user interface shown by way of example;
[0060] Figure 14 Schematic diagram of a user interface shown by way of example;
[0061] Figures 15a - 15c Schematic diagram of the display of a color palette, a color wheel, and color values shown by way of example;
[0062] Figure 16 Schematic diagram of a user interface shown by way of example;
[0063] Figures 17a - 17d Schematic diagram of a user interface shown by way of example;
[0064] Figures 18a - 18b Schematic diagram of a user interface shown by way of example;
[0065] Figure 19 Schematic diagram of the device structure shown by way of example. Detailed implementation manners
[0066] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application.
[0067] In this article, the term "and / or" is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. These three situations.
[0068] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order of the objects. For example, the first target object and the second target object are used to distinguish different target objects, rather than to describe a specific order of the target objects.
[0069] In the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or more advantageous than other embodiments or design solutions. Exactly speaking, using words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.
[0070] In the description of the embodiments of the present application, unless otherwise specified, "a plurality of" means two or more. For example, a plurality of processing units means two or more processing units; a plurality of systems means two or more systems.
[0071] Figure 1 FIG. shows a schematic structural diagram of the electronic device 100. It should be understood that Figure 1 The illustrated electronic device 100 is only an example of an electronic device, and the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. Figure 1 The various components shown in FIG. may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits. In the embodiments of the present application, the electronic device 100 is taken as an example of a tablet computer for illustration. In other embodiments, the color picking method in the embodiments of the present application can also be applied to electronic devices with a display screen such as mobile phones, wearable devices, vehicle-mounted devices, smart home devices, televisions, etc., and the present application does not make any limitations.
[0072] The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0073] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or may be integrated in one or more processors.
[0074] Among them, the controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
[0075] A memory can also be set in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can save the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the said memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0076] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0077] The charging management module 140 is used to receive a charging input from a charger. Among them, the charger can be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 can receive the charging input of the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 can receive the wireless charging input through the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device through the power management module 141.
[0078] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives the inputs from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, the wireless communication module 160, etc. The power management module 141 can also be used to monitor parameters such as the battery capacity, the number of battery cycles, and the battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be disposed in the processor 110. In some other embodiments, the power management module 141 and the charging management module 140 can also be disposed in the same device.
[0079] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.
[0080] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as the diversity antenna of the wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0081] The mobile communication module 150 can provide solutions for wireless communications such as 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 can include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves through the antenna 1 and radiate it out. In some embodiments, at least some functional modules of the mobile communication module 150 can be disposed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 can be disposed in the same device.
[0082] The modulation and demodulation processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Subsequently, the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays an image or video through the display screen 194. In some embodiments, the modulation and demodulation processor may be an independent device. In other embodiments, the modulation and demodulation processor may be independent of the processor 110 and be disposed in the same device as the mobile communication module 150 or other functional modules.
[0083] The wireless communication module 160 may provide solutions for wireless communications applied to the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive the signals to be transmitted from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 for radiation.
[0084] The electronic device 100 realizes the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to execute mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change the display information.
[0085] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0086] The electronic device 100 can implement the shooting function through the ISP, camera 193, video codec, GPU, display screen 194, application processor, etc.
[0087] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and the light passes through the lens and is transmitted to the camera sensor. The optical signal is converted into an electrical signal, and the camera sensor transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also optimize the noise, brightness, and skin color of the image through algorithms. The ISP can also optimize parameters such as the exposure and color temperature of the shooting scene. In some embodiments, the ISP can be provided in the camera 193.
[0088] The camera 193 is used to capture still images or videos. An object generates an optical image through the lens and projects it onto the sensor. The sensor can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The sensor converts the optical signal into an electrical signal and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in standard RGB, YUV, etc. formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0089] In the embodiments of the present application, the relevant components can call the camera to obtain the image collected by the camera and pick colors in the image collected by the camera to obtain the real color in reality.
[0090] The internal memory 121 can be used to store computer-executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, image playback function, etc.). The data storage area can store the data created during the use of the electronic device 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 can include a high-speed random access memory and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0091] The electronic device 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor, etc. For example, music playback, recording, etc.
[0092] The sensor module includes, but is not limited to: pressure sensors, gyroscope sensors, touch sensors, etc. The sensor involved in this application is mainly the touch sensor.
[0093] The touch sensor is also called a "touch panel". The touch sensor can be disposed on the display screen 194. The touch sensor and the display screen 194 form a touch screen, also called a touch panel (Touch Panel, abbreviated as: TP). The touch sensor is used to detect a touch operation acting on or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some other embodiments, the touch sensor can also be disposed on the surface of the electronic device 100, at a different position from the display screen 194.
[0094] The touch screen integrated circuit (Touch Panel Integrated Circuit, abbreviated as: TP IC) and the mobile phone application processor (Application Processor, abbreviated as: AP) are generally connected through an inter-integrated circuit bus (Inter-Integrated Circuit, abbreviated as: I2C) or a serial peripheral interface (Serial Peripheral Interface, abbreviated as: SPI) bus. When the user's finger touches the touch screen, the touch sensor detects the change in capacitance value caused by the finger on the touch screen, and the TP IC can obtain the position (i.e., coordinates) of the touch point. The AP obtains the position of the touch point in plain text through the I2C or SPI bus, thereby completing the process of touch screen reporting (touch report).
[0095] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiment of this application, the Android system with a layered architecture is taken as an example to exemplarily illustrate the software structure of the electronic device 100.
[0096] Figure 2 It is the software structure block diagram of the electronic device 100 in the embodiment of this application.
[0097] The layered architecture of the electronic device 100 divides software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system includes, from top to bottom, an application layer, an application framework layer, a kernel layer, etc. In other embodiments, more or fewer layers may be included, which is not limited in this application.
[0098] The application layer may include a series of application packages.
[0099] Such as Figure 2 shown, the application packages may include applications such as drawing (which may also be called painting), memo, document, PenKit (handwriting tool), Globalwrite (global writing), etc. Among them, PenKit and Globalwrite may also be called modules or components. In some instances, PenKit and Globalwrite may be located in the application framework layer and provide interfaces for serving upper-layer applications to respond to calls from upper-layer applications, which is not limited in this application.
[0100] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.
[0101] Such as Figure 2 shown, the application framework layer may include a window manager, a content provider, a resource manager, a ScreenService (screen service), an Input (input) module, and a view system, etc.
[0102] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0103] The content provider is used to store and obtain data and make this data accessible to applications. The data may include videos, images, audio, dialed and answered calls, browsing history and bookmarks, phone books, etc.
[0104] The view system includes visible controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon may include a view for displaying text and a view for displaying pictures.
[0105] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc.
[0106] The ScreenService is used to provide services such as screen capture (abbreviated as screenshot) in the embodiments of the present application. Relevant modules or services can obtain the screen capture by calling the ScreenService. Optionally, the screen capture can include a full-screen capture or a partial screen capture. In the embodiments of the present application, the screen capture involved refers to a full-screen capture, that is, the full-screen capture includes, but is not limited to, all images (including pictures, texts, controls, etc.) displayed on the screen, etc.
[0107] The Input module can be used to obtain touch events of the touch sensor from the sensor driver. Among them, the touch events include, but are not limited to: touch positions (which can also be called touch coordinates). Among them, the touch position is usually the position coordinate corresponding in the coordinate system established with the upper left corner of the screen as the origin. The data interaction process among the touch sensor, the sensor driver, and the Input module can refer to the existing technology, and will not be elaborated in the present application.
[0108] The kernel layer is the layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, a sensor driver, etc.
[0109] It can be understood that Figure 2 The layers in the shown software structure and the components included in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer layers than shown, and each layer may include more or fewer components, which are not limited in the present application.
[0110] Figure 3 For the schematic diagram of the global color picking process shown exemplarily, please refer to Figure 3 , which specifically includes, but is not limited to, the following steps:
[0111] S301, the user triggers color picking.
[0112] Exemplarily, during the process of using an application, the user can operate on the option corresponding to the color picking function provided by the application to instruct the application to start executing the color picking process. Figures 4a - 4b For the schematic diagram of the user interface where the user triggers the color picking function shown exemplarily, please refer to Figure 4a , exemplarily, taking the example of the user triggering the color picking function in the memo application, the user can start the memo application by clicking the memo application icon on the desktop or through the side bar, etc. The tablet responds to the received user operation and displays the memo application interface in the first interface 400.
[0113] The memo application interface includes, but is not limited to: an input area 410 (which can also be called a display area or an input window, etc., not limited in the present application) and an input tool box 420, etc.
[0114] The input area 410 includes options or controls such as, but not limited to, a title, a return option, a confirmation option, etc. The user can draw an image or type text in the input area 410 by means of finger touch, mouse control, a stylus, etc. Figure 4a The input content (i.e., the image) in the input area 410 in
[0115] The input toolbox 420 includes input tools and function controls (which can also be referred to as function options or function icons, etc., and this application does not make a limitation). Among them, the input tools include, but are not limited to, some different types of brushes (or painting brushes) or coloring tools, etc. For example, it includes a crayon brush 421 (which can also be referred to as a crayon coloring tool or simply called a crayon, and this application does not make a limitation), a pen, a pencil, a marker, an eraser, etc.
[0116] Exemplarily, the function controls include, but are not limited to: a typing option 423, a color option (which can also be referred to as a color picking option or a coloring option, etc., and this application does not make a limitation), a color picking option 422 (which can also be referred to as a color palette option, and this application does not make a limitation), and a more option, etc.
[0117] The typing option 423 is used to trigger the display of a keyboard. When the user clicks the typing option 423, the tablet (specifically, the memo application) responds to the received user operation and displays the keyboard.
[0118] The color option corresponds to colors with different color values, such as red, green, white, black, etc. After the user selects a corresponding brush, such as the crayon 421, the user can click the corresponding color option to select the corresponding color. For example, if the user selects and clicks the color option corresponding to green, the tip of the crayon 421 can display the corresponding color (i.e., green). When the user operates (such as swiping) on the input area 410 with a stylus (or finger), the tablet responds to the received user operation and displays corresponding ink marks on the input area 410, and the color of the ink marks is green.
[0119] The color picking option 422 is used to trigger the display of a color picking box. When the colors provided by the above-mentioned color option do not meet the user's expectations, that is, when the user also needs more color selections, the user can click the color picking option 422 to obtain more color options, so as to select the required color.
[0120] Still referring to Figure 4a , the user clicks the color picking option 422 to obtain more color picking selections. Please refer to Figure 4b , the tablet responds to the received user operation of clicking the color picking option 422 and displays a color picking box 430 in the memo application interface of the second interface 401. The color picking box 430 includes, but is not limited to: a color picker option 431, a color swatch option 432, a color wheel option 433, a color value option 434.
[0121] The color picker option 431 is used to trigger the display of the color picker. When the user clicks on the color picker option 431, the tablet responds to the received user operation and displays the color picker.
[0122] The color palette option 432 is used to trigger the display of the color palette. In the embodiments of the present application, when the user clicks on the color picker option 422 and the tablet responds to the received user operation to display the color picker frame 430, the color palette and other controls corresponding to the color palette option 432 are default displayed within the color picker frame 430. The option content of the color wheel and color values will be specifically described in the following embodiments. Only the content corresponding to the color palette in Figure 4b will be described below.
[0123] Exemplarily, the color picker frame 430 includes a color palette 435, a color selection box 436, a color bar 437, and color options 438.
[0124] Among them, the color palette 435 includes a plurality of squares (which may also be other graphics, not limited in the present application). Each row of squares (or each column of squares) belongs to the same color system, and the color values of the squares in each row or column gradually decrease or increase, not limited in the present application. That is to say, the colors (i.e., color values) corresponding to each square are different.
[0125] The color selection box 436 is used to select the corresponding color in the color palette 435. The user can move the color selection box 436 to select the color in the color palette 435. Exemplarily, after the user selects the corresponding color through the color selection box 436, the tablet responds to the received user operation and fills the selected color in the color picker option 422. For example, the inner ring in the color picker option 422 is filled with yellow. Correspondingly, the color of the ink input by the user with a stylus or finger is also yellow.
[0126] The color bar 437 is used to adjust the transparency. That is, after the user selects the corresponding color, the user can further adjust the transparency of the color through the color bar 437. The larger the value, the higher the transparency; the smaller the value, the lower the transparency.
[0127] The color options 438 include, but are not limited to, options corresponding to different colors, such as a green color option, a red color option, etc. The user can click on the green color option to cause the tablet to move the color selection box 436 to the position corresponding to the green color system in the color palette option 435 based on the user operation.
[0128] Still referring to Figure 4b , in this example, the user can click on the color picker option 431 to trigger the display of the color picker, so that the user can pick colors from the current display interface (such as the second interface 401) through the color picker.
[0129] It should be noted that in this example, only the memo application is used for illustration. In other embodiments, the solutions in the embodiments of the present application can also be applied to native applications or third-party applications such as drawing applications, note applications, and document applications, and the present application does not make any limitations.
[0130] Furthermore, it should be noted that in this example, only the operation method of the user touching (such as clicking) with a finger is used to trigger the corresponding function for illustration. In other embodiments, the user can also perform corresponding operations through a mouse, keyboard, stylus, etc., and the present application does not make any limitations.
[0131] S302, the memo application sends a showColorPicker (display color picker) message to PenKit.
[0132] Exemplarily, when the memo application receives the operation of the user clicking on the color picker option 431, it determines that the global color picking function needs to be called. The memo application sends a showColorPicker message to PenKit to indicate the display of the color picker. Specifically, PenKit provides a showColorPicker interface function, and the memo application calls the showColorPicker interface function to trigger PenKit to display the color picker.
[0133] S303, PenKit executes the startColorPickerHandler (trigger color picker processing) method function.
[0134] Exemplarily, in response to the received showClorPicker message, PenKit determines that the color picker needs to be displayed, which can be understood as starting the global color picking function (or global color picking service). Correspondingly, PenKit runs the internal startColorPickerHandler command (method function) of PenKit to perform self-start, that is, to trigger the global color picking function (or global color picking service). Among them, the startColorPickerHandler method function encapsulates multiple sub-functions (or sub-commands), and PenKit realizes self-start by executing multiple sub-functions in the startColorPickerHandler method function. The following method functions are similar and will not be repeated hereinafter.
[0135] S304, PenKit displays the color picker.
[0136] Exemplarily, after PenKit completes self-start execution (that is, runs the startColorPickerHandler method function), it displays the color picker on the screen to pick colors from the pixels on the screen through the color picker. Figure 4cFor an exemplary schematic diagram of the user interface, please refer to Figure 4c After the user clicks on the color picker option 431, the tablet responds to the received user operation, cancels the display of the color picker frame 430, and displays the color picker 440 in the third interface 402.
[0137] In the embodiment of the present application, after the application is launched and the global color picker service is first executed, the color picker 440 is displayed at the initial position, for example, the center position of the third interface 402. Specifically, PenKit can establish a coordinate system with the upper left corner of the third interface 402 of the tablet as the origin, obtain the center position coordinates of the third interface 402, and PenKit displays the color picker 440 at this position coordinate, where the center of the color picker 440 is located at the center position coordinate. The description of the position coordinate can refer to the relevant description in the following text Figure 8a , which will not be elaborated here for the time being. Optionally, the application launch includes but is not limited to: the first launch of the application after the tablet is powered on for the first time or each restart; or, after the application is closed and then launched again. For example, after the user closes the memo application (i.e., ends the memo application process) and then launches the memo application again and triggers the global color picker function according to the operation method described above (i.e., Figures 4a - 4b ), the tablet responds to the received user operation and displays the color picker 440 at the initial position (i.e., the center position of the third interface 402).
[0138] Optionally, when the user triggers the global color picker function again within this application (i.e., the application is not closed), the tablet responds to the received user operation and displays the color picker 440 at the position where the color picker 440 stopped last time. Specific examples will be described in detail in the following embodiments.
[0139] In a possible implementation manner, after the application is called to the foreground each time (i.e., when the application is not closed and switches from the background to the foreground), when the global color picker service is first executed, the color picker 440 is displayed at the initial position, for example, the center position of the third interface 402. For example, after the user triggers the color picker 440 in the memo application and selects a color, the user calls another application (such as a video application) to the foreground and switches the memo application to the background (i.e., only the video application is currently in the foreground). When the user switches the memo application to the foreground again and triggers the global color picker function, the color picker 440 is displayed at the initial position (i.e., the center position of the third interface 402).
[0140] In another possible implementation, after the application is called to the foreground each time (that is, when the application is not closed and the application switches from the background to the foreground), when the user triggers the global color picker function again within this application (that is, the application has triggered the global color picker function at least once before switching to the background), the tablet responds to the received user operation and displays the color picker 440 at the position where the color picker 440 stopped last time.
[0141] Still referring to Figure 4c , the color picker 440 is displayed on the top layer of the third interface 402, which is located above all images or layers. The color picker 440 includes an outer ring 441 (which can also be called an outer circle) and an inner ring 442 (which can also be called an inner circle). Among them, the radius of the inner ring 442 is smaller than the radius of the outer ring 441. Among them, the outer ring includes an upper half ring 4411 and a lower half ring 4412. Exemplarily, the upper half ring 4411 can be understood as the upper half part between the outer ring 441 and the inner ring 442, and the lower half ring 4412 can be understood as the lower half part between the outer ring 441 and the inner ring 442.
[0142] In the embodiment of the present application, the upper half ring 4411 and the lower half ring 4412 are of equal size and are divided by the diameter in the horizontal direction of the color picker device 440. Among them, the horizontal direction is optionally parallel to the X-axis (that is, the long side of the tablet). In other embodiments, the upper half ring 4411 and the lower half ring 4412 may not be of equal size, and / or the upper half ring 4411 and the lower half ring 4412 may be divided by any other diameter of the color picker 440 (for example, it may be the diameter in the vertical direction, and the vertical direction is parallel to the Y-axis (that is, the wide side of the tablet)), which is not limited in this application.
[0143] In the embodiment of the present application, the upper half ring 4411 is used to display the color currently picked by the color picker center point 443. Correspondingly, the color displayed in the upper half ring 4411 changes with the color picked by the color picker center point 443. Optionally, the color in the upper half ring 4411 fills the upper half ring 4411. Specific examples will be described in detail below.
[0144] Exemplarily, the lower half ring 4412 is used to display the color picked by the color picker last time. Among them, the color picked last time refers to the color picked by the color picker last time, that is, the color picked by the color picker most recently. It can also be understood as the color picked by the color picker center point 443 when the user lifted their hand last time (specific examples will be described below). Specific examples will be described in detail below.
[0145] In a possible implementation, if the memo application is started and the global color picker function is triggered for the first time (it should be noted that the "triggering the global color picker function" described in the embodiment of the present application can be understood as triggering the execution of Figure 3In the process in [ID], the lower half ring 4412 can display the default color (for example, white), or the color corresponding to the current paintbrush, or the same color as the upper half ring 4411. That is to say, the last color obtained by the lower half ring refers to the one triggered during the process from the start to the shutdown of the same application this time. Optionally, if the application is switched to the background after startup and then switched back to the foreground, the tablet responds to the received user operation to display the color picker 440, and the lower half ring 4412 of the color picker 440 displays the color picked by the color picker the last (i.e., the most recent) time before the application was switched to the background.
[0146] In another possible implementation, after the device (such as a tablet) is initially started or restarted, when the color picker 440 is first displayed, its lower half ring 4412 displays the default color, or the color corresponding to the current paintbrush, or the same color as the upper half ring 4411. During subsequent use, the lower half ring 4412 of the color picker 440 always displays the last color obtained. The last color obtained may be obtained in other applications or in this application, and this application does not make a limitation.
[0147] In yet another possible implementation, the color displayed by the lower half ring 4412 of the color picker 440 can be application-specific. That is, when the lower half ring 4412 is displayed within the application, except for displaying the default color when first called, each time the color picker 440 is called within the same application, it displays the color picked during the last call within this application. For example, if the color picked by the memo application this time is black, then after the memo application is closed and restarted, the tablet responds to the received user operation, calls the global color picker function and displays the color picker 440, and the color displayed by the lower half ring of the color picker 440 is black. The user closes the memo application and starts the painting application and calls the global color picker function in the painting application. The tablet responds to the received user operation, calls the global color picker function and displays the color picker 440. In this application, the lower half ring of the color picker 440 may be green, which is the color picked by the global color picker function the last (i.e., the most recent) time in the painting application.
[0148] In this example, taking the last color obtained by the color picker as black as an example, correspondingly, the lower half ring 4412 of the color picker 440 is filled with black.
[0149] In the embodiments of the present application, as described above, the filling color of the upper half-ring 4411 is the same as the color picked by the center point of the color picker 440. However, in S304, since the color picker 440 has not started picking colors yet (which can also be understood as not obtaining the color of the specified pixel point), correspondingly, in this example, the filling color of the upper half-ring 4411 is the default color, such as white (it can also be other colors, which are not limited in the present application). And, the color in the inner ring 442 of the color picker 440 is also the default color (such as white). After executing S312, the colors in the upper half-ring 4411 and the inner ring 442 are updated synchronously again.
[0150] Still referring to Figure 4c , at least one square is included in the inner ring 442, and in other embodiments, it can also be other shapes, which are not limited in the present application. In the embodiments of the present application, each square in the inner ring 442 corresponds to a pixel point on the screen, and the color picked by the square (which can also be understood as the filling color) is the color of the corresponding pixel point. It can be understood that since the pixel point is a relatively small unit, at least one square in the inner ring 442 magnifies the color of the corresponding pixel, so that the user can intuitively obtain the color picking result at the current position (i.e., the color displayed by the center point 443) and the colors corresponding to other pixel points around the current position.
[0151] Optionally, the adjacent squares in the squares in the inner ring 442 can be tightly connected or have gaps, which are not limited in the present application.
[0152] Figure 5a For the schematic diagram of the user interface shown exemplarily, please refer to Figure 5a , in the embodiments of the present application, if the user needs to perform global color picking, that is, pick colors for objects outside this application (such as a memo application), the user can operate on the memo application to shrink and display the memo application. For example, in the embodiments of the present application, take the form of a floating window as an example. The tablet responds to the received user operation and displays a window 510 in the fourth interface 500, and the current interface of the memo application is displayed in the window 510. And, the desktop 520 is displayed in the fourth interface 500 (the size of the desktop 520 is equal to the size of the fourth interface 500). The user can operate on the memo application in the window 510 to trigger the global color picking function, and the specific triggering method can refer to Figures 4a - 4b 's description, which will not be elaborated here. Correspondingly, the tablet responds to the received user operation and displays a color picker 530 at the center position of the fourth interface 500. The specific description of the color picker 530 can refer to Figure 4c 's relevant description, which will not be elaborated here.
[0153] It should be noted that, Figure 5aThe size and position of the window 510 in [description] are only illustrative examples and can be set according to actual needs, which are not limited in this application. Optionally, the user can manually adjust the position and size of the window 510.
[0154] Furthermore, it should be noted that Figure 5a only the desktop 520 displayed in the fourth interface 500 is taken as an example for illustration. In other embodiments, any object that the user needs to pick a color from can be displayed in the fourth interface 500. The user can select the object to be picked a color from at any time before clicking the color picker option. For example, after the user switches the memo application (the memo application can be full-screen displayed, such as shown in [description]) to the background, corresponding operations can be performed in the fourth interface 500 (such as clicking the icon of the object to be picked a color from) to call the object to be picked a color from to the foreground, that is, it is displayed in the fourth interface 500. Then, the user can operate the memo application to instruct the memo application to be displayed in the window 510. The specific operation steps can be set according to actual needs, which are not limited in this application. Another example is that after the user sets the memo application to be displayed in the window 510, both the current memo application and the desktop are foreground applications. The user can click the application icon on the desktop to call the object to be picked a color from to the foreground. For example, the user can click the gallery application icon to open the gallery application. During the user's operation, the window 510 remains in its current position and the displayed content remains unchanged. The corresponding interface of the gallery application is displayed in the fourth interface 500. The gallery application interface can include but is not limited to at least one picture, and then the gallery application interface is the object to be picked a color from. Among them, the window 510 is always located above the fourth interface 500, for example, it is displayed above the gallery application interface. Another example is that the user can operate the tablet to display the object to be picked a color from in the fourth interface 500 and display the memo application in the form of a floating window in the fourth interface 500 through a sidebar or other means. That is to say, there are various ways for the tablet to display the interface state shown in [description], which can be operated according to actual needs. All are illustrative examples in the embodiments of this application, and this application is not limited. Figure 4a In the example shown in [description], the initial position of the color picker 530 is located at the center of the fourth interface 500. This position is outside the memo application (i.e., the window 510) and is no longer restricted within the memo application. That is to say, the color picker 530 in the embodiments of this application can pick a color from an object outside the memo application. Figure 5a There are various ways to display the interface state shown in [description], which can be operated according to actual needs. All are illustrative examples in the embodiments of this application, and this application is not limited.
[0155] Still referring to Figure 5a In this example, the initial position of the color picker 530 is located at the center of the fourth interface 500. This position is outside the memo application (i.e., the window 510) and is no longer restricted within the memo application. That is to say, the color picker 530 in the embodiments of this application can pick a color from an object outside the memo application.
[0156] Further, it should be noted that in this embodiment, only the desktop 520 is taken as an example of the object to be color-picked. In other embodiments, the object to be color-picked may also be a preview image captured by a camera (i.e., a preview image stream), a video image (i.e., a video stream), a picture (such as a picture in a gallery), an application interface (which can be the interface of any application, such as a calculator application interface, a music application interface, etc., and the present application does not make any limitations), etc., and the present application does not make any limitations.
[0157] Further, it should be noted that the interface of the memo application can be understood as a part of the object to be color-picked. That is to say, global color-picking is to pick colors within the screen, that is, the object to be color-picked includes the interface of the memo application. However, the object to be color-picked described in the embodiments of the present application can be understood as the object that the user actually wants to pick colors from, which is the desktop 520. That is, the user expects to pick colors on the desktop 520 and use the obtained colors to color the objects in the memo application.
[0158] Further, it should be noted that in the embodiments of the present application, only the way of displaying the memo application (i.e., the application using the global color-picking function) in the floating window (i.e., window 510) is taken as an example for illustration. In other embodiments, the memo application and the object to be color-picked may also be displayed in a split-screen manner or other ways, and the present application does not make any limitations.
[0159] S305, PenKit registers a touch listener with the Input module.
[0160] Exemplarily, PentKit sends a touch listener request (which can also be called a touch event listener request, and the present application does not make any limitations) to the Input module to request listening for touch events. It can be understood that PenKit requests the Input module to feedback the touch event to PenKit after detecting the touch event.
[0161] In the embodiments of the present application, as described above, the Input module can be used to obtain the corresponding touch event based on the detection result of the touch sensor. The Input module can report the obtained touch event to the specified module or application that is registered for listening with it.
[0162] Exemplarily, after Penkit registers a touch listener with the Input module, the Input module responds to the received touch listener request and feedbacks the obtained touch event to Penkit.
[0163] Exemplarily, the touch events feedback by the Input to the PenKet include but are not limited to: the touch event type and the touch event occurrence location (which can also be called the touch event occurrence coordinates, or simply called the touch location or touch coordinates, etc., and the present application does not make any limitations). The description of the touch location can refer to the above, and will not be elaborated here.
[0164] Optionally, the types of touch events include, but are not limited to: Down type, Move type, up type and other event types. For different event types, PenKit will perform different operations, and the specific process will be described one by one below.
[0165] In the embodiment of the present application, after PenKit registers a listener with the Input module, the touch events obtained by the Input module are no longer fed back to other upper-layer applications or modules. It can be understood that after PenKit registers the touch listener, the touch events of the Input module are locked (or blocked) and will no longer be called by other upper-layer applications or modules. That is to say, from the perspective of the user interface, when the tablet executes the color picking process, that is, after the tablet displays the color picker 440 and before the color picking is completed, the touch events on the screen only act on the color picker, and other touch events are invalid, that is, the touch events are locked by PenKit and are only used for the global color picking process. For example, as Figure 5b shown in (1) below, after the tablet displays the color picker, the user touches the position where the calendar icon is located. As Figure 5b shown in (2) below, in response to the received user operation, the tablet displays the color picker 530 at the position where the user touches (i.e., presses). Optionally, the color picker 530 moves from Figure 5b the position shown in (1) below to Figure 5b the position shown in (2) below in a way that it disappears and then reappears, that is, it cancels the display at the position in Figure 5b (1) below and appears at the position in Figure 5b (2) below (i.e., the position where the user touches). The color picker 530 will pick the color of the current position (i.e., the center of the color picker 530 and the pixels nearby). For the specific color picking method, please refer to the following text. Optionally, to avoid occlusion, the center of the color picker 530 does not coincide with the user's touch position, that is, any point (preferably a point in the lower half) of the color picker 530 other than the center of the color picker 530 coincides with the user's touch position.
[0166] Exemplarily, after the user raises the hand and the color picker 530 picks the color and cancels the display (for the specific description, please refer to the above text), or before the color picker 530 is displayed, that is, when PenKit does not lock the touch events, taking the interface displayed on the tablet as Figure 6 shown below as an example, if the user clicks on the calendar option, the tablet will display the calendar application interface in the first display interface 500 in response to the received user operation. Optionally, the window 510 is still displayed above the calendar application interface. It can be understood that the current desktop 520 will be replaced by the calendar application interface.
[0167] It should be noted that after PenKit registers the touch listener, only the touch event is locked, and other events still execute normally. For example, when the user clicks the power button, the tablet responds to the received user operation and turns off the display interface (i.e., the screen goes black). Another example is that when the user swipes down from the upper edge of the screen to call the drop-down menu, the tablet responds to the received user operation and displays the drop-down menu. Another example is that when the screen slides from the side edge of the screen to the center of the screen to call the sidebar, the tablet responds to the received user operation and displays the sidebar. Another example is that when the user uses a knuckle to tap the screen to indicate a screenshot, the tablet responds to the received user operation and takes a screenshot of the screen. That is to say, after PenKit registers the touch listener, other events or gestures except the touch event, such as edge gestures, etc. will not be blocked. Exemplarily, during the process of the tablet responding to the received operation and performing operations such as displaying the menu bar or taking a screenshot, the color picker 440 still remains displayed at the current position.
[0168] Optionally, during the process of locking the touch event, other input methods can still be carried out normally. For example, the user can input through a keyboard or voice input, etc., which is not limited in this application.
[0169] It should be noted that after the user clicks the color picker option 431, the time interval until the user touches the color picker option 431 (as shown in Figure 8a and the specific description will be given below) to perform global color picking may be at least 1 s, while the time for the tablet to continue executing S306~S309 is approximately 100 ms. That is to say, after PenKit requests the touch listener, until the touch event (i.e., the user touches the color picker option 431) is received, PenKit has completed the execution of S306~S309.
[0170] S306, Penkit binds to Globalwrite.
[0171] Exemplarily, PenKit sends a bindService (bind service) message to Globalwrite to request service binding with Globalwrite. Specifically, Globalwrite provides a bindService interface function for service binding with other services or modules. PenKit calls the bindService interface function of Globalwrite to perform service binding with Globalwrite.
[0172] In the embodiments of the present application, the binding service can also be understood as establishing a data channel with Globalwrite, so that data interaction can be carried out between two modules (or components) to achieve cross-process data transmission. The binding service can also be understood as PenKit requesting Globalwrite to provide corresponding services for it (i.e., Penkit).
[0173] S307, Globalwrite starts ScreenShotService (Screen Screenshot Service, abbreviated as screenshot service).
[0174] Exemplarily, in response to the call of PenKit, that is, in response to the received bindService request, Globalwrite starts ScreenShotService. Specifically, Globalwrite runs the relevant programs (or commands) of ScreenShotService to trigger ScreenShotService, so as to provide a screenshot service for Globalwrite.
[0175] In the embodiments of the present application, Globalwrite will only start ScreenShotService after receiving a trigger instruction (such as a bindService request), and feedback the screenshot result to Penkit. Before being triggered, Globalwrite does not start ScreenShotService to avoid increasing system power consumption.
[0176] S308, Globalwrite sends a getScreenShot (Get Screen Shot) message to ScreenService (Screen Service).
[0177] Exemplarily, after Globalwrite starts ScreenShotService, Globalwrite sends a getScreenShot request to ScreenService to request to obtain a screen shot. Specifically, Globalwrite calls the getScreenShot interface function of ScreenService to trigger ScreenService to obtain a screen shot and feedback it to Globalwrite.
[0178] As described above, ScreenService can be used for screen capture. In the embodiments of the present application, screen capture refers to intercepting the image stream within the screen, and the intercepted image includes but is not limited to the image and options included at the current moment (i.e., the screenshot moment) in the image stream. It should be noted that the color picker 530 is not included in the intercepted controls.
[0179] Exemplarily, in response to the getScreenShot request of Globalwrite, ScreenService takes a screenshot of the screen and feeds back the image (i.e., the screenshot) to Globalwrite.
[0180] For example, still taking the Figure 5a user interface shown in as an example, after PenKit displays the color picker 530 in the fourth interface 500, it starts to execute S305 - S308. Globalwrite sends a getScreenShot request to ScreenService. In response to the received getScreenShot request, ScreenService takes a screenshot of the image stream (i.e., as shown in Figure 5a ) displayed in the current screen (i.e., the fourth interface 500). Figure 6 For an exemplary schematic diagram of the screenshot, please refer to Figure 6 . The image 600 includes, but is not limited to, all images and controls in the fourth interface 500 except the color picker 530, such as, for example, but not limited to, the image corresponding to the window 510 and the image corresponding to the desktop, etc. Optionally, the image 600 may also include at least one of the battery icon, network icon, Bluetooth icon, and time (not shown in Figure 5a ) in the fourth interface 500, which is not limited in this application. Among them, the size (i.e., resolution) of the image 600 can be set according to actual needs, which is not limited in this application.
[0181] S309, Globalwrite executes the getColorLocation (obtain color location) method function.
[0182] Exemplarily, after Globalwrite obtains the image (i.e., the screenshot, such as the image 600) fed back by ScreenService, it executes the getColorLocation method function to perform image processing (which can also be called color location processing) on the image 600 to obtain the bitmap (also known as dot matrix diagram) corresponding to the image 600, so as to obtain the color of each pixel point in the image 600. That is, Globalwrite calculates the color value of each pixel point in the image by calling the getColorLocation method function. The specific calculation method can refer to the embodiments of the prior art, which is not limited in this application.
[0183] In the embodiments of the present application, S308 to S309 may be set with an execution period, and the period duration can be set according to actual requirements, which is not limited in the present application. For example, in the embodiments of the present application, the execution period of S308 to S309 can be 200 ms, that is, Globalwrite sends a getScreenShot message (i.e., calls the getScreenShot interface function) to ScreenService every 200 ms to obtain a screen shot, and executes the getColorLocation method function on the obtained screen shot to obtain the corresponding dot matrix diagram.
[0184] Optionally, the execution period of S308, that is, the period duration for Globalwrite to obtain the screen shot, can be the same as the touch sensor acquisition period, which can also be understood as the period for the Input module to report touch events, for example, both are 200 ms, and can be set according to actual requirements, which is not limited in the present application.
[0185] S310, Penkit sends a setOffsetLocation message to Globalwrite.
[0186] Exemplarily, from the user's perspective, as Figure 5a shown, after the tablet responds to the operation of the user clicking the color picker option, the color picker 530 is displayed in the user interface 500. Figure 7a For the schematic diagram of the user interface shown exemplarily, please refer to Figure 7a , after the color picker 530 is displayed on the fourth interface 500, the user can drag the color picker 530 to pick a color at a specified position.
[0187] In the embodiments of the present application, the user can touch any position of the color picker 530 with a finger (it can also be a stylus, mouse, etc., which is not limited in the present application) (specifically, any position within the outer ring 441 shown Figure 4c shown) to drag the color picker 530 to any position. Before the user raises the hand, the color picker 530 continuously picks a color from the current fourth interface 500. In this way, in the embodiments of the present application, the user can click on any position to drag the color picker 530 to pick a color, so that the user can observe the position where the center of the color picker 530 is located and the color picked, thereby avoiding finger occlusion and causing color picking errors.
[0188] The following combines Figure 8a shown position coordinate schematic diagram to elaborate on the color picking method in detail. Please refer to Figure 8a, When the Penkit displays the color picker 530 (i.e., when executing S304), it establishes a coordinate system with the upper left corner of the fourth interface 500 as the origin. Among them, the horizontal direction is the X-axis direction, and the vertical direction is the Y-axis direction. In the embodiment of the present application, the PenKit can obtain the coordinates of the center point of the fourth interface 500, which are the coordinates of the center point 801 of the color picker 530, denoted as (X0, Y0). The PenKit displays the color picker 530 at this position.
[0189] Moreover, the PenKit can obtain the position coordinates of the upper left corner (i.e., the point 802) of the square 803 (or rectangle) tangent to the color picker 530 in the coordinate system of the display interface 800, denoted as (X1, Y1).
[0190] Still referring to Figure 8a , Exemplarily, the PenKit can obtain the coordinates of the center point 801 of the color picker 530 in the coordinate system with the point 802 as the origin, denoted as (x0, y0).
[0191] As Figure 7a shown, when the user touches the color picker 530, Figure 7a The touch position in
[0192] is only a schematic example, and the present application does not make any limitations. The Input sends a touch event to the PenKit, and the touch event includes the touch event type and the touch position coordinates. Among them, the touch event type is the touch type (which can also be called the Down type), and the touch position coordinates are (X2, Y2), that is, the coordinates in the coordinate system of the fourth interface 500 are (X2, Y2).
[0193] S311, Globlawrite returns the color values of the 9*9 area to the PenKit.
[0194] Exemplarily, in response to the received setOffsetLocation message, Globlawrite obtains that the coordinates of the center point of the color picker 530 in the coordinate system of the fourth interface 500 are (X0, Y0). As described above, Globlawrite has obtained the bitmap corresponding to the screen capture 600 of the fourth interface 500 in S309, that is, it has obtained the color values of each pixel in the screen capture 600. As Figure 8aAs shown, Globlawrite can expand around the coordinates (X0, Y0) of the center point of the color picker 530 in the coordinate system of the fourth interface 500 to obtain the color values of 9*9 pixels in the shape of a square centered on the coordinates (X0, Y0). That is to say, the pixel corresponding to the center point 801 is the center point of the 9*9 pixel points. Among the color values of the 9*9 pixels in the square, each row includes 9 pixel points, and each column includes 9 pixel points. PenKit can assign the obtained color values of 9*9 pixel points to Figure 8a the square grid array shown. Among them, each grid corresponds to a pixel point, and its position corresponds to the arrangement of pixel points in the image. For example, the color (i.e., color value) of the central grid in the square grid is the color value of the pixel corresponding to the center point 801, and the colors of the remaining squares correspond in sequence, and no further examples will be given here one by one.
[0195] Combined with Figure 8a , Figure 9 For the color picker schematic diagram shown exemplarily, please refer to Figure 9 , Figure 8a the position of the center point in the coordinate system in Figure 9 and map it to the image 600 (i.e., the screenshot 600). The center point 801 of the color picker 530 is at the position shown in Figure 9 . PenKit can obtain the color values of 9*9 pixel points centered on this point, so as to complete the color picking of the point 801 (i.e., the position aligned with the center of the color picker 530) and its nearby pixel points in the image 600, a total of 9*9 pixel points.
[0196] S312, PenKit updates the color picker.
[0197] Figure 10 For the color picker update schematic diagram shown exemplarily, please refer to Figure 10 in (1). Exemplarily, after PenKit obtains the color values of the 9*9 area centered on the point 801, as shown in Figure 10 in (2) and (3), PenKit can shear the 9*9 square array based on the pre-set shape and size of the color picker (i.e., the shape and size of the inner ring of the color picker) to obtain squares that conform to the shape (such as circular) and size (which can be set according to actual needs, not limited in this application) of the color picker. That is to say, a part of the squares at the edge of the 9*9 square may be cut, and a part of the squares only show a part.
[0198] Exemplarily, as shown in Figure 4cIn the description in [reference], the filling color in the upper half ring of the color picker displayed by PenKit is the same as the color value of the center point 801. PenKit can fill the upper half ring of the color picker based on the color value of the pixel at the center point 801, so that the color of the upper half ring is consistent with the color picked by the center point, enabling the user to more intuitively obtain the color picked by the current color picker. In the embodiment of the present application, the color picked by the color picker is the color picked by the center point 801 of the color picker, that is, the color value of the pixel corresponding to the center point 801.
[0199] In the embodiment of the present application, by magnifying and displaying the center point 801 and the pixels around it, that is, displaying them as a 9*9 array (i.e., area), it can also be understood as the Figure 10 inner ring squares in (3) of [reference], so that the user can intuitively obtain the color values of other pixels near the center point 801, enabling the user to drag the color picker according to needs to pick colors more accurately through the color picker.
[0200] In the embodiment of the present application, only the color picker being circular is taken as an example for illustration. In other embodiments, the color picker can also be any shape such as a rectangle, square, rhombus, etc., which is not limited in the present application. For example, Figure 11 For the schematic diagram of the color picker shown exemplarily, please refer to Figure 11 , in this example, the shape of the color picker is a square. Correspondingly, PenKit can Figure 10 in the manner in [reference], assign a 9*9 grid (which can also be called an area) to the inner frame of the color picker. The outer frame of the color picker can also include an upper half frame and a lower half frame. Among them, the filling color of the upper half frame is the same as the color at the center of the color picker, and the lower half frame is the color obtained by the color picker last time.
[0201] Still referring to Figure 3 , before PenKit obtains the lift event, PenKit loops through S308~S312. That is to say, since the user drags the color picker 530 and does not lift the hand, Input can continuously report trigger events to PenKit (that is, every preset period, for example, 200ms, as described above, can be set according to actual needs, which is not limited in the present application). Every time PenKit receives a trigger event, it can execute S310, that is, calculate the coordinates of the center point of the color picker 530 and send the coordinates of the center point to Globalwrite.
[0202] For example, please refer to Figure 7b , exemplarily, the user drags the color picker 530 from Figure 7a 's position to Figure 7bAt the position shown. During the process of the user dragging the color picker 530, PenKit and Globalwrite loop through S308 - S312 to update the color selection of each block and the upper half - ring in the color picker 530 according to the different positions of the center point of the color picker 530.
[0203] In this example, taking the time interval between the user moving the color picker 530 from the position of 7a to Figure 7b the position shown as the touch event reporting period for illustration. That is to say, at the first moment, the touch event obtained by PenKit is used to describe Figure 7a the touch position shown, and at the second moment, the touch event obtained by PenKit is used to describe Figure 7b the touch position shown.
[0204] In this example, taking the case where the user always drags the color picker 530 on the desktop for color selection for illustration. That is to say, when executing S308 - S309, the image obtained by Globlawrite and its corresponding bitmap are the same as the image 600 and its corresponding bitmap. In other embodiments, as described above, the color - picking object can also be a video and a preview image captured in real - time by a camera, etc. That is to say, the color - picking object is an image stream, and the images of each frame are the same or different. That is to say, the screen capture obtained by Globawrite from the ScreenService in each trigger period (which can refer to the description above) may be the same or different, and this application does not make a limitation.
[0205] Combined with Figure 7b the schematic diagram of the user interface shown, Figure 8b for the schematic diagram of the position coordinates shown exemplarily, please refer to Figure 8b , PenKit obtains the touch event reported by the Input module at the current moment (such as the second moment). The touch event includes, but is not limited to: the touch type and the touch position. Among them, the touch type is the drag type, and the touch position is the coordinate corresponding to the point 804 in the coordinate system with the upper - left corner of the fourth interface 500 as the origin, denoted as (X5, Y5). PenKit can determine based on the touch type that the current user has not lifted the hand, that is, no lift - hand event (that is, the touch event with the touch type of lift - hand) has occurred, and PenKit continues to execute S310. It should be noted that the touch event can be received at any moment among S308 - S309, and this application does not make a limitation.
[0206] Please refer to Figure 8b, Exemplarily, PenKit can obtain the displacement offset of the current touch point 804 as (ΔX, ΔY) based on the coordinates (X5, Y5) of the touch position and the position coordinates corresponding to the touch event obtained at the previous moment (i.e., the first moment, which can also be understood as the reporting period of the previous touch event), that is, (X2, Y2). That is to say, the offset of the current touch point 804 from the touch point in the previous touch event (i.e., Figure 8a the touch event shown) in the X-axis is ΔX, and the offset in the Y-axis is ΔY. It can be understood that when the user drags the color picker 530 between two moments (i.e., the reporting moments of the touch events, which can also be understood as within the period), the dragging distance in the X-axis is ΔX, and the dragging distance in the Y-axis is ΔY.
[0207] , Exemplarily, PenKit can obtain the coordinates of the upper left corner of the color picker 530 (i.e., Figure 8a the upper left corner point 802 of the square tangent to the color picker 530 in ) based on the displacement offset of the touch point 804 as (ΔX, ΔY) and the touch event obtained at the previous moment (i.e., the first moment), and obtain the coordinates of point 802 at the current moment (i.e., in the coordinate system with the upper left corner of the fourth interface 500 as the origin). That is to say, during the process of the user dragging the color picker 530, the upper left corner point 802 moves along with the dragged touch point, and its offsets in the X-axis and Y-axis are the same. Therefore, PenKit can calculate the coordinates of point 802 at the current moment, denoted as (X4, Y4), based on the coordinates of point 802 obtained last time and the offsets of the touch point 801 in the X-axis and Y-axis.
[0208] Still referring to Figure 7b , as described above, PenKit obtained the coordinates of the center point 801 of the color picker 530 in the coordinate system with point 802 as the origin in the previous cycle (i.e., the previous trigger event obtained, such as Figure 7a shown), denoted as (x0, y0). Since the coordinates of the center point 801 are in the coordinate system with point 802 as the origin, when the center point 801 moves arbitrarily on the fourth interface 500, its coordinates in the coordinate system with the upper left corner of the fourth interface 500 as the origin change, but its coordinates in the coordinate system with point 802 as the origin remain unchanged, that is, still (x0, y0). Correspondingly, PenKit can calculate the coordinates of the center point 801 in the coordinate system with the upper left corner of the fourth interface 500 as the origin (which can also be called the relative position coordinates), denoted as (X3, Y3), based on the current coordinates of point 802 (i.e., (X4, Y4)) and the coordinates of the center point 801 in the coordinate system with point 802 as the origin (i.e., (x0, y0)).
[0209] Correspondingly, PenKit sends setOffsetLocation information to Globalwrite. The setOffsetLocation information includes the position coordinates of the center point 801 of the color picker 530 (i.e., Figure 7b the position coordinates in
[0210] ), that is, (X3, Y3). Exemplarily, in response to the received setOffsetLocation information, Globlawrite obtains the coordinates of the center point 801 of the color picker 530 in the coordinate system of the fourth interface 500 as (X5, Y5). As described above, Globlawrite has obtained the bitmap corresponding to the screen shot 600 corresponding to the fourth interface 500 in S309, that is, has obtained the color values of each pixel in the screen shot 600. As Figure 8b shown, Globlawrite can expand around the coordinates (X5, Y5) of the center point of the color picker 530 in the coordinate system of the fourth interface 500 to obtain the color values of 9*9 pixels in the shape of a square centered on the coordinates (X5, Y5). That is to say, the pixel corresponding to the center point 801 is the center point of the 9*9 pixel points. Among the color values of the 9*9 pixels in the square, each row includes 9 pixel points, and each column includes 9 pixel points. PenKit can assign the obtained color values of 9*9 pixel points to the Figure 8b square grid array shown. Among them, each grid corresponds to a pixel point, and its position corresponds to the arrangement of pixel points in the image. For example, the color (i.e., color value) of the central grid in the square grid is the color value of the pixel corresponding to the center point 801, and the colors of the remaining squares correspond in turn, and no further examples will be given here.
[0211] Next, after PenKit obtains the color values of the 9*9 area centered on the point 801, as Figure 10 shown in (2) and (3) of
[0212] Exemplarily, as Figure 4cAs described in , the filling color in the upper half ring of the color picker displayed by PenKit is the same as the color value of the center point 801. PenKit can fill the upper half ring of the color picker based on the color value of the pixel at the center point 801, so that the color of the upper half ring is consistent with the color picked at the center point, enabling the user to more intuitively obtain the color picked by the current color picker. In the embodiment of the present application, the color picked by the color picker is the color picked at the center point 801 of the color picker, that is, the color value of the pixel corresponding to the center point 801.
[0213] In the embodiment of the present application, by magnifying and displaying the center point 801 and its surrounding pixels, that is, displaying them as a 9*9 array (i.e., area), it can also be understood as the squares in the inner ring in (3) of Figure 10 so that the user can intuitively obtain the color values of other pixels near the center point 801, enabling the user to drag the color picker as needed to pick colors more precisely through the color picker.
[0214] The user can continue to pick colors in the fourth interface 500 by dragging the color picker 530, and PenKit and Globalwrite repeat the execution of S308~S312.
[0215] In a possible implementation, if the user's touch operation acts on a point outside the color picker 530, the tablet responds to the received user operation and displays the color picker 530 at the position where the user clicks. Specifically, Penkit can obtain the corresponding touch position in response to the touch event reported by the Input module. Penkit can make the color picker 530 disappear from the current position and display it at the touch position, and continue to perform subsequent operations, that is, the user can continue to drag the color picker 530 from this position to pick colors, or the user can also raise the hand to complete the color picking, which is not limited in this application. Optionally, when PenKit moves the color picker 530 from the current position (such as the center of the screen) to the user's touch position, an animation effect, such as jumping or fading in and out, can also be added, which is not limited in this application.
[0216] S313, PenKit obtains a lift event and cancels the display of the color picker.
[0217] Exemplarily, during the process of PenKit and Globalwrite repeating the execution of S308~S312, if PenKit monitors a lift event, PenKit cancels the display of the color picker and returns to select a color (i.e., execute S314).
[0218] Figure 12a For the schematic diagram of the user interface shown exemplarily, please refer to Figure 12a , the user drags the color picker 530 from the Figure 7a position shown toFigure 12a At the position shown, the color values of the squares in the color picker 530 and the upper half ring change as the user drags the color picker 530 to change its position. For the specific implementation, refer to the above text and will not be elaborated here. The user drags the color picker 530 to Figure 12a the position shown and then raises the hand to indicate that the color picker 530 picks color at the current position and assigns the selected color to the color wheel (or a drawing tool, such as a paintbrush).
[0219] Exemplarily, after the user raises the hand, the touch sensor detects that the user raises the hand, and the Input module can receive the touch event reported by the touch sensor. The touch event includes the touch event type and the touch position. Among them, the touch event type is the raise hand event (i.e., the up event), and the touch position is as Figure 12a shown. The Input module PenKit reports the touch event. Based on the touch event, PenKit can determine that the raise hand event occurs. It should be noted that PenKit may detect the raise hand event at any moment during the execution of S308~S312. After PenKit detects the raise hand event, it can stop the current step being executed. As Figure 12b shown, PenKit cancels the display of the color picker 530 at the current position (i.e., point 1201). Among them, point 1201 is the position corresponding to the center point of the color picker 530. Correspondingly, PenKit obtains the color (i.e., the color value) selected by the center point of the color picker 530 obtained last time before the raise hand event occurs, for example, the color (i.e., the color value) of the pixel corresponding to the position where point 1201 is located. As Figure 12b shown, before the user raises the hand, the center point of the color picker 503 moves to point 1201, and PenKit picks color at this point. For the specific color picking process, refer to the relevant content above and will not be elaborated here. Exemplarily, when the color picker 530 is at this point (i.e., point 1201), its display is as Figure 12b shown. The filling color of the upper half ring 1221 in the outer ring 1210 of the color picker 530 is the same as the color value of the pixel corresponding to the center point 1230, which is the color value of the pixel corresponding to point 1201. The lower half ring 1222 is filled with the default color or the color selected in the previous color picking. The squares in the inner ring 1220 display the colors of the pixels around the pixel corresponding to point 1201. At the current moment, that is, after the user raises the hand, the color selected by PenKit is the Figure 12b color selected by the center point 1230 in, which is the color value of the pixel corresponding to point 1201. And, PenKit cancels the display of the color picker 530.
[0220] It should be noted that the touch events described in the embodiments of the present application are only illustrative examples, and the present application is not limited thereto.
[0221] S314, PenKit releases touch monitoring.
[0222] Exemplarily, PenKit sends a touch monitoring release instruction to the Input module to release the touch monitoring. In response to the received touch monitoring release instruction, the Input module no longer reports the touch event to PenKit. It should be noted that the Input module still obtains the touch event reported by the touch sensor, but it no longer reports it to PenKit.
[0223] And, as mentioned above, after PenKit registers touch monitoring with the Input module, the touch event is locked, that is, the Input module only reports touch events to Penkit. After PenKit releases touch monitoring, the Input module can report the received touch events to other applications or services that registered touch monitoring, thereby unlocking the touch event.
[0224] S315, PenKit returns the selected color to the memo application.
[0225] For example, PenKit selects a color (e.g. Figure 12b After that, PenKit sends color value indication information to the application. The color value indication information includes the color value, that is, the color value of the pixel corresponding to the point 1201, which can also be understood as Figure 12b The color value selected (ie displayed) by the center point 1230 of the color picker 530 .
[0226] The memo application obtains the corresponding color value in response to the received color value indication information. Figure 13 For an exemplary user interface diagram, please refer to Figure 13 After the memo application obtains the color value, it fills the color option 1301 (corresponding to the color option 422 in FIG. 4 ) with the selected color, that is, the obtained color value. Correspondingly, the colors of the current brushes and dyeing tools are synchronously updated to the color value. Figure 14 As shown, the user uses a stylus to use a crayon to color the image, and the color of the color is the color obtained by the memo application from PenKit.
[0227] S315, Penkit and Globalwrite are untied.
[0228] S316, Globalwrite closes ScreenShotService (screen shot service, referred to as screen shot service).
[0229] Exemplarily, PenKit sends an unbindService message to Globalwrite to request to unbind the service from Globalwrite. Specifically, PenKit calls the unbindService interface function of Globalwrite to unbind the service from Globalwrite.
[0230] In the embodiment of the present application, unbinding service can also be understood as deleting (or releasing) the data channel with Globalwrite so that the two modules (or components) no longer interact with each other. Unbinding service can also be understood as Globalwrite no longer providing corresponding services for Penkit.
[0231] Exemplarily, in response to the received unbindService message, Globalwrite closes ScreenShotService. Specifically, Globalwrite stops running the ScreenShotService method function to close ScreenShotService, which no longer triggers ScreenService to perform screen capture, thereby avoiding power consumption waste.
[0232] In a possible implementation, the color palette, color ring, and color value in the memo application are synchronously updated based on the color selected by the color picker 530 . Figures 15a - 15c Schematic diagram showing the display of color palette, color ring and color value. Figure 15a , after the memo application displays the color picking option 422 as the color selected by the color picker 530, if the user clicks on the color picking option 422, the tablet responds to the received user operation and displays the color picking box 430 in the memo application interface in the fifth interface 404. The color picking box 430 displays controls such as the color palette corresponding to the color palette option 432. The color palette 435 includes a plurality of blocks (it can also be other graphics, which is not limited in this application), and each row of blocks (or each column of blocks) belongs to the same color system, and the color value of the blocks in each row or column gradually decreases or increases, which is not limited in this application. In other words, the color (i.e., color value) corresponding to each block is different. Among them, the color in the block framed by the color selection box 436 is the color selected by the color picker 530.
[0233] like Figure 15b As shown, the user can click on the color wheel option 433, and the tablet responds to the received user operation and displays the color wheel 1501 in the color selection box 430 in the sixth display interface 405. The color wheel 1501 includes multiple color blocks, each color block corresponds to a color value, and the color value of each color block is different. The color in the block framed by the color selection box 436 is the color selected by the color picker 530.
[0234] like Figure 15c As shown, the user can click on the color wheel option 433, and the tablet responds to the received user operation by displaying the color value 1503 in the color picking box 430 in the seventh display interface 406, wherein the color value 1503 includes RGB (red, green, blue) color values, and the RGB color values represent the color selected by the color picker 530.
[0235] In another possible implementation, as described above, the user triggers the global color picking function again, and the color picker is displayed at the position where the last color picking ended. Figure 16 As shown, the eighth interface 1600 includes but is not limited to a desktop 1601 (it may also be other objects, which is not limited in this application) and a window 1602, in which a memo application interface is displayed. The user can trigger the global color picking function again, and the specific triggering method can refer to the above embodiment, which is not limited in this application. In response to the received user operation, the tablet obtains the last (for example Figure 12a In the embodiment of the present application, after executing S313, the tablet can record the stop position of the color picker, that is, Figure 12a The position shown, for example, the coordinates of point 1201. Figure 16 In the scene shown, the tablet detects that the global color picker function is called again in the memo application, and the tablet obtains the last recorded position, which is the coordinate of point 1201. The tablet displays a color picker 1603 at this position. The center point 1630 of the color picker 1603 is at the coordinate corresponding to point 1201.
[0236] Optionally, the upper half ring 1611 of the outer ring 1610 of the color picker 1603 displays a default color, such as white, and the lower half ring 1612 displays the color selected by the color picker last time, that is, Figure 12a or Figure 12b Each square in the inner ring 1620 (including the center 1630) is a default color, such as white.
[0237] In another possible implementation, as described above, the color picking object in the embodiment of the present application can be any application or video stream, etc., and can also be a preview image captured by a camera. Figure 17a For an exemplary user interface diagram, please refer to Figure 17a, the user can turn on the camera in advance, and the ninth interface 1700 can display a preview interface 1710, and the preview image captured by the camera in real time is displayed in the preview interface 1710. Exemplarily, the preview interface 1710 further includes, but is not limited to, a shooting button 1701. The user can trigger the global color picker function in the memo application in the manner described above, and the tablet responds to the received user operation and displays a color picker 1730 on the ninth interface 1700. Among them, when the color picker 1730 is at the current position (for example, the first position), the color picked by the center 1733 of the color picker 1730 is white (that is, the color of the pixel points covered by the center 1733 is white, which is only a schematic example and is not limited). Correspondingly, the color displayed by the upper half ring 1731 of the color picker 1730 is the same as the color picked by the center 1733, which is white. And the lower half ring 1732 displays the color picked last time, for example, black (also a schematic example).
[0238] Exemplarily, the user can drag the color picker 1730 in the ninth interface 1700 to pick colors in the ninth interface 1700. During the color picking process, that is, when executing S308, Globalwrtie sends a getScreenShot request to ScreenService, and ScreenService takes a screenshot of the currently displayed fourth interface 500. The screenshot includes the preview image captured by the camera (which can also be understood as the current frame in the image stream) and the image corresponding to the window 1720. PenKit can pick colors in the obtained screen screenshot based on the position of the color picker, so as to realize color picking at any position in the image stream, enabling the user to obtain the required color in reality through the camera and color the image in the memo application based on the selected color.
[0239] Exemplarily, when the color picker stops at a position, the center point 1733 of the color picker 1730, other squares in its inner ring, and the color of the upper half ring 1731 will change with the change of the image content of the object to be color picked. For example, Figure 17b as shown, the user touches the color picker 1730 and makes it stop at the current position, and this position is the same as Figure 17aThe position in is the same (for example, the first position). Correspondingly, as the preview image captured by the camera changes, the color of the pixels covered by the center point 1733 in the color picker 1730 changes accordingly, for example, displayed as blue (shown as gray in the figure). In addition, the colors of other squares in the inner ring also change with the color changes of the corresponding pixels. And, the upper half ring 1731 is also displayed as blue with the center point 1733. The specific color picking process can be referred to above and will not be repeated here. In other words, when the color picker 1730 stops at the current position, PenKit and Globalwrite repeatedly execute S307~S311. During the execution process, the content of the screenshot obtained by Globalwrite changes with the preview image, while the coordinate position corresponding to the touch event remains unchanged.
[0240] Optionally, as described above, after PenKit registers the touch listener with the Input module, the touch events of the screen are locked. Figure 17a and Figure 17b In the scene shown, the shooting button 1701 is disabled (for example, it can be displayed in gray to indicate that the current button is unavailable), that is, it is impossible to take a photo by clicking it, until the global color picking function ends, that is, PenKit releases the touch monitoring.
[0241] Figure 17c and Figure 17d For scenes where the color objects include video images, Figure 17c For an exemplary user interface diagram, please refer to Figure 17c , the tenth interface 1701 may include a video application interface 1740, in which a video image (i.e., a video stream) and other controls (e.g., a play control, a fast-forward control, etc.) are displayed. The user may trigger the global color picking function in the memo application in the manner described above, and the tablet may display a color picker 1750 on the tenth interface 1701 in response to the received user operation. Among them, when the color picker 1750 is in the current position (e.g., the second position), the color picked by the center of the color picker 1750 is white (i.e., the color of the pixel covered by the center is white, which is only an illustrative example and is not limited thereto). For other descriptions, please refer to Figure 17a , I will not go into details here.
[0242] For example, when the user holds down the color picker 1750 (i.e., does not lift the hand) and stops at the second position, the center point of the color picker 1750 and the other squares in its inner ring and the color of the upper half ring will change as the image content of the object to be picked changes. Figure 17d As shown, the user touches the color picker 1750 and stops it at the current position, which is the same as Figure 17cThe position in is the same (for example, the second position). Correspondingly, as the video image played in the video application interface changes, the color of the pixel covered by the center point in the color picker 1750 changes accordingly, for example, it is displayed as blue (shown as gray in the figure). And, the colors of other squares in the inner ring also change with the color changes of the corresponding pixels. And, the upper half ring is also displayed as blue along with the center point. The specific color picking process can be referred to above and will not be repeated here. That is to say, when the color picker 1750 stops at the current position (ie, the second position), PenKit and Globalwrite repeatedly execute S307~S311. During the execution process, the content of the screenshot obtained by Globalwrite changes with the video image, while the coordinate position corresponding to the touch event remains unchanged.
[0243] Optionally, as described above, after PenKit registers the touch listener with the Input module, the touch events of the screen are locked. Figure 17a and Figure 17b In the scene shown, the shooting button 1701 is disabled (for example, it can be displayed in gray to indicate that the current button is unavailable), that is, it is impossible to take a photo by clicking it, until the global color picking function ends, that is, PenKit releases the touch monitoring.
[0244] In another possible implementation, as described above, the method in the embodiment of the present application can also be applied to other third-party applications. Figures 18a - 18b For an exemplary user interface diagram, please refer to Figure 18a , the eleventh interface 1800 includes but is not limited to: desktop 1801 and window 1802. Among them, the document application (which can be a third-party application) interface is displayed in window 1802. The document application interface includes but is not limited to: start option, insert option 1810, view option and review option, etc. The user can click on the insert option 1810, and the tablet responds to the received user operation and displays the insert object option box 1820 in the document application interface. The insert object option box 1820 includes but is not limited to: annotation option 1821, blank page option, etc. The user can click on the annotation option 1821, and the tablet responds to the received user operation and displays the insert annotation option box 1830. The insert annotation option box 1830 includes but is not limited to: input box and handwriting insertion option 1831. As Figure 18bAs shown, when the user clicks the handwritten insertion option 1831, the tablet responds to the received user operation and displays an ink annotation box 1840 in the document application interface. Specifically, in this example, the application layer of the tablet can set up an ink annotation adding module (or service), which can provide a calling interface for other applications (such as document applications). In response to the user's operation of clicking the handwritten insertion option 1831, the document application can call the ink annotation adding module. The ink annotation adding module responds to the call of the document application and provides it with the function of adding ink annotations. That is, an ink annotation box 1840 is displayed in the document application interface. The ink annotation box 1840 includes, but is not limited to, an input tool box 1850. The input tool box 1850 includes, but is not limited to, input tools and function controls (or function options). Among them, the input tools include, but are not limited to, some different types of brushes (or paintbrushes) or coloring tools, etc., such as a crayon brush (which can also be called a crayon coloring tool or simply a crayon, and this application does not make a limitation), a pen, a pencil, a marker, an eraser, etc. Exemplarily, the function controls (which can also be called function options) include, but are not limited to, a typing option, a color picking option 1860 (which can also be called a color palette option, and this application does not make a limitation), and more options, etc. The user can click the color picking option 1860, and its specific implementation method can refer to the process in the above-mentioned embodiment, which will not be elaborated here. It should be noted that in this example, the call to PenKit is implemented by the ink annotation adding module, that is Figure 3 the process executed by the application in
[0245] It can be understood that in order for the electronic device to implement the above functions, it includes the corresponding hardware and / or software modules for executing each function. Combining the algorithm steps of each example described in the embodiments disclosed in this article, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of this application.
[0246] In one example, Figure 19 FIG. shows a schematic block diagram of a device 1900 according to an embodiment of the present application. The device 1900 may include: a processor 1901 and a transceiver / transceiver pin 1902. Optionally, it further includes a memory 1903.
[0247] Each component of the device 1900 is coupled together through a bus 1904. Among them, the bus 1904 includes, in addition to the data bus, a power bus, a control bus, and a status signal bus. However, for the sake of clear illustration, all kinds of buses are called bus 1904 in the figure.
[0248] Optionally, the memory 1903 may be used for the instructions in the foregoing method embodiments. The processor 1901 may be configured to execute the instructions in the memory 1903, control the receiving pin to receive signals, and control the transmitting pin to transmit signals.
[0249] The apparatus 1900 may be the electronic device or the chip of the electronic device in the foregoing method embodiments.
[0250] All relevant contents of the steps involved in the foregoing method embodiments may be incorporated into the function descriptions of the corresponding functional modules and will not be elaborated herein.
[0251] This embodiment also provides a computer storage medium storing computer instructions, which, when running on an electronic device, cause the electronic device to execute the foregoing related method steps to implement the method in the foregoing embodiments.
[0252] This embodiment also provides a computer program product including computer instructions, which, when running on a computer, cause the computer to execute the foregoing related steps to implement the method in the foregoing embodiments.
[0253] In addition, an embodiment of the present application also provides an apparatus, which may specifically be a chip, a component or a module. The apparatus may include a processor and a memory connected to each other. The memory is used to store computer-executable instructions. When the apparatus runs, the processor may execute the computer-executable instructions stored in the memory to cause the chip to execute the methods in the foregoing method embodiments.
[0254] The electronic device, computer storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved may refer to the beneficial effects in the corresponding methods provided above and will not be elaborated herein.
[0255] As described above, the foregoing embodiments are only used to illustrate the technical solutions of the present application and are not intended to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they may still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. However, such modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for displaying colors, characterized in that, Applied to an electronic device, the method includes: At a first time, a first interface is displayed, the first interface including a second interface of a first application and a third interface of a second application, the second interface being part of the first interface, the second interface including a first icon, the color of the first icon being a first color; At a second time, in response to a first operation on the second interface received, a color picker control is displayed at a first position on the first interface, the color picker control including an outer ring and an inner ring, the outer ring including an upper half ring and a lower half ring, the upper half ring being used to display the color currently picked by the color picker center point, the lower half ring being used to display the color picked by the color picker control last time; wherein, in the case of first triggering the display of the color picker control, the color picker control is displayed at an initial position, the initial position being the center position of the first interface, the lower half ring displaying a default color, or the color corresponding to the current paintbrush, or the color currently displayed by the upper half ring; in the case of non-first triggering the display of the color picker control, the color picker control is displayed at the position where color picking stopped last time; wherein, in response to the first operation on the second interface received, it includes: the stylus tool module registers a touch event listener with the input module to lock the touch event; wherein, during the process of the touch event being locked, the touch events obtained by the input module are no longer fed back to other upper-layer applications or modules, but other events and other input methods can be executed normally, the other events including but not limited to operations on the power button of the electronic device, sliding operations on the edge of the screen of the electronic device, knuckle operations on the screen of the electronic device; the other input methods including but not limited to input methods through a keyboard, input methods through voice input; In response to a second operation on the color picker control received, the color picker control is displayed at a second position on the first interface, the second position being outside the display area range of the second interface, a second color being displayed in the upper half ring of the color picker control, the second color being the color of the pixel corresponding to the second position in the first interface; At a third time, in response to a third operation received, the color picker control is not displayed, and the color of the first icon is changed to the second color.
2. The method according to claim 1, characterized in that, The method further includes: At a fourth time, in response to the first operation on the second interface received, a color picker control is displayed at a third position on the first interface; In response to a pressing operation on a second icon in the first interface, the color picker control is displayed at a fourth position on the first interface, a third color being displayed in the color picker, the third color being the color of the pixel corresponding to the fourth position in the first interface; At a fifth time, in response to a fourth operation received, the color picker control is not displayed, and the color of the first icon is changed to the third color.
3. The method according to claim 2, characterized in that, The method further includes: At the sixth time, in response to a click operation received on the second icon, a fourth interface is displayed, the fourth interface includes the second interface, and the fourth interface does not include the color picker control.
4. The method according to claim 1, characterized in that, The second application is a video application, the third interface is a video playback interface, the video playback interface includes a video playback window, and a video image is played in the video playback window; The response to the second operation received on the color picker control, the color picker control is displayed at a second position on the first interface, includes: In response to the second operation received on the color picker control, the color picker control is displayed at the second position on the first interface, the second position is within the video playback window, and the color displayed by the color picker control is the color of the pixel corresponding to the second position within the video playback interface; The color picker control remains at the second position, and the color displayed by the color picker control changes as the color of the pixel corresponding to the second position in the played video image changes.
5. The method according to claim 1, characterized in that, The second application is a camera application, the third interface is a camera preview interface, and a preview image captured by the camera is displayed in the camera preview interface; The response to the second operation received on the color picker control, the color picker control is displayed at a second position on the first interface, includes: In response to the second operation received on the color picker control, the color picker control is displayed at the second position on the first interface, the second position is within the camera preview interface, and the color displayed by the color picker control is the color of the pixel corresponding to the second position within the camera preview interface; The color picker control remains at the second position, and the color displayed by the color picker control changes as the color of the pixel corresponding to the second position in the preview image changes.
6. The method according to claim 1, characterized in that, The color picker control includes an inner ring area and an outer ring area. Among them, the inner ring area includes a first color picking area and at least one second color picking area, and the outer ring area includes a first half ring and a second half ring; When the color picker control is displayed at the second position on the first interface, the first color picking area displays the second color, the at least one second color picking area displays the colors corresponding to at least one pixel around the second position, the first half ring displays the second color, and the second half ring displays a preset color.
7. The method according to claim 6, characterized in that, The response to the second operation received on the color picker control, the color picker control is displayed at a second position on the first interface, includes: Receiving a second operation on a fifth position within the color picker control, the color picker control is displayed at the second position on the first interface; wherein, the color picking center of the color picker control is located at the second position, and the fifth position deviates from the color picking center.
8. The method according to any one of claims 1 to 7, characterized in that, The response to the first operation received on the second interface, the color picker control is displayed at a first position on the first interface, includes: Invoking the stylus tool module to display the color picker control, and subscribing to touch events from the input module through the stylus tool module.
9. The method according to claim 8, characterized in that, In response to a second operation received on the color picker control, the color picker control is displayed at a second position on the first interface, including: Triggering, by the stylus tool module, the global writing module to obtain a first bitmap corresponding to a screenshot of the first interface; Outputting, by the stylus tool module, a touch event obtained by the input module to the global writing module, and obtaining a regional color value obtained by the global writing module based on the touch event and the first bitmap, where the regional color value includes the color of a first pixel corresponding to the second position in the first interface, and the colors corresponding to at least one pixel around the first pixel; Updating, by the stylus tool, the color displayed in the color picker control, and the color picker control displays the regional color value.
10. The method according to claim 8, characterized in that, In response to a third operation received, the color picker control is not displayed, including: The stylus tool module cancels subscribing to the touch event.
11. An electronic device, characterized in that, Including: One or more processors, a memory; And one or more computer programs, where the one or more computer programs are stored on the memory, and when the computer programs are executed by the one or more processors, the electronic device is caused to perform the following steps: At a first time, display a first interface, where the first interface includes a second interface of a first application and a third interface of a second application, the second interface is a part of the first interface, the second interface includes a first icon, and the color of the first icon is a first color; At a second time, in response to a first operation received on the second interface, a color picker control is displayed at a first position on the first interface, the color picker control includes an outer ring and an inner ring, the outer ring includes an upper half ring and a lower half ring, the upper half ring is used to display the color currently picked by the color picker center point, and the lower half ring is used to display the color picked by the color picker control last time; where, in the case of first triggering the display of the color picker control, the color picker control is displayed at an initial position, the initial position is the center position of the first interface, and the lower half ring displays a default color, or the color corresponding to the current brush, or the color currently displayed by the upper half ring; in the case of non-first triggering the display of the color picker control, the color picker control is displayed at the position where color picking stopped last time; where, in response to a first operation received on the second interface, including: the stylus tool module registers a touch event listener with the input module to lock the touch event; where, during the locking of the touch event, the touch event obtained by the input module is no longer fed back to other upper-layer applications or modules, but other events and other input methods can be normally executed, and the other events include but are not limited to operations on the power button of the electronic device, sliding operations on the edge of the screen of the electronic device, knuckle operations on the screen of the electronic device; the other input methods include but are not limited to input methods through a keyboard, input methods through voice input; In response to a second operation received on the color picker control, the color picker control is displayed at a second position on the first interface, the second position being outside the display area of the second interface. The second color is displayed in the upper half ring of the color picker control, and the second color is the color of the pixel corresponding to the second position in the first interface. At a third time, in response to a third operation received, the color picker control is not displayed, and the color of the first icon is changed to the second color.
12. The electronic device according to claim 11, characterized in that, When the computer program is executed by the one or more processors, the electronic device is caused to perform the following steps: At a fourth time, in response to a first operation received on the second interface, a color picker control is displayed at a third position on the first interface. In response to a pressing operation received on a second icon in the first interface, the color picker control is displayed at a fourth position on the first interface, and a third color is displayed in the color picker. The third color is the color of the pixel corresponding to the fourth position in the first interface. At a fifth time, in response to a fourth operation received, the color picker control is not displayed, and the color of the first icon is changed to the third color.
13. The electronic device according to claim 12, characterized in that, When the computer program is executed by the one or more processors, the electronic device is caused to perform the following steps: At a sixth time, in response to a click operation received on the second icon, a fourth interface is displayed. The fourth interface includes the second interface and does not include the color picker control.
14. The electronic device according to claim 11, characterized in that, The second application is a video application, and the third interface is a video playback interface. The video playback interface includes a video playback window in which a video image is played. When the computer program is executed by the one or more processors, the electronic device is caused to perform the following steps: In response to a second operation received on the color picker control, the color picker control is displayed at the second position on the first interface, the second position being within the video playback window. The color displayed by the color picker control is the color of the pixel corresponding to the second position within the video playback interface. The color picker control remains at the second position, and the color displayed by the color picker control changes as the color of the pixel corresponding to the second position in the played video image changes.
15. A computer storage medium, characterized in that, Comprising computer instructions which, when run on an electronic device, cause the electronic device to perform the method according to any one of claims 1 - 10.
16. A computer program product, characterized in that, Comprising computer instructions which, when run on a computer, cause the computer to perform the method according to any one of claims 1 - 10.