Method, device, equipment and medium for managing color pick-up device
By adjusting the color disc and ribbon size of the color picker according to the dimensions of the target area, the problem of blurred color picker presentation and poor selection experience in the prior art is solved, and a more accurate and efficient color selection is achieved.
Patent Information
- Application Number
- CN202310512976.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-08
- Publication Date
- 2024-11-08
AI Technical Summary
The existing color picker technology is difficult to reasonably present the available candidate colors, resulting in poor experience of users when selecting colors, and the blurred presentation affects the accuracy of the selection.
By obtaining the dimensions of the target area, we determine the color disk radius and ribbon length of the color picker. Based on these dimensions, the color disk and ribbon are presented in the target area, ensuring that the size of the color disk and ribbon matches the target area, thereby avoiding blurring , improve the accuracy of visual performance and choice.
A clearer and more effective color picker visual performance is achieved, and users can choose desired colors in a more accurate way, improving the efficiency of color selection.
Smart Images

Figure CN118918229A_ABST
Abstract
Description
Technical Field
[0001] Exemplary implementations of the present disclosure relate generally to computer visualization, and more particularly to methods, devices, apparatuses, and computer-readable storage media for managing a color picker. Background Art
[0002] With the development of computer visualization technology, multiple colors can be used to process data in various applications. For example, in image processing applications, a certain color can be selected to draw. In word processing applications, the color of the text can be set, and so on. In various applications, a color picker can be provided to the user to select the desired color. However, the existing color picker technical solutions cannot reasonably present the candidate colors that can be selected, or the clarity of the color picker is not ideal. At this time, it is expected to present the color picker in a more convenient and effective way to improve the user's experience of selecting the desired color in the color picker. Summary of the invention
[0003] In a first aspect of the present disclosure, a method for managing a color picker is provided. In the method, the dimension of a target area for presenting the color picker is obtained, the color picker includes a color disk and a color band, the color disk is used to represent the color information of multiple candidate colors, and the color band is used to represent the brightness information of multiple candidate colors. The radius of the color disk and the length of the color band are determined based on the dimension of the target area. In the target area, the color disk is presented based on the radius. In the target area, the color band is presented based on the length.
[0004] In a second aspect of the present disclosure, a device for managing a color picker is provided. The device includes: an acquisition module configured to acquire the dimension of a target area for presenting a color picker, the color picker includes a color disk and a color band, the color disk is used to represent the color information of multiple candidate colors, and the color band is used to represent the brightness information of multiple candidate colors; a determination module configured to determine the radius of the color disk and the length of the color band based on the dimension of the target area; a color disk presentation module configured to present the color disk based on the radius in the target area; and a color band presentation module configured to present the color band based on the length in the target area.
[0005] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes: at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, and when the instructions are executed by the at least one processing unit, the electronic device executes the method according to the first aspect of the present disclosure.
[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the processor implements the method according to the first aspect of the present disclosure.
[0007] It should be understood that the content described in this content section is not intended to limit the key features or important features of the implementation of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In the following, in conjunction with the accompanying drawings and with reference to the following detailed description, the above and other features, advantages and aspects of various implementations of the present disclosure will become more apparent. In the accompanying drawings, the same or similar figure labels represent the same or similar elements, wherein:
[0009] Figure 1 A block diagram of a color picker according to a technical solution is shown;
[0010] Figure 2 A block diagram for managing a color picker according to some implementations of the present disclosure is shown;
[0011] Figure 3 A block diagram showing an interface of a color picker according to some implementations of the present disclosure;
[0012] Figure 4 A block diagram illustrating multiple sectors in a color wheel according to some implementations of the present disclosure;
[0013] Figure 5 A block diagram is shown for determining the color of edge points at arc positions of a sector according to some implementations of the present disclosure;
[0014] Figure 6 A block diagram is shown for determining the color of interior points within a sector according to some implementations of the present disclosure;
[0015] Figure 7 A block diagram for adjusting the position of a brightness indicator according to some implementations of the present disclosure is shown;
[0016] Figure 8 A block diagram is shown for adjusting the position of a color indicator and a brightness indicator according to some implementations of the present disclosure;
[0017] Fig. 9 A block diagram illustrating rendering a target color based on a numerical representation of the target color according to some implementations of the present disclosure is shown;
[0018] Fig.10A block diagram illustrating determining a position of a brightness indicator based on a numerical representation of a target color according to some implementations of the present disclosure;
[0019] Fig.11 A block diagram illustrating determining a position of a color indicator based on a numerical representation of a target color according to some implementations of the present disclosure;
[0020] Fig.12 A flowchart of a method for managing a color picker according to some implementations of the present disclosure is shown;
[0021] Fig.13 A block diagram showing an apparatus for managing a color picker according to some implementations of the present disclosure; and
[0022] Fig.14 A block diagram of a device capable of implementing multiple implementations of the present disclosure is shown. DETAILED DESCRIPTION
[0023] The implementation of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain implementations of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be interpreted as being limited to the implementations described herein. On the contrary, these implementations are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and implementations of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0024] In the description of the implementation methods of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "an implementation" or "the implementation" should be understood as "at least one implementation". The term "some implementations" should be understood as "at least some implementations". The following may also include other explicit and implicit definitions. As used herein, the term "model" can represent the association relationship between various data. For example, the above-mentioned association relationship can be obtained based on a variety of technical solutions currently known and / or to be developed in the future.
[0025] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0026] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0027] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0028] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0029] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0030] The term "in response to" as used herein refers to a state in which a corresponding event occurs or a condition is satisfied. It will be understood that the timing of executing a subsequent action executed in response to the event or condition is not necessarily strongly related to the time when the event occurs or the condition is satisfied. For example, in some cases, the subsequent action may be executed immediately when the event occurs or the condition is satisfied; while in other cases, the subsequent action may be executed some time after the event occurs or the condition is satisfied.
[0031] Example Environment
[0032] In various applications, a user may use a color picker to select a desired color. Figure 1 1 shows a block diagram 100 of a color picker 110 according to one technical solution. Figure 1 As shown, a chromaticity band 120 and a rectangular area 130 may be defined, where the length and width of the rectangular area 130 represent the saturation and brightness of the candidate color, respectively. However, although an application program interface for calling the color picker 110 has been provided, the area of the chromaticity band 120 is too small, which makes it difficult for the user to select a desired color.
[0033] In another technical solution, a color picker including a color wheel and a color ribbon is proposed. This technical solution saves the pre-drawn color wheel and the color ribbon into a predetermined image, and when the color picker needs to be presented, the predetermined image can be scaled according to a desired ratio. This causes the presented color picker to be blurred due to scaling, thereby affecting the visual effect and the accuracy of selecting the desired color. At this time, it is desired to present the color picker in a clearer and more effective manner so as to improve the user's experience of selecting the desired color in the color picker.
[0034] Overview of managing the color picker
[0035] In order to at least partially solve the deficiencies in the prior art, according to an exemplary implementation of the present disclosure, a method for managing a color picker is proposed. Figure 2 An overview of an exemplary implementation of the present disclosure is described. Figure 2 A block diagram 200 for managing a color picker according to some implementations of the present disclosure is shown. According to an exemplary implementation of the present disclosure, the color picker may include a color wheel and a color ribbon, the color wheel is used to represent the color information of multiple candidate colors, and the color ribbon is used to represent the brightness information of multiple candidate colors. Figure 2 As shown, the dimension 210 of the target area 230 for presenting the color picker can be obtained. The dimension 210 may include, for example, a height 212 and a width 214 of the target area 230. The radius 220 of the color plate and the length 222 of the color band of the color picker 240 can be determined based on the dimension 210. Further, in the target area 230, the color plate 232 can be presented based on the radius 220, and the color band 234 can be presented based on the length 222.
[0036] With the exemplary implementation of the present disclosure, the radius 220 and the length 222 are determined based on the dimension 210 of the target area 230, and thus the sizes of the color disk 232 and the color band 234 can be determined in real time according to the size of the target area 230. In this way, the color disk 232 and the color band 234 can be presented respectively based on the radius 220 and the length 222 that match the target area 230. Thus, blurring can be avoided when presenting the color picker 240, thereby improving the visual performance of the color picker 240, and thus allowing the user to select a desired color in a more accurate manner.
[0037] Detailed process of managing the color picker
[0038] An overview of managing a color picker has been described, and more information on presenting a color picker will be described below. For ease of description, the specific details of presenting a color picker are described below using only the target area 230 as an example of a vertical rectangular area. Alternatively and / or additionally, the target area 230 may be a horizontal rectangular area. According to an exemplary implementation of the present disclosure, the radius 220 and the length 222 may be determined based on the width 214. For example, the length 222 may be set to a predetermined proportion (e.g., 90% or other numerical value) of the width 214, and the radius 220 may be set to half (or other proportion) of the length 222. A color disk 232 may be presented at the upper portion of the target area 230 and a color band 234 may be presented at the lower portion. In this way, it may be ensured that the color disk 232 and the color band 234 are presented separately in appropriate sizes within the target area 230.
[0039] According to an exemplary implementation of the present disclosure, the interface of the color picker may include other parts. Specifically, Figure 3 A block diagram 300 of an interface of a color picker according to some implementations of the present disclosure is shown. Figure 3 As shown, the interface 350 of the color picker may include a color wheel 232, and may include a color indicator 330 in the color wheel 232. The user may adjust the position of the color indicator 330 to select a desired color in the color wheel 232. The interface 350 may include a color ribbon 234, and may include a brightness indicator 340 in the color ribbon 234. The user may adjust the position of the brightness indicator 340 to select a desired brightness in the color ribbon.
[0040] According to an exemplary implementation of the present disclosure, color data of the target color can be presented in the target area, where the color data may include at least any one of the following: a numerical representation of the target color, a color preview of the target color. Specifically, the interface 350 may include a numerical representation 310 of the selected target color. The numerical representation 310 may be represented in HEX format, for example; alternatively and / or additionally, the numerical representation may be represented in RGB (red, green, blue) format. Further, the interface 350 may include a color preview 320 of the selected target color. In this way, various details may be presented to the user, thereby facilitating the user to select a desired color in the color picker.
[0041] According to an exemplary implementation of the present disclosure, a user can select a desired color using a color indicator 330 and a brightness indicator 340. At this time, the numerical representation 310 will present the specific numerical value of the selected color, and the color preview 320 will present a preview of the selected color. Alternatively and / or additionally, the user can directly enter the specific numerical value of the target color in the numerical representation 310, at which time the color indicator 330 and the brightness indicator 340 will move to a suitable position corresponding to the specific numerical value for further operation by the user. The user can press the "OK" button to select the desired color, or can press the "Cancel" button to close the color picker. In this way, the color selection process can be provided to the user in a visual manner, thereby facilitating the user to set the desired object using the selected color.
[0042] According to an exemplary implementation of the present disclosure, the color picker described above can be called in different operation processes in a variety of application environments. For example, in the image processing process, the color picker can be called to select the desired target color, and the image can be processed using the target color (for example, coloring the image, etc.). For another example, in the text processing process, the target color can be used to display specific text, etc. In this way, it is convenient to call the color picker in a variety of application environments, and then complete specific tasks in each application environment.
[0043] Already seen Figure 3 The outline of the interface 350 of the color picker is described, and how to present each part in the interface 350 will be described separately below. It will be understood that the color can include three color channels of RGB, and each color channel has a minimum value of 0 and a maximum value of 255. At this time, there can be a large number of combinations of the three color channels, which results in the existence of 256*256*256 different colors. In the context of the present disclosure, a combination of a color wheel 232 and a color band 234 can be used to represent these candidate colors.
[0044] According to an exemplary implementation of the present disclosure, a color wheel 232 may be presented based on the determined radius 220. Specifically, the color wheel 232 may be divided into a plurality of sectors, and a portion of colors may be presented in each sector. Figure 4 A block diagram 400 of multiple sectors in a color wheel according to some implementations of the present disclosure is shown. Figure 4As shown, the color disk 232 may be divided into six sectors in an evenly divided manner: sectors 410, 420, 430, 440, 450, and 460. At this time, each sector may correspond to an angle of 360° / 6=60°, for example, sector 410 corresponds to a range of 0-60°, sector 420 corresponds to a range of 60-120°, sector 430 corresponds to a range of 120-180°, sector 440 corresponds to a range of 180-240°, sector 450 corresponds to a range of 240-300°, and sector 460 corresponds to a range of 300-360°.
[0045] The color of each point in each sector can be determined. For example, for a target sector among multiple sectors, the color of the target point can be determined based on the position of the target point in the target sector, and then the target point can be presented using the determined color. Using the exemplary implementation of the present disclosure, each position in the sector can correspond to a different color. In this way, multiple candidate colors can be presented within a limited sector range, thereby facilitating user selection.
[0046] According to an exemplary implementation of the present disclosure, the target point can be located at different positions in the sector, for example, the target point can be located at the vertex, endpoint, arc of the sector, or located inside the sector. Hereinafter, more details of determining the color of the target point at different positions will be described by taking sector 410 as an example. If the target point is located at vertex 470 of sector 410, the values of the three color channels of vertex 470 can be set to the same color extreme value.
[0047] It will be understood that the color extremes herein may include: a minimum value (e.g., represented by 0 in both decimal and hexadecimal) and a maximum value (e.g., represented by 255 in decimal and #FF in hexadecimal). Figure 4 As shown, the color of vertex 470 can be set to #FFFFFF (corresponding to (255, 255, 255) in decimal), and the color of vertex 470 is white. Alternatively and / or additionally, the color of vertex 470 can be set to #000000 (corresponding to (0, 0, 0) in decimal), and the color of vertex 470 is black. It will be understood that multiple sectors share the same vertex 470, and thus the colors of the vertices of other sectors are the same as the vertex color of sector 410.
[0048] Alternatively and / or additionally, if it is determined that the target point is located at the endpoint of the arc of the target sector, the values of the three color channels of the endpoints can be set to different color extremes. That is, at least one color channel has a maximum value, and at least one color channel has a minimum value. It will be understood that the target sector includes two endpoints, and the colors of the two endpoints can be set respectively. Specifically, for the first endpoint and the second endpoint of the arc of the target sector, the given color channels of the two endpoints can be set to opposite extremes, and the other two color channels are kept to have the same extremes. That is, the value of the given color channel of the first endpoint can be set to a maximum value, and the value of the given color channel of the second endpoint can be set to a minimum value.
[0049] For example, for sector 410, the color of endpoint 412 at the 0° position of the color wheel can be set to #FF0000 (i.e., pure red). The color of endpoint 422 can be set to #FFFF00, where the green channels of endpoints 412 and 422 are FF and 00 (i.e., have opposite extreme values), the red channels are both FF (i.e., have the same extreme value), and the blue channels are both 00 (i.e., have the same extreme value). Other sectors 420-460 can be processed in a similar manner to determine the color of each endpoint.
[0050] It will be understood that the colors of the various endpoints should not be repeated, so the existing colors should be considered when setting the endpoint colors of the next sector. Specifically, in the case where the color of endpoint 422 has been determined to be #FFFF00, the extreme value of the red channel can be flipped to determine the color of endpoint 432 to be #00FF00 (i.e., pure blue). Similarly, the color of endpoint 442 can be determined to be #00FFFF, the color of endpoint 452 can be determined to be #0000FF (i.e., pure green), and the color of endpoint 462 can be determined to be #FF00FF.
[0051] will understand, Figure 4 Only a specific example of color setting is schematically shown. Alternatively and / or additionally, the color of each endpoint can be determined based on other methods. Figure 4 The color disk 232 shown is rotated clockwise or counterclockwise by a predetermined angle (e.g., 60 degrees or other degrees), and a mirror operation can be performed on the color disk 232 to obtain a different color disk. Using the exemplary implementation of the present disclosure, a richer visualization form of the color disk can be provided, thereby facilitating the user to select a desired color.
[0052] According to an exemplary implementation of the present disclosure, when the colors of two endpoints of a given sector have been determined, the color of an edge point located at the arc position may be determined based on the colors of the two endpoints. Figure 5A block diagram 500 is shown for determining the color of edge points at arc positions of a sector according to some implementations of the present disclosure. Figure 5 As shown, sector 550 may be Figure 4 For any sector in the color disk, the vertex 470 of the sector 550 can be used as the origin of the polar coordinates, and the direction from the vertex 470 to the starting end point 522 of the sector 550 is used as the coordinate axis direction to establish a polar coordinate system. Assuming that the radius of the color disk is R, the edge point 530 at the arc 510 can be expressed as (R, α).
[0053] It will be understood that the color of the edge point at the arc 510 gradually changes along the arc 510 from the start endpoint 522 to the end endpoint 520. In other words, when the edge point 530 is located at the start endpoint 522, the color of the edge point 530 is the same as the color of the start endpoint 522; as the edge point 530 gradually moves toward the end endpoint 520, the color of the edge point 530 will gradually change to the color of the end endpoint 520. At this time, the color of the edge point 530 can be determined in an interpolation manner based on the arc distance between the edge point 530 and the start endpoint 522 and the ratio of the arc distance between the edge point 530 and the end endpoint 520.
[0054] Since the arc distance is proportional to the angle of the arc, for the edge point 530 at the position of the arc 510, the color of the edge point 530 can be determined based on the color of the start endpoint 522, the color of the end endpoint 520, and the angle 540 of the edge point 530 in the sector 550. Here, the angle of the sector 550 is 60°, and the angle 540 can represent the angle between the line segment between the edge point 530 and the vertex 470 and the start side of the sector 550. In this way, the process of determining the color of the edge point 530 can be converted into a simple mathematical calculation, so that the color of the edge point can be determined in a fast and accurate manner.
[0055] In the case where the color of the edge point 530 at the position of the arc 510 has been determined, the color of the internal point inside the sector 550 may be further determined. According to an exemplary implementation of the present disclosure, if it is determined that the target point is located within the target sector, the edge point at the arc corresponding to the angle may be determined based on the angle of the target point in the target sector, and then the color of the target point may be determined based on the distance between the target point and the vertex of the target sector, the radius (for example, based on the ratio between the distance and the radius), the color of the edge point, and the color of the vertex.
[0056] See also Figure 6 Describe in more detail the Figure 6 A block diagram 600 is shown for determining the color of interior points within a sector according to some implementations of the present disclosure. Figure 6As shown, for an internal point 610 within a sector 550 (for example, within a line segment between an edge point 530 and a vertex 470), the angle of the internal point 610 within the sector 550 can be determined, that is, the angle between the line segment between the internal point 610 and the vertex 470 and the starting edge of the sector 550. Further, the distance d between the internal point 610 and the vertex 470 can be determined, and in this case, the internal point 610 can be expressed as (d, α). At this time, the color of the internal point 610 can be determined in an interpolated manner based on the ratio d / R between the distance d and the radius R of the color disk. That is, the color of the internal point 610 can be determined in an interpolated manner based on the ratio, the color of the vertex 470, and the color of the edge point 530.
[0057] In other words, when the internal point 610 is located at the vertex 470, the color of the internal point 610 is the same as the color of the vertex 470; as the internal point 610 gradually moves toward the edge point 530, the color of the internal point 610 will gradually change to the color of the edge point 530. At this time, the magnitude of the change is proportional to the distance 620. In this way, the process of determining the color of the internal point 610 can be converted into a simple mathematical calculation, so that the color of the edge point can be determined in a fast and accurate manner.
[0058] It will be understood that, although the above only describes the process of determining the color of any point at any position within the sector 550 by taking the sector 550 as an example. The sector 550 may be any sector of the plurality of sectors of the color disk 232. The color value of any point in each sector may be determined based on the manner described above. Specifically, a polar coordinate system may be established based on the vertices and the start endpoint of the sector to be processed, and the color of any point at any position within the sector to be processed may be determined based on the colors of the vertices, the start endpoint, and the end endpoint.
[0059] It will be understood that although the specific process of determining the color of each target point in the color disk is shown above in polar coordinates. The polar coordinate system can be converted into a screen coordinate system (e.g., a Cartesian coordinate system) for displaying the color picker. At this time, the horizontal coordinates and vertical coordinates of each target point can be determined, and the color determined by the method described above can be presented at the corresponding position. It will be understood that in the process of determining the color, the calculation results can be stored based on floating point numbers (or higher precision representations). As a result, the color disk 232 can present a variety of candidate colors in a clearer and more accurate manner.
[0060] Having described the process of presenting the color wheel, further, the color specified by the color indicator 330 in the color wheel 232 can be used to present the color strip 234 based on the length 222 of the color strip 234. At this time, the brightness of the color in the color strip 232 can change along the length direction, for example, from a maximum value to a minimum value (or from a minimum value to a maximum value). Using the exemplary implementation of the present disclosure, the user can adjust the brightness of the color selected in the color wheel based on the brightness indicator 340 in the color strip 232. In this way, a richer color adjustment method can be provided to the user, thereby facilitating the user to select a desired color in a more flexible and effective manner.
[0061] According to an exemplary implementation of the present disclosure, a user's adjustment of the brightness indicator 340 may be detected. In the case of receiving an adjustment of the brightness indicator 340 in the color band 234, the color wheel may be adjusted based on the brightness specified by the adjusted brightness indicator 340. Specifically, the adjustment range of the brightness indicator 340 may be 0-255. At this time, the color of each position in the color wheel 232 may be adjusted based on the ratio between the value of the brightness indicator 340 and the adjustment range.
[0062] Figure 7 A block diagram 700 for adjusting the position of a brightness indicator according to some implementations of the present disclosure is shown. Figure 7 As shown, interface 710 shows the color picker when the value of the brightness indicator is "201". Figure 3 The value of the brightness indicator shown is 255, which is the interface 350 of the color picker. The color of the color disk in the interface 710 is darker, and the color at the center of the color disk where the color indicator is located changes from (255, 255, 255) (white) to (201, 201, 201) (gray). Further, the interface 720 shows the color picker when the value of the brightness indicator is "19". At this time, the color of the color disk in the interface 720 is close to black, and the color at the center of the color disk where the color indicator is located is (19, 19, 19). When the brightness indicator is slid to the "0" position, the color of the color disk will be pure black.
[0063] With the exemplary implementation of the present disclosure, the user can use the brightness indicator to present more colors in the color wheel 232. In the process of the value of the brightness indicator changing from "0" to "255", the color wheel 232 can present 256*256*256 candidate colors. In this way, a rich variety of candidate colors can be presented to the user in a visual manner, so that it is convenient for the user to select a desired color.
[0064] According to an exemplary implementation of the present disclosure, a user may adjust a color indicator in a color wheel and a brightness indicator in a color band to determine a desired color. Figure 8 A block diagram 800 is shown for adjusting the position of a color indicator and a brightness indicator according to some implementations of the present disclosure. Figure 8 As shown, the color indicator 330 and the brightness indicator 340 are located at the positions shown. At this time, the color preview 320 shows the target color selected by the color indicator 330 and the brightness indicator 340, and the numerical representation 310 shows the specific numerical value of the target color. In this way, it is convenient for the user to understand more information about the target color, thereby providing more assistance for color selection.
[0065] For example, the user may first adjust the color indicator 330, and then adjust the brightness indicator 340 to obtain the desired color. For another example, the user may first adjust the brightness indicator 340, and multiple colors that meet the desired brightness are presented in the color wheel, and then the user may adjust the color indicator 330 to select. For another example, the user may adjust the color indicator 330 and the brightness indicator 340 multiple times in any order, and then select a color that meets the desired color.
[0066] It will be appreciated that the process of determining the color specified by the color indicator 330 is the same as the process of determining the color of a point in the color wheel described above. Specifically, based on the screen coordinates of the color indicator 330, it can be determined which sector of the color wheel the screen coordinates are in. Then, the polar coordinate representation (d, α) of the screen coordinates in the sector can be determined using the method described above. Then, the polar coordinate representation (d, α), the vertex colors of the sector, and the colors of the two endpoints can be used to determine the corresponding color.
[0067] According to an exemplary implementation of the present disclosure, the user may input a numerical representation of the target color into the numerical representation 310. When the numerical representation of the target color is received, the brightness indicator 340 and the color indicator 330 may be presented at appropriate positions based on the numerical representation of the target color. Fig. 9 A block diagram 900 is shown for presenting a target color based on a numerical representation of the target color according to some implementations of the present disclosure. Fig. 9 In the illustrated interface 910, the user may input a numerical representation of the target color (167, 97, 64), at which time a color indicator 330 may be presented in the color wheel 232, and a brightness indicator 340 may be presented in the color band 234. It will be appreciated that, although the above description describes a case where the numerical representation input by the user is in RGB format, alternatively and / or additionally, the user may input a numerical representation in HEX format.
[0068] Specifically, the first position of the brightness indicator 340 in the color strip 234 and the second position of the color indicator 330 in the color wheel 232 may be determined. Then, the brightness indicator 340 may be presented at the first position, and the color indicator 330 may be presented at the second position. In this way, it may be convenient for the user to view various colors in a more intuitive manner, thereby facilitating the selection of a desired color.
[0069] In the following, see Fig.10 Describes how to determine the position of the brightness indicator 340, the Fig.10 A block diagram 1000 is shown for determining a position of a brightness indicator based on a numerical representation of a target color according to some implementations of the present disclosure. Fig.10 As shown, a numerical representation 1010 (e.g., (167, 97, 64) represented in RGB format) can be received, and corresponding numerical values of three color channels of the numerical representation can be determined (e.g., numerical value 1020 for the red channel, numerical value 1022 for the green channel, and numerical value 1024 for the blue channel).
[0070] Further, the maximum color channel 1030 having the maximum value may be selected from the numerical representation of the target color. In the case where the numerical representation is (167, 97, 64), the red channel is the color channel having the maximum value. At this time, the position of the brightness indicator 340 may be determined based on the ratio of the maximum value to the range of the maximum color channel 1030. At this time, the ratio may be determined to be 167 / 256. Then, the brightness indicator 340 may be presented at a position corresponding to the ratio. Fig. 9 As shown, brightness indicator 340 may be presented at the "167 / 256" (approximately two-thirds) position of the color bar.
[0071] According to an exemplary implementation of the present disclosure, in order to determine the position of the color indicator 330, the conversion color corresponding to the numerical representation of the target color can be first determined based on the ratio of the maximum value to the extreme value. In other words, the value "167" of the red channel in the color value (167, 97, 64) can be enlarged to 255, and the values of other channels can be enlarged accordingly. At this time, the value of the red channel is enlarged to 255, the value of the green channel is enlarged to 97*255 / 167=148.113, and the value of the blue channel is enlarged to 64*255 / 167=97.724. At this time, the color value (167, 97, 64) is enlarged to the conversion color (255, 148.113, 97.724).
[0072] Furthermore, the converted color can be compared with the color range of each sector in the color wheel to determine in which sector the converted color is located. Fig.11 Showing more details, the Fig.11 A block diagram 1100 is shown for determining the position of a color indicator based on a numerical representation of a target color according to some implementations of the present disclosure. Based on the maximum value in the converted color, it can be determined that the angle value range between the position of the target pixel in the color wheel and the line connecting the center of the circle is in the positive direction of (R, R) to (2R, R). At this time, based on the converted color (255, 148.113, 97.724), it can be determined that the target pixel is in the range of (0°, 60°) or (300°, 360°). That is, Fig.11 As shown, the target pixel is located within sector 410 or sector 460 .
[0073] Then, the position of the target pixel in the above-mentioned sector range can be determined. Specifically, the distance between the second position and the vertex 470 can be determined based on the minimum value in the numerical representation of the converted color. It will be understood that when moving along the radius from the arc 1150 toward the vertex 470, the values of the three color channels will approach 0xFF proportionally. The value of at least one color channel of the point at the arc 1150 is 0xFF, while the value of another color channel is 0x00. When changing proportionally toward 0xFF, the value of the color channel with the smallest value changes from 0x00 to 0xFF. Assuming that the radius R of the color disk is 200, the distance from the position of the target color to the vertex 470 can be calculated proportionally, In the above formula, (min(R,G,B) represents the minimum value in RGB.
[0074] Further, the angle of the second position in the sector can be determined based on the intermediate value in the numerical representation of the target color. It will be understood that for the value of the color channel with the intermediate value, the color value of the intersection of the current extension line and the arc can be calculated by the current change ratio, that is, In the above formula, (mid(R,G,B) represents the middle value in RGB.
[0075] According to the current extension line, based on the edge point 1140 located at the arc and combined with the determined sector range, a proportionally changing angle can be determined. That is, at this time, the target pixel is located within sector 410, and angle 1130 is α=19.223°. At this time, the position of the target pixel in the color disk can be determined to be (d, α), where d=123.354, and α=19.223°. At this time, target point 1110 is a pixel corresponding to the target color. It will be understood that although the various angles in the calculation process are shown above in angle format, alternatively and / or additionally, the radian format can be used to represent the angle. When expressed in radians, α=0.335.
[0076] Using the exemplary implementation of the present disclosure, the process of determining the position of the brightness indicator and the color indicator corresponding to the numerical representation of the user input can be converted into the mathematical operation described above. In this way, the position of the color indicator and the brightness indicator can be determined based on the numerical representation of the user input in a fast and efficient manner.
[0077] It will be understood that although the above text describes the position of the color indicator and the brightness indicator by taking the target color in RGB format input by the user as an example. Alternatively and / or additionally, the user can input the target color in HEX format, in which case the target color in HEX format can be converted into RGB format, and then the processing is performed based on a method similar to the above. It will be understood that although the process of presenting the color picker is described above by taking the target area as a vertical rectangular area as an example, alternatively and / or additionally, the target area 230 can be a horizontal rectangular area. At this time, a color disk can be presented on the left side of the target area 230, and a color bar can be presented in a vertical direction on the right side of the target area 230.
[0078] According to an exemplary implementation of the present disclosure, the radius of the color disk and the length of the color band in the color picker can be determined according to the dimension 210 of the target area 230. In this way, the color picker can be presented in an appropriate size and provided in a clearer and more accurate manner, thereby improving the efficiency of the user in selecting the target color.
[0079] Example Process
[0080] Fig.12 A flow chart of a method 1200 for managing a color picker according to some implementations of the present disclosure is shown. At box 1210, dimensions of a target area for presenting a color picker are obtained, the color picker includes a color wheel and a color ribbon, the color wheel is used to represent color information of multiple candidate colors, and the color ribbon is used to represent brightness information of multiple candidate colors. At box 1220, a radius of the color wheel and a length of the color ribbon are determined based on the dimensions of the target area. At box 1230, in the target area, the color wheel is presented based on the radius. At box 1240, in the target area, the color ribbon is presented based on the length.
[0081] According to an exemplary implementation of the present disclosure, presenting a color wheel based on a radius includes: determining a color of a target point in a target sector among multiple sectors in the color wheel based on a position of the target point in the target sector; and presenting the target point based on the determined color.
[0082] According to an exemplary implementation of the present disclosure, determining the color of a target point includes at least any one of the following: in response to determining that the target point is located at a vertex of a target sector, setting the values of three color channels of the vertex to the same color extreme value; in response to determining that the target point is located at an end point of an arc of the target sector, setting the values of the three color channels of the end point to different color extreme values, wherein the color extreme values include a maximum value and a minimum value.
[0083] According to an exemplary implementation of the present disclosure, setting the values of the three color channels of the endpoints to different color extremes includes: for the first endpoint and the second endpoint of the arc of the target sector, setting the value of the given color channel of the first endpoint to a maximum value, and setting the value of the given color channel of the second endpoint to a minimum value.
[0084] According to an exemplary implementation of the present disclosure, determining the color of the target point further includes: in response to determining that the target point is located in an arc of a target sector, determining the color of the target point based on the color of the first endpoint, the color of the second endpoint, and the angle of the target point in the target sector.
[0085] According to an exemplary implementation of the present disclosure, determining the color of the target point further includes: in response to determining that the target point is located within the target sector, based on the angle of the target point in the target sector, determining the edge point at the arc corresponding to the angle; determining the color of the target point based on the distance between the target point and the vertex of the target sector, the radius, the color of the edge point, and the color of the vertex of the target sector.
[0086] According to an exemplary implementation of the present disclosure, presenting a color band includes presenting the color band based on the length using the color specified by the color indicator in the color wheel, and the brightness of the color in the color band changes from a maximum value to a minimum value along the length direction.
[0087] According to an exemplary implementation of the present disclosure, the method further includes: in response to receiving an adjustment to a brightness indicator in the color band, adjusting the color wheel based on the brightness specified by the adjusted brightness indicator.
[0088] According to an exemplary implementation of the present disclosure, the method further includes: determining a target color specified by a color indicator in a color wheel and a brightness indicator in a color band; and presenting color data of the target color in a target area, the color data including at least any one of the following: a numerical representation of the target color, a color preview of the target color.
[0089] According to an exemplary implementation of the present disclosure, the method further includes: in response to receiving a numerical representation of a target color input by a user, determining a first position of a brightness indicator in a color band and a second position of a color indicator in a color wheel based on the numerical representation of the target color; and presenting the brightness indicator at the first position and presenting the color indicator at the second position.
[0090] According to an exemplary implementation of the present disclosure, determining the first position includes: selecting a first color channel having a maximum value from the numerical representation of the target color; and determining the first position based on a ratio of the maximum value to a range of the first color channel.
[0091] According to an exemplary implementation of the present disclosure, determining the second position includes: determining a conversion color corresponding to the numerical representation of the target color based on the ratio of the maximum value to the maximum value of the first color channel, the first color channel of the conversion color having a maximum value; determining a group of sectors corresponding to the conversion color from a plurality of sectors of a color wheel; and determining a second position of the numerical representation of the target color in the group of sectors.
[0092] According to an exemplary implementation of the present disclosure, determining a second position of the numerical representation of a target color in a set of sectors includes: determining a distance between the second position and a vertex of a set of sectors based on a minimum numerical value in the numerical representation of the converted color; and determining an angle of the second position in a set of sectors based on an intermediate numerical value in the numerical representation of the converted color.
[0093] According to an exemplary implementation of the present disclosure, the target sector is any sector among the six sectors into which the color disk is evenly divided.
[0094] According to an exemplary implementation of the present disclosure, the method further includes: using the target color to set an object, the object including an image and text.
[0095] Example devices and equipment
[0096] Fig.13 A block diagram of an apparatus 1300 for managing a color picker according to some implementations of the present disclosure is shown. The apparatus 1300 includes: an acquisition module 1310 configured to acquire the dimension of a target area for presenting a color picker, the color picker includes a color plate and a color band, the color plate is used to represent the color information of multiple candidate colors, and the color band is used to represent the brightness information of multiple candidate colors; a determination module 1320 configured to determine the radius of the color plate and the length of the color band based on the dimension of the target area; a color plate presentation module 1330 configured to present the color plate based on the radius in the target area; and a color band presentation module 1340 configured to present the color band based on the length in the target area.
[0097] According to an exemplary implementation of the present disclosure, a color wheel presentation module includes: a color determination module configured to determine the color of a target point in a target sector among multiple sectors in the color wheel based on the position of the target point in the target sector; and a target point presentation module configured to present the target point based on the determined color.
[0098] According to an exemplary implementation of the present disclosure, a color determination module includes: a vertex color determination module, configured to set the values of three color channels of the vertex to the same color extreme value in response to determining that the target point is located at the vertex of the target sector; an endpoint color determination module, configured to set the values of the three color channels of the endpoint to different color extreme values in response to determining that the target point is located at the endpoint of an arc of the target sector, wherein the color extreme values include a maximum value and a minimum value.
[0099] According to an exemplary implementation of the present disclosure, an endpoint color determination module is configured to include: an endpoint color setting module, configured to set the numerical value of a given color channel of the first endpoint to a maximum value and set the numerical value of a given color channel of the second endpoint to a minimum value for the first endpoint and the second endpoint of the arc of the target sector.
[0100] According to an exemplary implementation of the present disclosure, the color determination module is configured to further include: an arc color determination module is configured to determine the color of the target point in response to determining that the target point is located in the target sector of the arc, based on the color of the first endpoint, the color of the second endpoint, and the angle of the target point in the target sector.
[0101] According to an exemplary implementation of the present disclosure, the color determination module further includes: an edge point color determination module, configured to determine, in response to determining that the target point is located within the target sector, an edge point at an arc corresponding to the angle based on the angle of the target point in the target sector; an internal point color determination module, configured to determine the color of the target point based on the distance between the target point and the vertex of the target sector, the radius, the color of the edge point, and the color of the vertex of the target sector.
[0102] According to an exemplary implementation of the present disclosure, a color band presentation module includes: a color band color presentation module, configured to present a color band based on length using a color specified by a color indicator in a color wheel, and the brightness of the color in the color band varies from a maximum value to a minimum value along the length direction.
[0103] According to an exemplary implementation of the present disclosure, the apparatus further includes: an adjustment module configured to adjust the color wheel based on the brightness specified by the adjusted brightness indicator in response to receiving an adjustment to the brightness indicator in the color band.
[0104] According to an exemplary implementation of the present disclosure, the device further includes: a target color determination module, configured to determine a target color specified by a color indicator in a color wheel and a brightness indicator in a color band; and a target color presentation module, configured to present color data of the target color in a target area, the color data including at least any one of the following: a numerical representation of the target color, a color preview of the target color.
[0105] According to an exemplary implementation of the present disclosure, the device further includes: a position determination module, configured to determine, in response to receiving a numerical representation of a target color input by a user, a first position of a brightness indicator in a color band and a second position of a color indicator in a color wheel based on the numerical representation of the target color; and an indicator presentation module, configured to present a brightness indicator at a first position and a color indicator at a second position.
[0106] According to an exemplary implementation of the present disclosure, the position determination module includes: a selection module configured to select a first color channel with a maximum value from the numerical representation of the target color; and a first position determination module configured to determine a first position based on a ratio of the maximum value to a range of the first color channel.
[0107] According to an exemplary implementation of the present disclosure, a position determination module includes: a conversion color determination module, configured to determine a conversion color corresponding to a numerical representation of a target color based on a ratio of a maximum value to a maximum value of a first color channel, wherein the first color channel of the conversion color has a maximum value; a sector determination module, configured to determine a group of sectors corresponding to the conversion color from a plurality of sectors of a color wheel; and a sector-based position determination module, configured to determine a second position of the numerical representation of the target color in a group of sectors.
[0108] According to an exemplary implementation of the present disclosure, a sector-based position determination module includes: a distance determination module configured to determine the distance between a second position and a vertex of a group of sectors based on a minimum value in a numerical representation of a converted color; and an angle determination module configured to determine the angle of the second position in a group of sectors based on an intermediate value in a numerical representation of a converted color.
[0109] According to an exemplary implementation of the present disclosure, the target sector is any sector among the six sectors into which the color disk is evenly divided.
[0110] According to an exemplary implementation of the present disclosure, the device further includes: an object setting module configured to set an object using a target color, the object including an image and text.
[0111] Fig.141400 is a block diagram of a device capable of implementing multiple implementations of the present disclosure. It should be understood that Fig.14 The computing device 1400 shown is merely exemplary and should not constitute any limitation on the functionality and scope of the implementations described herein. Fig.14 The computing device 1400 shown may be used to implement the methods described above.
[0112] like Fig.14 As shown, computing device 1400 is in the form of a general-purpose computing device. Components of computing device 1400 may include, but are not limited to, one or more processors or processing units 1410, memory 1420, storage device 1430, one or more communication units 1440, one or more input devices 1450, and one or more output devices 1460. Processing unit 1410 may be an actual or virtual processor and is capable of performing various processes according to a program stored in memory 1420. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to increase the parallel processing capabilities of computing device 1400.
[0113] The computing device 1400 typically includes a plurality of computer storage media. Such media may be any available media accessible to the computing device 1400, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 1420 may be a volatile memory (e.g., registers, caches, random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 1430 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and / or data (e.g., training data for training) and may be accessed within the computing device 1400.
[0114] The computing device 1400 may further include additional removable / non-removable, volatile / non-volatile storage media. Fig.14 As shown in , a disk drive for reading or writing from a removable, non-volatile disk (e.g., a "floppy disk") and an optical drive for reading or writing from a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to the bus (not shown) by one or more data media interfaces. Memory 1420 may include a computer program product 1425 having one or more program modules that are configured to perform various methods or actions of various implementations of the present disclosure.
[0115] The communication unit 1440 enables communication with other computing devices via a communication medium. Additionally, the functions of the components of the computing device 1400 can be implemented in a single computing cluster or multiple computing machines that can communicate via a communication connection. Therefore, the computing device 1400 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
[0116] Input device 1450 may be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 1460 may be one or more output devices, such as a display, speaker, printer, etc. Computing device 1400 may also communicate with one or more external devices (not shown) through communication unit 1440 as needed, such as storage devices, display devices, etc., communicate with one or more devices that allow a user to interact with computing device 1400, or communicate with any device that allows computing device 1400 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).
[0117] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, the computer program product is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is provided, on which a computer program is stored, and when the program is executed by a processor, the method described above is implemented.
[0118] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices, equipment, and computer program products implemented according to the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0119] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0120] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0121] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple implementations of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification. In some implementations as replacements, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.
[0122] The above descriptions of various implementations of the present disclosure are exemplary, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described implementations. The selection of terms used herein is intended to best explain the principles of the implementations, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the various implementations disclosed herein.
Claims
1. A method for managing a color picker, comprising: Acquire a dimension of a target area for presenting the color picker, wherein the color picker includes a color wheel and a color band, wherein the color wheel is used to represent color information of a plurality of candidate colors, and the color band is used to represent brightness information of the plurality of candidate colors; Determining the radius of the color disk and the length of the color band based on the dimension of the target area; In the target area, presenting the color disk based on the radius; as well as In the target area, the color band is presented based on the length.
2. The method of claim 1 , wherein presenting the color wheel based on the radius comprises: For a target sector among the multiple sectors in the color disk, determining the color of the target point based on the position of the target point in the target sector; as well as The target point is presented based on the determined color.
3. The method according to claim 2, wherein determining the color of the target point comprises at least any one of the following: In response to determining that the target point is located at a vertex of the target sector, setting values of three color channels of the vertex to the same color extreme value; In response to determining that the target point is located at an end point of the arc of the target sector, setting the values of the three color channels of the end point to different color extremes, The color extreme values include maximum values and minimum values.
4. The method according to claim 3, wherein setting the values of the three color channels of the endpoints to different color extremes comprises: For the first endpoint and the second endpoint of the arc of the target sector, the value of the given color channel of the first endpoint is set to a maximum value, and the value of the given color channel of the second endpoint is set to a minimum value.
5. The method of claim 4, wherein determining the color of the target point further comprises: In response to determining that the target point is located in an arc of the target sector, a color of the target point is determined based on a color of the first endpoint, a color of the second endpoint, and an angle of the target point in the target sector.
6. The method of claim 5, wherein determining the color of the target point further comprises: In response to determining that the target point is located within the target sector, Based on the angle of the target point in the target sector, determining an edge point at the arc corresponding to the angle; The color of the target point is determined based on the distance between the target point and the vertices of the target sector, the radius, the colors of the edge points, and the colors of the vertices of the target sector.
7. The method of claim 1 , wherein presenting the color band comprises: The color band is presented based on the length using the color specified by the color indicator in the color wheel, and the brightness of the color in the color band changes from a maximum value to a minimum value along the direction of the length.
8. The method according to claim 1, further comprising: In response to receiving an adjustment to a brightness indicator in the color bar, the color wheel is adjusted based on a brightness specified by the adjusted brightness indicator.
9. The method according to claim 1, further comprising: determining a target color specified by a color indicator in the color wheel and a brightness indicator in the color band; as well as Color data of the target color is presented in the target area, and the color data includes at least any one of the following: a numerical representation of the target color and a color preview of the target color.
10. The method according to claim 9, further comprising: In response to receiving a user input of a numerical representation of the target color, Based on the numerical representation of the target color, determining a first position of the brightness indicator in the color band and a second position of the color indicator in the color wheel; as well as The brightness indicator is presented at the first position and the color indicator is presented at the second position.
11. The method of claim 10, wherein determining the first position comprises: selecting a first color channel having a maximum value from the numerical representation of the target color; as well as The first position is determined based on a ratio of the maximum value to a range of the first color channel.
12. The method of claim 11, wherein determining the second position comprises: determining, based on a ratio of the maximum value to a maximum value of the first color channel, a converted color corresponding to the numerical representation of the target color, the first color channel of the converted color having a maximum value; Determining a set of sectors corresponding to the converted color from a plurality of sectors of the color wheel; and The numerical value of the target color is determined to represent the second position in the set of sectors.
13. The method of claim 12, wherein determining the second position of the numerical representation of the target color in the set of sectors comprises: determining a distance between the second position and a vertex of the set of sectors based on a minimum value in the numerical representation of the converted color; An angle of the second position within the set of sectors is determined based on an intermediate value in the numerical representation of the converted color.
14. The method according to claim 2, wherein the target sector is any one of six sectors into which the color disk is evenly divided.
15. The method according to claim 9, further comprising: The target color is used to set an object, wherein the object includes an image and text.
16. A device for managing a color picker, comprising: an acquisition module configured to acquire a dimension of a target area for presenting the color picker, the color picker comprising a color wheel and a color band, the color wheel being used to represent color information of a plurality of candidate colors, and the color band being used to represent brightness information of the plurality of candidate colors; a determination module configured to determine the radius of the color disk and the length of the color band based on the dimension of the target area; a color disk presentation module configured to present the color disk in the target area based on the radius; as well as The color band presenting module is configured to present the color band in the target area based on the length.
17. An electronic device comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 15 when executed by the at least one processing unit.
18. A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to implement the method according to any one of claims 1 to 15.
