Color adjusting method and device, equipment, medium and program product
Through the user's finger sliding gesture operation, the color can be adjusted in real time, which solves the problem of low efficiency of color setting by mouse operation, realizes intuitive and dynamic color adjustment, and improves the accuracy and efficiency of color adjustment.
Patent Information
- Application Number
- CN202410865079.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-01
AI Technical Summary
In color setting scenarios such as software development and system interfaces, color setting through mouse operations is less accurate and efficient, making settings cumbersome and error-prone.
Through the user's finger sliding gesture operation, the three primary colors and grayscale adjustment values of the initial color are determined, the color is adjusted in real time, and the corresponding relationship between the finger and the color and the sliding distance are used to adjust the color to achieve intuitive and dynamic color adjustment.
It improves the efficiency and accuracy of color adjustment and reduces the possibility of operational errors. Users can intuitively see real-time color changes, which significantly improves efficiency especially during fine adjustments.
Smart Images

Figure CN118732916A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a color adjustment method, device, equipment, medium and program product. Background Art
[0002] Currently, in color setting scenarios such as software development and system interfaces, color settings are usually performed by clicking or dragging the mouse. Users need to click accurately to set the color. The mouse operation method is often clumsy and not sensitive enough, making settings more cumbersome, error-prone and inefficient. Summary of the invention
[0003] The embodiments of the present application provide a color adjustment method, device, equipment, medium and product to solve the technical problem of low accuracy and low efficiency in the related art of color setting by mouse operation.
[0004] In a first aspect, an embodiment of the present application provides a color adjustment method, the method comprising:
[0005] Determine the initial color of the target object to be adjusted;
[0006] Get the user's finger sliding gesture operation;
[0007] Determining at least one color to be adjusted among the three primary colors of the initial color and a grayscale adjustment value of the color to be adjusted according to the finger sliding gesture operation of the user;
[0008] The initial color is adjusted according to the color to be adjusted and the grayscale adjustment value to obtain a target color.
[0009] Optionally, before acquiring the user's finger sliding gesture operation, the method further includes:
[0010] Pre-storing a first correspondence between a color finger and a color, and determining a color adjustment finger;
[0011] In the case where the finger sliding gesture operation is that the color adjustment finger contacts one of the color fingers and slides along the starting point of the color finger,
[0012] The determining, according to the finger sliding gesture operation of the user, at least one color to be adjusted in the initial colors and the grayscale adjustment value of the color to be adjusted comprises:
[0013] Determine the color corresponding to one of the color fingers in contact with the color adjustment finger as the color to be adjusted;
[0014] The grayscale adjustment value of the color to be adjusted is determined according to the sliding condition of the color adjustment finger along the starting point of the color finger.
[0015] Optionally, determining the grayscale adjustment value of the color to be adjusted according to the sliding condition of the color adjustment finger along the starting point of the color finger includes:
[0016] When the color adjustment finger slides along the starting point of the color finger in the first direction and / or the second direction and the sliding stops, determining the grayscale adjustment value of the color to be adjusted according to the contact point between the color adjustment finger and the color finger when the sliding stops;
[0017] Among them, the size of the grayscale adjustment value is proportional to the distance from the contact point to the starting point, the first direction is opposite to the second direction, and when sliding in the first direction, the grayscale adjustment value is a positive value, and when sliding in the second direction, the grayscale adjustment value is a negative value.
[0018] Optionally, adjusting the initial color according to the color to be adjusted and the grayscale adjustment value to obtain a target color includes:
[0019] Determining the initial grayscale value of each color to be adjusted respectively;
[0020] Adding the initial grayscale value of each color to be adjusted to the corresponding grayscale adjustment value to obtain an adjusted grayscale value;
[0021] Each adjusted grayscale value is mixed to obtain the target color.
[0022] Optionally, when the initial color is adjusted according to the color to be adjusted and the grayscale adjustment value to obtain a target color, the method further includes:
[0023] Recording a three-dimensional scatter plot, wherein each three-dimensional scatter point in the three-dimensional scatter plot is used to record a grayscale value after adjustment and a grayscale value before adjustment, and a target color after adjustment and a target color before adjustment;
[0024] After adjusting the initial color according to the color to be adjusted and the grayscale adjustment value to obtain a target color, the method further includes:
[0025] Based on the three-dimensional scatter plot, when the color adjustment finger contacts the color finger and slides along the color finger in a third direction, the adjusted grayscale value corresponding to the color finger is returned to the grayscale value before adjustment; and / or,
[0026] Based on the three-dimensional scatter plot, when the color adjustment finger contacts the palm where the color finger is located and slides along a fourth direction, the adjusted target color is returned to the target color before adjustment.
[0027] Optionally, before acquiring the user's finger sliding gesture operation, the method further includes:
[0028] Determining a transparency adjustment finger; wherein the transparency adjustment finger is used to adjust the transparency value of the target color;
[0029] After adjusting the initial color according to the color to be adjusted and the grayscale adjustment value to obtain a target color, the method further includes:
[0030] When the color adjustment finger contacts the transparency adjustment finger and slides along the starting point of the transparency adjustment finger, and when the sliding stops, the transparency value of the target color is determined according to the distance from the contact point between the color adjustment finger and the transparency adjustment finger to the starting point when the sliding stops;
[0031] According to the transparency value of the target color, set the transparency of the target color;
[0032] The transparency value is proportional to the distance from the contact point to the starting point.
[0033] In a second aspect, an embodiment of the present application provides a color adjustment device, the device comprising:
[0034] A determination module, used to determine the initial color of the target object to be adjusted;
[0035] An execution module is used to obtain the user's finger sliding gesture operation;
[0036] Determining at least one color to be adjusted among the initial colors and a grayscale adjustment value of the color to be adjusted according to the finger sliding gesture operation of the user;
[0037] The initial color is adjusted according to the color to be adjusted and the grayscale adjustment value to obtain a target color.
[0038] Optionally, the execution module is further used to pre-store a first correspondence between a color finger and a color, and determine a color adjustment finger before acquiring a finger sliding gesture operation of the user;
[0039] In the case where the finger sliding gesture operation is that the color adjustment finger contacts one of the color fingers and slides along the starting point of the color finger, the execution module is further used to determine the color corresponding to the one of the color fingers contacting the color adjustment finger as the color to be adjusted;
[0040] The grayscale adjustment value of the color to be adjusted is determined according to the sliding condition of the color adjustment finger along the starting point of the color finger.
[0041] Optionally, the execution module is further configured to determine the grayscale adjustment value of the color to be adjusted according to the contact point between the color adjustment finger and the color finger when the sliding stops, when the color adjustment finger slides in the first direction and / or the second direction along the starting point of the color finger and the sliding stops;
[0042] Among them, the size of the grayscale adjustment value is proportional to the distance from the contact point to the starting point, the first direction is opposite to the second direction, and when sliding in the first direction, the grayscale adjustment value is a positive value, and when sliding in the second direction, the grayscale adjustment value is a negative value.
[0043] Optionally, the execution module is further used to respectively determine the initial grayscale value of each color to be adjusted;
[0044] Adding the initial grayscale value of each color to be adjusted to the corresponding grayscale adjustment value to obtain an adjusted grayscale value;
[0045] Each adjusted grayscale value is mixed to obtain the target color.
[0046] Optionally, the execution module is further used to record a three-dimensional scatter plot when the initial color is adjusted according to the color to be adjusted and the grayscale adjustment value to obtain a target color, wherein each three-dimensional scatter point in the three-dimensional scatter plot is used to record the grayscale value after adjustment and the grayscale value before adjustment, and the target color after adjustment and the target color before adjustment;
[0047] The execution module is further configured to adjust the initial color according to the color to be adjusted and the grayscale adjustment value to obtain a target color, and based on the three-dimensional scatter plot, when the color adjustment finger contacts the color finger and slides along the color finger in a third direction, return the adjusted grayscale value corresponding to the color finger to the grayscale value before adjustment; and / or,
[0048] Based on the three-dimensional scatter plot, when the color adjustment finger contacts the palm where the color finger is located and slides along a fourth direction, the adjusted target color is returned to the target color before adjustment.
[0049] Optionally, the execution module is further used to determine a transparency adjustment finger before acquiring the user's finger sliding gesture operation; wherein the transparency adjustment finger is used to adjust the transparency value of the target color;
[0050] The execution module is further configured to, after adjusting the initial color according to the color to be adjusted and the grayscale adjustment value to obtain a target color, determine the transparency value of the target color according to the distance from the contact point between the color adjustment finger and the transparency adjustment finger to the starting point when the sliding stops, when the color adjustment finger contacts the transparency adjustment finger and slides along the starting point of the transparency adjustment finger when the sliding stops;
[0051] According to the transparency value of the target color, set the transparency of the target color;
[0052] The transparency value is proportional to the distance from the contact point to the starting point.
[0053] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of a color adjustment method as described in the first aspect are implemented.
[0054] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of a color adjustment method as described in the first aspect are implemented.
[0055] In a fifth aspect, an embodiment of the present application provides a computer program product, including computer instructions, which, when executed by a processor, implement the steps of a color adjustment method as described in the first aspect.
[0056] Thus, the user can adjust the grayscale value of at least one color to be adjusted in the initial color of the target object to be adjusted by sliding the finger gesture, thereby obtaining the target color. The color adjustment can be performed in an intuitive and dynamic manner, thereby improving the efficiency of color adjustment and the user experience.
[0057] In addition, the method shown in the embodiment of the present application also has the following advantages: the user can adjust the color through finger sliding gestures. This direct physical interaction is more intuitive than the traditional method of adjusting the color through mouse operation, and non-professional users can also quickly master it; by updating the color changes in real time, the user can see the results of his or her operation in time, which helps to achieve the expected color adjustment effect faster and significantly improves the color adjustment efficiency, especially when it comes to fine color adjustments; the traditional menu selection color adjustment method that eliminates the multi-step process, and the user does not need to switch between different interfaces or tools, but can continuously adjust the color with his or her fingers, saving time and reducing the possibility of errors during operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0059] Figure 1 A flow chart of a color adjustment method provided in an embodiment of the present application;
[0060] Figure 2 A schematic diagram of a correspondence between fingers and colors provided in an embodiment of the present application;
[0061] Figure 3 A schematic diagram of a finger sliding gesture operation provided in an embodiment of the present application;
[0062] Figure 4 A flow chart of a color adjustment method provided in an embodiment of the present application;
[0063] Figure 5 A three-dimensional scatter plot for recording a color adjustment process provided in an embodiment of the present application;
[0064] Figure 6 A schematic diagram of a monochrome value fallback scenario in a color adjustment process provided in an embodiment of the present application;
[0065] Figure 7 A schematic diagram of an overall color fallback scenario in a color adjustment process provided in an embodiment of the present application;
[0066] Figure 8 A structural block diagram of a color adjustment device provided in an embodiment of the present application;
[0067] Fig. 9 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0069] Figure 1 A color adjustment method is shown, such as Figure 1 As shown, the method includes:
[0070] Step S101, determining the initial color of the target object to be adjusted;
[0071] Step S102: Acquire the user's finger sliding gesture operation;
[0072] Step S103, determining at least one color to be adjusted in the initial colors and the grayscale adjustment value of the color to be adjusted according to the finger sliding gesture operation of the user;
[0073] Step S104: adjusting the initial color according to the color to be adjusted and the grayscale adjustment value to obtain the target color.
[0074] In step S101, the target object whose color needs to be adjusted needs to be identified and determined. This target object can be a display interface, or any design element that needs color adjustment. For example, in a web design project, the target object may be a button or a background area; in image editing software, the target object may be a selected image area. The key to this step is to accurately obtain the current initial color value of the target object, and the initial color value is usually represented by the RGB (red, green, blue) three-primary color model.
[0075] It should be noted that RGB is a color model used to create other colors by mixing different intensities of the three primary colors of red, green, and blue. This model is designed based on the way the human eye perceives color, because the photoreceptor cells in the human eye are sensitive to light waves of these three colors. In the RGB color model: red, green, and blue are the basic components, and almost all other colors can be generated through their different combinations. Each primary color is usually represented by a value ranging from 0 to 255, where 0 represents that the color does not appear and 255 represents that the color appears in its brightest form. Combining the three colors with different intensities can generate a large number of colors. For example, pure red is represented as RGB (255, 0, 0), pure white is represented as RGB (255, 255, 255), and black is represented as RGB (0, 0, 0). The RGB color model is widely used in electronic display technology, such as televisions, computer screens, mobile phone screens, etc. Each pixel in these devices contains light sources of red, green, and blue. By adjusting the brightness of each color, different colors can be displayed on the screen. In addition, the method shown in the embodiment of the present application also introduces the ARGB model, where A is the Alpha (transparency) channel, which is used to indicate the transparency of the color and allows the superposition of colors. The value of Alpha is generally in the range of 0 to 255, where 0 represents complete transparency (ie, completely invisible) and 255 represents complete opacity.
[0076] It should be noted that, in the method shown in the embodiment of the present application, the initial color value is represented by the RGB (red, green, blue) three-primary color model or the ARGB model, which is an exemplary implementation method and does not constitute a limitation to the method shown in the embodiment of the present application. The initial color can be composed of at least one color to be adjusted, and the color to be adjusted is not limited to the three colors of red, green and blue.
[0077] In step S102, the user's finger sliding gesture operation can be captured by a camera or the like. In a possible implementation, before obtaining the user's finger sliding gesture operation in step S102, the method further includes: pre-storing a first correspondence between color fingers and colors, and determining a color adjustment finger. In an exemplary application scenario, if the color fingers include: a first finger (which may be the index finger of the right hand), a second finger (which may be the middle finger of the right hand), and a third finger (which may be the ring finger of the right hand), the first correspondence may be: the first finger corresponds to red, the second finger corresponds to green, and the third finger corresponds to blue; and the color adjustment finger may be determined to be the thumb of the right hand, and the little finger may also be set as the transparency adjustment finger.
[0078] Corresponding to the above exemplary application scenarios, Figure 2 As shown, the image recognition camera recognizes the fingers and sets them. The user stretches out his palm, and the AR (Augmented Reality) / VR (Virtual Reality) device recognizes five fingers, and then sets the five fingers to represent A (transparency), R (red), G (green), B (blue), and color adjustment fingers. For example, the user sets the little finger as the A finger, the ring finger as the R finger, the middle finger as the G finger, the index finger as the B finger, and the thumb as the color adjustment finger.
[0079] Based on the pre-stored correspondence, when the finger sliding gesture operation is that the color adjustment finger contacts a color finger and slides along the starting point of the color finger, step S103, determining at least one color to be adjusted in the initial colors and the grayscale adjustment value of the color to be adjusted according to the user's finger sliding gesture operation, includes: determining the color corresponding to a color finger in contact with the color adjustment finger as the color to be adjusted; determining the grayscale adjustment value of the color to be adjusted according to the sliding situation of the color adjustment finger along the starting point of the color finger.
[0080] That is, when the color adjustment finger contacts a color finger, the color corresponding to the color finger can be determined as the color to be adjusted, and further, the grayscale adjustment value of the color to be adjusted can be determined according to the specific sliding condition of the color adjustment finger along the starting point of the color finger. Thus, the color to be adjusted and its corresponding grayscale adjustment value can be determined to perform color adjustment.
[0081] In step S103, determining the grayscale adjustment value of the color to be adjusted according to the sliding condition of the color adjustment finger along the starting point of the color finger includes:
[0082] When the color adjustment finger slides along the starting point of the color finger in the first direction and / or the second direction and the sliding stops, the grayscale adjustment value of the color to be adjusted is determined according to the contact point between the color adjustment finger and the color finger when the sliding stops; wherein the magnitude of the grayscale adjustment value is proportional to the distance from the contact point to the starting point, the first direction is opposite to the second direction, and when sliding in the first direction, the grayscale adjustment value is a positive value, and when sliding in the second direction, the grayscale adjustment value is a negative value.
[0083] It should be noted that the first direction and the second direction are two opposite directions relative to the starting point on the color finger. For example, if the starting point on the color finger is at the center of the color finger, the direction from the starting point to the fingertip of the color finger can be the first direction, and correspondingly, the direction from the starting point to the base of the color finger is the second direction.
[0084] In a possible implementation, before obtaining the user's finger sliding gesture operation, the method further includes: determining a transparency adjustment finger; wherein the transparency adjustment finger is used to adjust the transparency value of the target color; after adjusting the initial color according to the color to be adjusted and the grayscale adjustment value to obtain the target color, the method further includes:
[0085] When the color adjustment finger and the transparency adjustment finger are in contact and slide along the starting point of the transparency adjustment finger, and when the sliding stops, the transparency value of the target color is determined according to the distance from the contact point to the starting point when the sliding stops; the transparency of the target color is set according to the transparency value of the target color; wherein the size of the transparency value is proportional to the distance from the contact point to the starting point.
[0086] It should be noted that the principle of transparency adjustment is the same as that of color adjustment. The adjustment method is to determine the parameter value (grayscale adjustment value or transparency value of the target color) based on the contact and sliding of the color adjustment finger and the transparency adjustment finger or the color finger. Therefore, the color adjustment effect is achieved in a way that conforms to user habits. It is convenient and efficient, which improves the efficiency of color adjustment and the user experience.
[0087] For example, the user has three color fingers, and the corresponding colors are red, green, and blue. In a specific application scenario, when the user's R finger, G finger, and B finger are put together, Figure 3As shown, the default value is FFFFFFFF (white, the first two FFs represent transparency, indicating opacity). When the user only extends one R finger, it represents FFFF0000 (red), and when the user extends the G finger and the B finger, it represents FF00FFFF (a kind of cyan). The user can adjust the grayscale value by touching the color finger with the adjustment finger. Because each color has 256 levels, if the user touches the color finger and slides it upward, it can represent that the grayscale value increases, and the highest is 256 (FF). When sliding downward, it represents that the grayscale value decreases, and the lowest is 0 (00). Exemplarily, when the user's R finger, G finger, and B finger are put together, the R finger can be adjusted by sliding the adjustment finger up and down, and the user can see the final color in real time. The final adjusted R is (0F), the adjustment finger slides down to adjust the G finger, and the final adjusted G is (F0), the adjustment finger slides down to adjust the B finger, and the final adjusted B is (22), then the final color value is 0FF022.
[0088] It should be noted that in color representation, FFFFFFFF is a hexadecimal code used to describe color, which is often used in various programming and graphics environments, especially when transparency is involved. In the ARGB color model, color usually consists of four parts: red, green, blue, and transparency. Each channel is usually represented by two hexadecimal digits, ranging from 00 to FF. In hexadecimal, FF represents the maximum value 255 (decimal), and 00 represents the minimum value 0 (decimal).
[0089] Therefore, the distance between the contact point and the starting point can be used to determine the size of the grayscale adjustment value. The grayscale adjustment value is proportional to the distance. This color adjustment method is more intuitive and dynamic, allowing users to adjust the color in real time through simple gestures, improving the convenience and efficiency of color adjustment.
[0090] In step S104, Figure 4 As shown, step S104, adjusting the initial color according to the color to be adjusted and the grayscale adjustment value to obtain the target color includes:
[0091] Step S401, respectively determining the initial grayscale value of each color to be adjusted;
[0092] Step S402: adding the initial grayscale value of each color to be adjusted to the corresponding grayscale adjustment value to obtain an adjusted grayscale value;
[0093] Step S403: Mix each adjusted grayscale value to obtain a target color.
[0094] That is to say, first, it is necessary to determine the current state of the color object to be adjusted, that is, the initial grayscale value of the color to be adjusted in each basic color. Grayscale values usually represent the brightness or intensity of a color, and the range is usually between 0 and 255, where 0 represents no light (completely black) and 255 represents the brightest (the color is fully bright). These initial values are the basis for subsequent adjustments. Secondly, the grayscale adjustment value needs to be added to the corresponding initial grayscale value to obtain the adjusted grayscale value. After the user performs a finger sliding gesture operation, a grayscale adjustment value can be calculated based on the characteristics of the sliding (such as direction and distance). This grayscale adjustment value is positive or negative, and the grayscale adjustment value will be added to the initial grayscale value to adjust the brightness of each color. For example, if the user slides in the direction of increasing brightness, the grayscale adjustment value is positive, and the brightness of the corresponding color will increase; if the user slides in the direction of reducing brightness, the adjustment value is negative, and the brightness of the corresponding color will decrease. In this way, the color can be fine-tuned to meet the user's visual needs. The last step is to recombine the adjusted grayscale values of each color channel to generate the final target color, that is, remix the adjusted grayscale values of the color to be adjusted to form a new color output (get the target color). In this way, a wide range of colors from subtle to significant changes can be generated to meet different design and visual effect requirements.
[0095] In one possible implementation, when the initial color is adjusted according to the color to be adjusted and the grayscale adjustment value to obtain the target color, the method also includes: recording a three-dimensional scatter plot, wherein each three-dimensional scatter point in the three-dimensional scatter plot is used to record the grayscale value after adjustment and the grayscale value before adjustment, the adjusted target color and the target color before adjustment; after the initial color is adjusted according to the color to be adjusted and the grayscale adjustment value to obtain the target color, the method also includes: based on the three-dimensional scatter plot, when the color adjustment finger contacts the color finger and slides along the color finger in a third direction, the adjusted grayscale value corresponding to the color finger is rolled back to the grayscale value before adjustment; and / or, based on the three-dimensional scatter plot, when the color adjustment finger contacts the palm where the color finger is located and slides along the fourth direction, the adjusted target color is rolled back to the target color before adjustment.
[0096] It should be noted that the third direction is the direction in which the color adjustment finger contacts the color finger and slides along the color finger. In order to distinguish it from the first direction and the second direction (the direction from the starting point to the fingertip of the color finger can be the first direction, and correspondingly, the direction from the starting point to the root of the color finger is the second direction), the third direction can be the direction of sliding left or right from the starting point. Considering that the gray value fallback operation only needs to detect a slight sliding of the finger to fall back, and does not need to establish a corresponding relationship between the adjustment degree and the distance like the gray value adjustment operation (involving the numerical change of the gray value, such as increasing or decreasing), a relatively longer sliding distance (the length of the color finger) is required. Therefore, the third direction can be determined as the direction of sliding left or right from the starting point.
[0097] Similarly, the fourth direction is the direction in which the color adjustment finger contacts the palm where the color finger is located and slides along the palm. In the embodiment of the present application, the fourth direction can be any direction of the up, down, left, and right directions relative to the center point of the palm.
[0098] In a specific application scenario, when the user operates the adjustment finger to touch and slide the color finger, when it is detected that the dwell time exceeds 1s, it means that it is set to the current color. For example, the user slides the color value of the R finger to 32, and then adjusts the finger to stay for 1s. At this time, the color is set to FF32FFFF, and the color and operation time point are recorded at this time. As the user continues to adjust the color, the user operates the G finger, B finger, etc. When the adjustment finger stays for more than 1s, the set color value C0...Cn and the corresponding time point t0...tn are recorded, and finally the user's color setting process is generated into a three-dimensional scatter plot, such as Figure 5 Based on the 3D scatter plot, there are two color fallback methods:
[0099] Monochrome fallback scenarios (such as Figure 6 As shown in the figure): The user touches a color finger with the adjustment finger and slides it left and right. When sliding to the left, the color value of the color can be switched to the previous color value (grayscale value). For example, the user's current color is "FF48FF66", and the records of the first three color adjustments are "FF252525", "FF482525", and "FF48FF25". When the user slides the R finger to the left, the R color value will be adjusted from the current "48" to "25", and the current color value will be "FF25FF66". When the user slides the R finger to the right again, the current color value returns to "FF48FF66".
[0100] Overall color fallback scenario (such as Figure 7When the user touches and slides the palm of the hand with the adjusting finger, when sliding to the left, the target color can be switched to the previous target color, and when sliding to the right, the target color can be switched to the next target color. For example, the user's current target color is "FF48FF66", and the records of the first three color adjustments are "FF252525", "FF482525", and "FF48FF25". When the user slides the palm to the left, the color changes to "FF48FF25", and when sliding to the right again, the color changes to "FF48FF66".
[0101] As a result, users can clearly see the specific changes of each step of color adjustment, which increases the transparency and traceability of the operation. Users can also easily undo wrong operations or return to the previous step without having to make complex adjustments again, which greatly reduces the workload and possible errors when adjusting colors.
[0102] Thus, the user can adjust the grayscale values of the three primary colors corresponding to the initial color of the target object to be adjusted by sliding the finger gesture, thereby obtaining the target color. Color adjustment can be performed in an intuitive and dynamic manner, improving the efficiency of color adjustment and improving the user experience.
[0103] In addition, the method shown in the embodiment of the present application also has the following advantages: the user can adjust the color through finger sliding gestures. This direct physical interaction is more intuitive than the traditional method of adjusting the color through mouse operation, and non-professional users can also quickly master it; by updating the color changes in real time, the user can see the results of his or her operation in time, which helps to achieve the expected color adjustment effect faster and significantly improves the color adjustment efficiency, especially when it comes to fine color adjustments; the traditional menu selection color adjustment method that eliminates the multi-step process, and the user does not need to switch between different interfaces or tools, but can continuously adjust the color with his or her fingers, saving time and reducing the possibility of errors during operation.
[0104] Figure 8 A color adjustment device according to an embodiment of the present application is shown. Figure 8 As shown, the device 80 includes:
[0105] A determination module 801 is used to determine the initial color of the target object to be adjusted;
[0106] The execution module 802 is used to obtain the user's finger sliding gesture operation; determine at least one color to be adjusted in the initial color and the grayscale adjustment value of the color to be adjusted according to the user's finger sliding gesture operation; adjust the initial color according to the color to be adjusted and the grayscale adjustment value to obtain the target color.
[0107] In a possible implementation, the execution module 802 is further configured to pre-store a first correspondence between a color finger and a color and determine a color adjustment finger before acquiring a finger sliding gesture operation of the user;
[0108] When the finger sliding gesture operation is that the color adjustment finger contacts a color finger and slides along the starting point of the color finger, the execution module 802 is further used to determine the color corresponding to the color finger contacting the color adjustment finger as the color to be adjusted;
[0109] The grayscale adjustment value of the color to be adjusted is determined according to the sliding condition of the color adjustment finger along the starting point of the color finger.
[0110] In a possible implementation, the execution module 802 is further configured to determine the grayscale adjustment value of the color to be adjusted according to the contact point between the color adjustment finger and the color finger when the sliding stops, when the color adjustment finger slides in the first direction and / or the second direction along the starting point of the color finger and the sliding stops;
[0111] Among them, the size of the grayscale adjustment value is proportional to the distance from the contact point to the starting point, the first direction is opposite to the second direction, and when sliding in the first direction, the grayscale adjustment value is a positive value, and when sliding in the second direction, the grayscale adjustment value is a negative value.
[0112] In a possible implementation, the execution module 802 is further configured to respectively determine an initial grayscale value of each color to be adjusted;
[0113] Adding the initial grayscale value of each color to be adjusted to the corresponding grayscale adjustment value to obtain the adjusted grayscale value;
[0114] Blend each adjusted grayscale value to get the target color.
[0115] In a possible implementation, the execution module 802 is further used to record a three-dimensional scatter plot when the initial color is adjusted according to the color to be adjusted and the grayscale adjustment value to obtain the target color, wherein each three-dimensional scatter point in the three-dimensional scatter plot is used to record the grayscale value after adjustment and the grayscale value before adjustment, and the target color after adjustment and the target color before adjustment;
[0116] The execution module 802 is further configured to adjust the initial color according to the color to be adjusted and the grayscale adjustment value to obtain the target color, and then, based on the three-dimensional scatter plot, when the color adjustment finger contacts the color finger and slides along the color finger in a third direction, return the adjusted grayscale value corresponding to the color finger to the grayscale value before adjustment; and / or,
[0117] Based on the three-dimensional scatter plot, when the color adjustment finger contacts the palm where the color finger is located and slides along the fourth direction, the adjusted target color is returned to the target color before adjustment.
[0118] In a possible implementation, the execution module 802 is further used to determine a transparency adjustment finger before acquiring the finger sliding gesture operation of the user; wherein the transparency adjustment finger is used to adjust the transparency value of the target color;
[0119] The execution module 802 is further used to adjust the initial color according to the color to be adjusted and the grayscale adjustment value to obtain the target color, and then, when the color adjustment finger contacts the transparency adjustment finger and slides along the starting point of the transparency adjustment finger, and when the sliding stops, determine the transparency value of the target color according to the distance from the contact point of the color adjustment finger and the transparency adjustment finger to the starting point when the sliding stops;
[0120] Set the transparency of the target color according to the transparency value of the target color;
[0121] The transparency value is proportional to the distance from the contact point to the starting point.
[0122] Thus, the user can adjust the grayscale values of the three primary colors corresponding to the initial color of the target object to be adjusted by sliding the finger gesture, thereby obtaining the target color. Color adjustment can be performed in an intuitive and dynamic manner, improving the efficiency of color adjustment and improving the user experience.
[0123] In addition, the device shown in the embodiment of the present application also has the following advantages: the user can adjust the color through finger sliding gestures. This direct physical interaction is more intuitive than the traditional method of adjusting the color through mouse operation, and non-professional users can also quickly master it; by updating the color changes in real time, the user can see the results of his or her operation in time, which helps to achieve the desired color adjustment effect faster and significantly improves the color adjustment efficiency, especially when it comes to fine color adjustments; the traditional menu selection color adjustment method that eliminates the multi-step process, and the user does not need to switch between different interfaces or tools, but can continuously adjust the color with his or her fingers, saving time and reducing the possibility of errors during operation.
[0124] The present application embodiment also provides an electronic device 90, such as Fig. 9 As shown, it includes: a processor 901, a memory 902, and a program stored in the memory 902 and executable on the processor 901. When the program is executed by the processor, the steps of a color adjustment method shown in the above embodiment are implemented.
[0125] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of a color adjustment method shown in the above method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0126] An embodiment of the present application also provides a computer program product, including computer instructions. When the computer instructions are executed by a processor, the steps of a color adjustment method shown in the above method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0127] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0128] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0129] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A color adjustment method, characterized in that: The method comprises: Determine the initial color of the target object to be adjusted; Get the user's finger sliding gesture operation; Determining at least one color to be adjusted among the three primary colors of the initial color and a grayscale adjustment value of the color to be adjusted according to the finger sliding gesture operation of the user; The initial color is adjusted according to the color to be adjusted and the grayscale adjustment value to obtain a target color.
2. The method according to claim 1, characterized in that Before acquiring the user's finger sliding gesture operation, the method further includes: Pre-storing a first correspondence between a color finger and a color, and determining a color adjustment finger; In the case where the finger sliding gesture operation is that the color adjustment finger contacts one of the color fingers and slides along the starting point of the color finger, The determining, according to the finger sliding gesture operation of the user, at least one color to be adjusted in the initial colors and the grayscale adjustment value of the color to be adjusted comprises: Determine the color corresponding to one of the color fingers in contact with the color adjustment finger as the color to be adjusted; The grayscale adjustment value of the color to be adjusted is determined according to the sliding condition of the color adjustment finger along the starting point of the color finger.
3. The method according to claim 2, characterized in that The step of determining the grayscale adjustment value of the color to be adjusted according to the sliding condition of the color adjustment finger along the starting point of the color finger comprises: When the color adjustment finger slides along the starting point of the color finger in the first direction and / or the second direction and the sliding stops, determining the grayscale adjustment value of the color to be adjusted according to the contact point between the color adjustment finger and the color finger when the sliding stops; Among them, the size of the grayscale adjustment value is proportional to the distance from the contact point to the starting point, the first direction is opposite to the second direction, and when sliding in the first direction, the grayscale adjustment value is a positive value, and when sliding in the second direction, the grayscale adjustment value is a negative value.
4. The method according to claim 3, characterized in that The step of adjusting the initial color according to the color to be adjusted and the grayscale adjustment value to obtain a target color comprises: Determining the initial grayscale value of each color to be adjusted respectively; Adding the initial grayscale value of each color to be adjusted to the corresponding grayscale adjustment value to obtain an adjusted grayscale value; Each adjusted grayscale value is mixed to obtain the target color.
5. The method according to claim 4, characterized in that In the case where the initial color is adjusted according to the color to be adjusted and the grayscale adjustment value to obtain a target color, the method further includes: Recording a three-dimensional scatter plot, wherein each three-dimensional scatter point in the three-dimensional scatter plot is used to record a grayscale value after adjustment and a grayscale value before adjustment, and a target color after adjustment and a target color before adjustment; After adjusting the initial color according to the color to be adjusted and the grayscale adjustment value to obtain a target color, the method further includes: Based on the three-dimensional scatter plot, when the color adjustment finger contacts the color finger and slides along the color finger in a third direction, the adjusted grayscale value corresponding to the color finger is returned to the grayscale value before adjustment; and / or, Based on the three-dimensional scatter plot, when the color adjustment finger contacts the palm where the color finger is located and slides along a fourth direction, the adjusted target color is returned to the target color before adjustment.
6. The method according to claim 1, characterized in that Before acquiring the user's finger sliding gesture operation, the method further includes: Determining a transparency adjustment finger; wherein the transparency adjustment finger is used to adjust the transparency value of the target color; After adjusting the initial color according to the color to be adjusted and the grayscale adjustment value to obtain a target color, the method further includes: When the color adjustment finger contacts the transparency adjustment finger and slides along the starting point of the transparency adjustment finger, and when the sliding stops, the transparency value of the target color is determined according to the distance from the contact point between the color adjustment finger and the transparency adjustment finger to the starting point when the sliding stops; According to the transparency value of the target color, set the transparency of the target color; The transparency value is proportional to the distance from the contact point to the starting point.
7. A color adjustment device, characterized in that: The device comprises: A determination module, used to determine the initial color of the target object to be adjusted; An execution module is used to obtain the user's finger sliding gesture operation; Determining at least one color to be adjusted among the three primary colors of the initial color and a grayscale adjustment value of the color to be adjusted according to the finger sliding gesture operation of the user; The initial color is adjusted according to the color to be adjusted and the grayscale adjustment value to obtain a target color.
8. An electronic device, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps of the color adjustment method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the color adjustment method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The method comprises computer instructions, which, when executed by a processor, implement the steps of the color adjustment method according to any one of claims 1 to 6.
