Color mapping method and device, light display equipment and electrical equipment
By combining a rainbow color circle canvas with HSV and sRGB driving solutions, the problems of color banding and color palette consistency in LED light spheres are solved, achieving continuous and accurate color reproduction of the natural spectrum and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-03-13
AI Technical Summary
Existing LED control systems cannot accurately reproduce the natural continuous spectrum, resulting in color banding and abrupt changes. The color palette is disconnected from the display data, leading to unnatural gradient effects.
By constructing a rainbow color ring canvas palette and combining HSV and sRGB driving schemes, the light-emitting device is driven based on the target RGB intensity to achieve accurate mapping of color space information and ensure the continuity and consistency of color transition.
It achieves continuous and accurate natural spectrum color reproduction on LED light spheres, improving user experience and satisfaction, and adapting to color needs in multiple scenarios.
Smart Images

Figure CN121665404A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of lighting control technology, specifically to color mapping methods, devices, lighting display equipment, and electrical equipment. Background Technology
[0002] Currently, most LED control systems simply use standard sRGB color values to directly drive LED bulbs, but this cannot truly reproduce the natural continuous spectrum, such as that of a rainbow. Therefore, existing technologies use HSV linear interpolation to drive LED bulbs. Although HSV linear interpolation attempts to optimize the transition problem of sRGB, due to the algorithm not being adapted to hardware characteristics, there are still obvious color breaks and jumps on the hue wheel, resulting in an unsmooth transition. Furthermore, regardless of whether it is an sRGB or HSV driving scheme, the standard color palettes used in their implementations are disconnected from the displayed data, exacerbating the color inconsistency problem. Ultimately, both approaches result in gradients failing to achieve the smoothness of a natural spectrum. Summary of the Invention
[0003] This invention provides a color mapping method, apparatus, lighting display device, and electrical equipment to solve the problem that LED light sphere gradients cannot achieve natural spectral smoothness.
[0004] In a first aspect, the present invention provides a color mapping method, the method comprising: acquiring coordinate information of a target point selected by a user on a color palette, the color palette being configured as a canvas containing multiple colors; determining color space information of the target point on the color palette based on the coordinate information; determining the target RGB intensity based on the color space information, and driving a light-emitting device to map the target color corresponding to the target point based on the target RGB intensity.
[0005] The color mapping method provided by this invention pre-constructs a color palette based on a rainbow color wheel canvas. It determines the color space information of a target point selected by the user on the palette, and then determines the target RGB intensity based on this color space information. The method then drives the light-emitting device to map the target color of the target point based on this target RGB intensity. This invention constructs a precise color palette based on a rainbow color wheel canvas and combines the advantages of HSV and sRGB driving schemes on this precise palette. This ensures that the colors displayed by light-emitting devices such as LED bulbs and the colors selected on the palette correspond to the actual light, guaranteeing consistency between color selection and display. This achieves continuous and accurate reproduction of natural spectrum colors on light-emitting devices such as LED bulbs, meeting color requirements in multiple scenarios and improving user experience and satisfaction.
[0006] In one optional implementation, the color palette is circular, and the color space information includes: target hue, target saturation, and target brightness. Determining the color space information of the target point on the color palette based on coordinate information includes: converting the coordinate information into polar coordinates relative to the color palette; determining the target hue and normalized radius of the target point on the color palette based on the polar coordinates; and determining the target saturation and target brightness of the target point on the color palette based on the normalized radius.
[0007] This invention directly maps polar coordinate angles to target hues, achieving seamless mapping across the 0°-360° hue wheel. This avoids the hue jumps caused by cross-interval calculations in traditional HSV linear interpolation, ensuring the continuity of hue transitions from the source and thus more closely approximating the continuous characteristics of the natural spectrum. Simultaneously, it controls saturation and brightness synchronously through a normalized radius (distance from the touch point to the center of the circle / maximum radius of the color palette), ensuring that the parameters are fixed upon user selection of the position. This avoids the problem of parameter mismatch caused by independent saturation and brightness adjustments in traditional solutions. This invention transforms the three abstract parameters of hue, saturation, and brightness into position selections on the color palette. Users do not need to understand color space principles; they can complete the operation simply by looking at the position and selecting the color. This is suitable for non-professional users such as the elderly and children, enhancing the user experience.
[0008] In one optional implementation, determining the target RGB intensity based on color space information includes: determining the hue range of the target point and the color growth rate within the hue range based on the target hue; determining the color component intensity and white compensation component intensity based on the target brightness and target saturation; determining the initial RGB intensity of the target point based on the color component intensity and color growth rate; and correcting the initial RGB intensity based on the white compensation component intensity to obtain the target RGB intensity.
[0009] This invention achieves continuous color transitions within a target range by determining the hue range of the target point and the corresponding color growth rate, avoiding obvious color gradation separation. Furthermore, by combining color component intensity with white compensation based on brightness and saturation to determine the initial RGB, it solves the problem of brightness distortion under high saturation, improving the consistency of color adjustment. Simultaneously, by correcting the initial RGB based on the white compensation component intensity, it allows for flexible embedding of color gamut adaptation and Gamma correction logic for light-emitting devices such as LED bulbs, ensuring that the calculation results match the actual color rendering capability of the hardware and avoiding the problem of discrepancies between theoretical color and hardware color rendering.
[0010] In one optional implementation, determining the hue interval of the target point and the color growth rate within the hue interval based on the target hue includes: obtaining the hue interval range of the color palette, wherein the color palette is pre-divided into a preset number of hue intervals, and different hue intervals correspond to different hue interval ranges; comparing the target hue with each hue interval range to determine the hue interval in which the target point is located; and determining the color growth rate of the target point within the hue interval based on the lower limit of the range corresponding to the hue interval and the target hue.
[0011] This invention divides the color palette into a preset number of hue intervals, allowing different intervals to correspond to different colors. After multiple intervals are seamlessly connected, a complete rainbow color wheel can be constructed. Thus, when selecting a color, the hue interval and specific position of the selected target point are determined based on the coordinate information of the selected target point, accurately determining the color space information and providing accurate color information for the color rendering of light-emitting devices such as LED light balls.
[0012] In one optional implementation, determining the color component intensity and white compensation component intensity based on the target brightness and target saturation includes: performing gamma preprocessing on the target brightness to obtain linear space brightness; calculating the product of the linear space brightness and the target saturation to obtain the color component intensity; and calculating the product of the linear space brightness and the saturation difference to obtain the white compensation component intensity, wherein the saturation difference is the difference between the preset maximum saturation and the target saturation.
[0013] This invention, through gamma preprocessing of the target brightness, converts the target brightness into linear spatial brightness, eliminating the non-linearity between the input brightness signal and the actual emitted brightness of light-emitting devices such as LED bulbs. This ensures that the brightness perceived by the user matches the actual emitted brightness, improving the accuracy of brightness adjustment. Furthermore, by calculating the color component intensity based on linear spatial brightness and target saturation, the color concentration can be linearly adjusted with changes in saturation, ensuring a match between saturation and color concentration. Calculating the white compensation component intensity based on linear spatial brightness and target saturation ensures that when saturation decreases, the white compensation component increases synchronously, maintaining overall brightness stability and achieving a balance between saturation adjustment and brightness.
[0014] Secondly, the present invention provides a color mapping device, the device comprising: a coordinate information acquisition module for acquiring coordinate information of a target point selected by a user on a color palette, the color palette being a canvas containing multiple colors; a color space information determination module for determining the color space information of the target point on the color palette based on the coordinate information; and a color mapping module for determining the target RGB intensity based on the color space information, so as to drive a light-emitting device to map the target color corresponding to the target point based on the target RGB intensity.
[0015] Thirdly, the present invention provides a light display device, comprising: a control module and a light-emitting device; the control module comprises: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the color mapping method of the first aspect or any corresponding embodiment described above.
[0016] In one optional embodiment, the lighting display device further includes: a color palette and a driving module; the color palette is connected to the control module, and the color palette is composed of a canvas containing multiple colors; the driving module is connected to the control module and is used to drive the light-emitting device to emit light based on the target RGB intensity output by the control module.
[0017] In one alternative implementation, the light-emitting device is an LED bulb.
[0018] The lighting display device provided by this invention can drive LED light bulbs and other light-emitting devices to emit corresponding colored light based on the user's selection of target points on the color palette, ensuring that the colors presented by the LED light bulbs and other light-emitting devices and the colors selected on the color palette correspond to the actual light, so as to ensure that the color selection and display are consistent, and realize the continuous and accurate reproduction of natural spectrum colors on LED light bulbs and other light-emitting devices.
[0019] Fourthly, the present invention provides an electrical device, comprising: the lighting display device described in the third aspect above or its corresponding light display device and an operation panel, wherein the color palette of the lighting display device is disposed on the operation panel.
[0020] In one alternative implementation, the electrical device is a purifier.
[0021] This invention, by deploying the aforementioned lighting display device and an operation panel with a color palette for the lighting display device on electrical appliances such as air purifiers, enables users to easily adjust the ambient light of the electrical appliances. Moreover, the ambient light can continuously and accurately reproduce the colors of the natural spectrum, meet the color needs in multiple scenarios, and improve the user experience and satisfaction.
[0022] Fifthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the color mapping method of the first aspect or any corresponding embodiment thereof.
[0023] In a sixth aspect, the present invention provides a computer program product, including computer instructions for causing a computer to execute the color mapping method of the first aspect or any corresponding embodiment thereof. Attached Figure Description
[0024] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0025] Figure 1 This is a schematic diagram of an application scenario according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the first process of a color mapping method according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the operation panel of the color mapping method according to an embodiment of the present invention; Figure 4 This is a schematic diagram of a color palette for a color mapping method according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the LED bulb driving process of the color mapping method according to an embodiment of the present invention; Figure 6 This is a schematic diagram of an LED crystal sphere using a color mapping method according to an embodiment of the present invention; Figure 7 This is a schematic diagram of a second process of the color mapping method according to an embodiment of the present invention; Figure 8 This is a schematic diagram of the third process of the color mapping method according to an embodiment of the present invention; Figure 9 This is a schematic diagram of the palette construction process of the color mapping method according to an embodiment of the present invention; Figure 10 This is a structural block diagram of a color mapping device according to an embodiment of the present invention; Figure 11 This is a schematic diagram of the hardware structure of the lighting display device according to an embodiment of the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0027] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.
[0028] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.
[0029] As an optional application scenario of this invention, such as Figure 1 As shown, the electrical device 10 includes a lighting display device 100 and an operation panel 200. The lighting display device 100 includes a control module 101, a light-emitting device 102, a pre-set color palette 103, and a drive module 104. The color palette 103 is deployed on the operation panel 200. Users can control the color of the light-emitting device 102 by touching the color palette 103 on the operation panel 200. The specific control process is executed by the control module 101, and the drive module 104 drives the light-emitting device 102 to display the corresponding color. The light-emitting device 102 can be selected from LED beads, LED strips, or other LED light-emitting devices, or tri-color adjustable fluorescent lamps, etc., as examples only and not limited to these. Existing technology mainly includes two driving schemes: sRGB value driving scheme and HSV driving scheme.
[0030] Taking an LED sphere as the light-emitting device 102 as an example, the sRGB value driving scheme directly uses the RGB triplet of the standard sRGB color space (such as [255,0,0] representing pure red) as the control signal. It adjusts the duty cycle of the driving current of the red, green, and blue LED chips through PWM (Pulse Width Modulation) technology, thereby controlling the brightness of each primary color and ultimately mixing to produce the target color. The sRGB value driving scheme has a simple architecture, requires no complex algorithm conversion, and has low hardware costs, requiring only basic PWM driving circuitry and simple control logic. However, the sRGB value driving scheme has the following three drawbacks: ① Severe color reproduction distortion: The color gamut and electro-optical response characteristics of the LED sphere differ significantly from those of standard display devices (such as mobile phone screens), and its Gamma value is not corrected. For example, the standard sRGB [127,127,0] is theoretically pure yellow, but due to Gamma mismatch, the actual light emitted by the LED bulb may be dimmer or greener, failing to reproduce the target color; ② The natural continuous spectrum cannot be reproduced: The natural spectrum is a continuous frequency distribution, while LEDs rely on discrete mixing of three primary colors to simulate color. Direct sRGB driving does not consider the nonlinear visual characteristics of the human eye, resulting in obvious color breaks in continuous gradient effects such as rainbows, presenting segmented color bands rather than smooth transitions; ③ The user experience is extremely poor: The RGB progress bar interface, as a basis for color adjustment, lacks intuitive color reference. Users find it difficult to predict the actual light emission effect of the LED through numerical combinations, requiring repeated trial and error in the operation process. Furthermore, the color displayed on the progress bar lacks visual contrast with the actual LED light, failing to form an effective feedback loop.
[0031] To optimize color transition effects, the HSV linear interpolation driving scheme first performs linear interpolation calculations in the HSV color space (hue H, saturation S, brightness V), and then converts the calculation results into RGB values to drive the LED. For example, when implementing a rainbow gradient, the S and V values are fixed, and the H value increases linearly on the 0°-360° hue ring, converting it point by point into an RGB signal and sending it to the LED bulb. Compared to the direct sRGB driving scheme, the HSV linear interpolation driving scheme is closer to the human eye's perception of color changes and can theoretically simplify the hue adjustment process. However, it does not solve the hardware characteristic adaptation problem, so the following two problems still exist: ① Hue transition gaps and jumps: The traditional HSV linear interpolation algorithm does not consider the non-linear characteristics of the RGB color space. When the H value transitions across hue intervals (such as red-yellow-green), the converted RGB value will show abrupt changes. For example, when the H value linearly increases from 350° (deep red) to 10° (light red), the RGB values will exhibit discontinuous jumps, resulting in visual color breaks; ② Mid-tone distortion: The linear interpolation process does not adapt to the color gamut limitations of the LED, and some interpolated RGB values exceed the actual color rendering range of the LED bulb, causing intermediate transition colors to appear grayish or dark. For example, the midpoint (127,127,0) of the red-green linear interpolation may appear as a dark yellow on the LED instead of the expected orange.
[0032] Furthermore, the shortcomings of existing standard color palette image color selection schemes include: ① Severe mismatch between color selection and display: The pixel RGB values of the color palette image are rendered based on the characteristics of the display terminal (such as a mobile phone screen), which differs from the color gamut and Gamma value of the LED bulb. Moreover, the image pixels corresponding to the touch coordinates are not directly related to the underlying data of LED emission, resulting in a significant deviation between the color seen in the image and the actual color emitted by the LED; ② Lack of hardware characteristic correction mechanism: Gamma correction is not performed for the non-linear electro-optical response of the LED. Even if the image pixel colors are accurate, the non-linear relationship between the LED driving current and brightness will cause the emitted color to deviate from the target value. For example, color details in low-brightness areas will be lost due to insufficient low-grayscale response of the LED, resulting in a lack of detail in dark areas.
[0033] Therefore, all existing solutions fail to resolve the fundamental contradiction in simulating a continuous spectrum using discrete three primary colors: LEDs rely on the mixing of three fixed wavelengths of light (red, green, and blue) for color rendering, which cannot cover the entire frequency range of the natural spectrum. Existing technologies do not compensate for this inherent deficiency through color mapping, hardware characteristic calibration, or other means, resulting in a continuous gradient effect that cannot achieve the smoothness of the natural spectrum. This invention provides a color mapping method that constructs a precise color palette based on a rainbow color ring canvas. Furthermore, it combines the advantages of HSV and sRGB driving schemes on this precise color palette to achieve continuous and accurate reproduction of natural spectrum colors on light-emitting devices such as LED bulbs.
[0034] According to an embodiment of the present invention, a color mapping method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0035] This embodiment provides a color mapping method that can be used in the control module of the lighting display device in the aforementioned electrical equipment, such as air purifiers, humidifiers, and air conditioners. Figure 2 This is a flowchart of a color mapping method according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps: Step S201: Obtain the coordinate information of the target point selected by the user on the color palette, which is a canvas containing multiple colors.
[0036] Specifically, in this embodiment of the invention, an air purifier is used as an example, such as... Figure 3As shown, the top of the air purifier is the control panel, which includes an ambient light adjustment interface. This interface contains a thumbnail of the air purifier and a pre-built color palette. By clicking on a specific location on the color palette, the color of the ambient light portion in the thumbnail of the air purifier will change accordingly.
[0037] In some optional embodiments, the color palette of this invention is set up using a canvas containing multiple colors, such as a color palette based on a rainbow color wheel canvas, and the corresponding effect is as follows: Figure 4 As shown, the color palette can accurately reproduce continuous rainbow colors. Moreover, because each point in the canvas-based color palette is calculated before being drawn, as long as the coordinate information of the target point selected by the user's touch is obtained, the original canvas data can be accurately retrieved, thereby achieving accurate color adjustment.
[0038] Step S202: Determine the color space information of the target point on the color palette based on the coordinate information.
[0039] Specifically, in the embodiments of the present invention, such as Figure 4 As shown, the overall shape of the color palette is a perfect circle with no boundary divisions. The center is a high-brightness white area, gradually transitioning outwards to the complete rainbow spectrum of colors. The color distribution of the palette is a gradient from pure hue to light shades to white from the circumference to the center. The circumference covers the complete rainbow spectrum, transitioning continuously in the order of red, orange, yellow, green, cyan, blue, purple, and red, without obvious color band breaks, restoring the color continuity of the natural spectrum. As the radial area extends from the circumference to the center (center), the color saturation gradually decreases (from pure hue to light shades), while the brightness gradually increases, eventually converging into pure white at the center.
[0040] This invention matches the coordinates of the color palette with the hue wheel characteristics of the HSV color space. Specifically, it uses a circular rainbow color wheel canvas whose shape perfectly matches the polar coordinate characteristics of the HSV color space: the circumference corresponds to the 0°-360° hue wheel (a continuous transition of red, orange, yellow, green, cyan, blue, magenta, and red), and the radial direction corresponds to saturation (S=0% at the center for white, and S=100% at the edges for pure hue) and brightness. This aligns the color palette shape with the HSV logic of LED color calculation, avoiding the problem of color selection errors caused by the disconnect between the shape and color space in traditional color palettes that only reflect RGB. Therefore, after the user selects a target point on the color palette, the corresponding color space information, namely hue (H), saturation (S), and brightness (V), is determined based on the coordinate information of the target point.
[0041] Step S203: Determine the target RGB intensity based on the color space information, and drive the light-emitting device to map the target color corresponding to the target point based on the target RGB intensity.
[0042] Specifically, in this embodiment of the invention, taking LED beads as the light-emitting device as an example, the color space information determined based on the coordinate information of the target point in the color palette represents the user's perceived color space, that is, it closely resembles the user's intuitive perception. Color mapping of the LED sphere requires hardware driving of the LED sphere. Therefore, the target RGB (Red, Green, Blue) intensity is determined according to the color space information, that is, the HSV drive is converted to sRGB drive. RGB is a color space that the LED sphere hardware can directly drive. The target color corresponding to the target point can be mixed by adjusting the luminous intensity of the three primary colors of the LED sphere, ensuring that the color on the color palette seen by the user is consistent with the color actually emitted by the LED sphere. In summary, the overall control process of the LED sphere is as follows: Figure 5 As shown, this allows users to control the LED bulbs based on the color palette.
[0043] The preferred choice in this embodiment of the invention is an LED crystal sphere, such as... Figure 6 As shown, this design aims to address the issues that LED glass light spheres cannot achieve multi-angle refraction effects, and that the lights and wires inside the LED glass light spheres are easily visible to users, affecting their experience.
[0044] The color mapping method provided by this invention pre-constructs a color palette based on a rainbow color ring canvas. It determines the color space information of a target point selected by the user on the palette, and then determines the target RGB intensity based on this color space information. The method then drives the light-emitting device to map the target color of the target point based on this target RGB intensity. This invention constructs a precise color palette based on a rainbow color ring canvas and combines the advantages of HSV and sRGB driving schemes on this precise palette. This ensures that the colors displayed by the LED sphere and the colors selected on the palette correspond to the actual light, guaranteeing consistency between color sampling and display. It achieves continuous and accurate reproduction of natural spectrum colors on the LED sphere, meeting color requirements in multiple scenarios and improving user experience and satisfaction.
[0045] This embodiment provides a color mapping method that can be used in the control module of the lighting display device in the aforementioned electrical equipment, such as air purifiers, humidifiers, and air conditioners. Figure 7 This is a flowchart of a color mapping method according to an embodiment of the present invention, such as... Figure 7 As shown, the process includes the following steps: Step S701: Obtain the coordinate information of the target point selected by the user on the color palette, which is a canvas containing multiple colors. For details, please refer to [link to relevant documentation]. Figure 2 Step S201 of the illustrated embodiment will not be described again here.
[0046] Step S702: Determine the color space information of the target point on the color palette based on the coordinate information.
[0047] Specifically, step S702 includes: Step S7021: Convert the coordinate information into polar coordinates relative to the color palette.
[0048] Specifically, in this embodiment of the invention, a purifier is used as an example, such as... Figure 4 As shown, the color palette is circular. After the user clicks on a target point in the color palette on the operation panel, the color palette returns the coordinate information of the target point based on a pre-determined coordinate system. In this embodiment of the invention, the coordinates of the color palette are pre-matched with the hue wheel characteristics of the HSV color space. Different points on the color palette correspond to different color space information. The circumference of the color palette corresponds to the 0°-360° hue wheel, and the radial direction corresponds to saturation and brightness. Therefore, with the center of the color palette as the pole, the polar axis (e.g., a ray pointing from the center of the color palette to the pure red area on the right) is determined based on the pole to obtain the coordinate information of the target point. Convert to polar coordinates relative to the color palette Furthermore, based on polar coordinates... Determine the polar angle of the target point relative to the center of the circle. and polar radius polar angle The angle between the target point and the polar axis, and the polar radius. This represents the straight-line distance from the target point to the pole. (Coordinate information) polar coordinates The conversion formula is shown below:
[0049]
[0050] Step S7022: Determine the target hue and normalized radius of the target point on the color palette based on the polar coordinates.
[0051] Specifically, in this embodiment of the invention, the circular angle of the polar coordinates matches the 0°-360° circular distribution of HSV hues, therefore the polar angle in the polar coordinates is... The target hue H on the color palette is the target point, where the ray pointing from the center of the palette to the pure red area on the right is the polar axis, corresponding to HSV hue H = 0°. Furthermore, the polar radius of the polar coordinates... Corresponding to the target saturation S and target brightness V, therefore, in determining the polar radius... Then, the polar diameter Convert to a dimensionless value between 0 and 1: Normalized radius To eliminate parameter differences between palettes of different sizes, the calculation formula is as follows:
[0052] in, This is the maximum radius of the palette.
[0053] Step S7023: Determine the target saturation and target brightness of the target point on the color palette based on the normalized radius.
[0054] Specifically, in this embodiment of the invention, when setting the color palette, the radial color change from the center to the circumference is set to change from white to light shades, and then to pure hues. The essence of this visual gradient is that saturation increases with the radius, and brightness is slightly adjusted with the radius but remains stable. Therefore, the normalized radius... It can be used as a control variable for saturation S and brightness V, thus avoiding the problem of easy disconnect between independent adjustment of saturation and brightness in traditional schemes. The target saturation S can be determined by the normalized radius. Determined by a linear mapping, the target saturation S ranges from 0% to 100%, and is related to the normalized radius. They exhibit a linear positive correlation, for example, When the value is 0, it corresponds to the center of the circle. The mapping results in S being 0%, which means there is no color and only brightness is retained, corresponding to white. When the value is 1, it corresponds to the circumference, and the mapping results in S being 100%, which is pure color without gray mixing, corresponding to the pure hue of the rainbow color wheel; When the value is 0.5, it corresponds to the middle area, and the mapping results in S of 50%, which is a light color (such as light red or light blue). The color and gray are mixed, and the visual effect is soft. This is just an example and is not a limitation.
[0055] Furthermore, the core requirement for brightness V is to ensure consistent visual brightness across different saturation levels; therefore, a combination of base brightness and... Fine-tuning strategies, or directly setting the brightness V and the normalized radius. The mapping relationship between them is not specifically defined here.
[0056] In summary, the embodiments of the present invention achieve error-free mapping by perfectly matching the structure of the polar coordinates, the circular color palette, and the HSV color wheel, avoiding errors in rectangular coordinate conversion. At the same time, the normalized radius synchronously controls saturation and brightness, ensuring the intuitiveness of position and color, and users do not need to understand complex parameters.
[0057] Step S703: Determine the target RGB intensity based on the color space information, and drive the light-emitting device to map the target color corresponding to the target point based on the target RGB intensity. For details, please refer to [link to relevant documentation]. Figure 2 Step S203 of the illustrated embodiment will not be described again here.
[0058] The color mapping method provided by this invention pre-constructs a color palette based on a rainbow color ring canvas. It determines the color space information of a target point selected by the user on the palette, and then determines the target RGB intensity based on this color space information. The method then drives the light-emitting device to map the target color of the target point based on this target RGB intensity. This invention constructs a precise color palette based on a rainbow color ring canvas and combines the advantages of HSV and sRGB driving schemes on this precise palette. This ensures that the colors displayed by the LED sphere and the colors selected on the palette correspond to the actual light, guaranteeing consistency between color sampling and display. It achieves continuous and accurate reproduction of natural spectrum colors on the LED sphere, meeting color requirements in multiple scenarios and improving user experience and satisfaction.
[0059] This embodiment provides a color mapping method that can be used in the control module of the lighting display device in the aforementioned electrical equipment, such as air purifiers, humidifiers, and air conditioners. Figure 8 This is a flowchart of a color mapping method according to an embodiment of the present invention, such as... Figure 8 As shown, the process includes the following steps: Step S801: Obtain the coordinate information of the target point selected by the user on the color palette, which is a canvas containing multiple colors. For details, please refer to [link to relevant documentation]. Figure 7 Step S701 of the illustrated embodiment will not be described again here.
[0060] Step S802: Determine the color space information of the target point on the color palette based on the coordinate information. For details, please refer to [link to relevant documentation]. Figure 7 Step S702 of the illustrated embodiment will not be described again here.
[0061] Step S803: Determine the target RGB intensity based on the color space information, and drive the light-emitting device to map the target color corresponding to the target point based on the target RGB intensity.
[0062] Specifically, step S803 includes: Step S8031: Determine the hue range of the target point and the color growth rate within the hue range based on the target hue.
[0063] Specifically, in this embodiment of the invention, during the design of the color palette, the palette is pre-divided into a predetermined number of hue intervals based on the colors of the rainbow. For example, according to the seven colors of the rainbow (red, orange, yellow, green, cyan, blue, and violet), the 0-360° hue ring of the color palette is non-uniformly divided into seven hue intervals, and each hue interval is a gradual transition between two adjacent colors. The construction of the color palette is as follows: Figure 9 As shown. Therefore, after determining the target hue of the target point selected by the user, it is necessary to determine the hue range in which the target point is located and its specific position within the hue range.
[0064] In some optional implementations, step S8031 above includes: Step a1: Obtain the hue range of the color palette. The color palette is pre-divided into a preset number of hue ranges, and different hue ranges correspond to different hue ranges.
[0065] Step a2: Compare the target hue with the range of each hue interval to determine the hue interval in which the target point is located.
[0066] Step a3: Determine the color growth rate of the target point within the hue range based on the lower limit of the range corresponding to the hue range and the target hue.
[0067] Specifically, in embodiments of the present invention, such as Figure 4 and Figure 9 As shown, seven standard colors are used to construct seven dividing lines to determine seven hue intervals. For example, starting with red corresponding to hue 0°, the intervals are: orange to hue 52°, yellow to hue 103°, green to hue 154°, cyan to hue 206°, blue to hue 257°, purple to hue 309°, and finally red to hue 360°. Therefore, the hue intervals corresponding to these intervals are: 0°-52°, 52°-103°, 103°-154°, 154°-206°, 206°-257°, 257°-309°, and 309°-360°. The interval width ΔH varies slightly between different hue intervals; this is only an example and not a limitation. Within each interval, there is a gradual transition between two adjacent colors. Therefore, an independent piecewise linear interpolation formula is used to map the hue H to the intensity values of the R, G, and B components. For example, the intensity values of R, G, and B for red are 255, 0, and 0, respectively; the intensity values of R, G, and B for orange are 255, 165, and 0, respectively. In the "red to orange" range (0°-52°), the G component increases linearly from 0 to 165 / 255. The intensity values of R, G, and B for yellow are 255, 255, and 0, respectively. In the "orange to yellow" range (52°-103°), the G component increases linearly from 165 / 255 to 1, and so on. This allows for precise control of the blending curve for each color transition segment based on the color palette.
[0068] Therefore, after determining the target hue of the target point, the target hue is compared with the upper and lower limits of each hue interval range to determine the hue interval where the target hue is located. Further, based on the lower limit of the range corresponding to the hue interval and the target hue, the color growth amplitude Rotate of the target point in the hue interval is determined. The color growth amplitude Rotate is used to quantify the smooth change ratio of the RGB components in the hue interval. In essence, it is the relative position ratio of the current hue in a specific interval, that is, starting from the lower limit hue of the interval and taking the interval width as the total range, calculating the relative offset ratio of the current target hue in this interval, and the value range is 0 to 1.
[0069] For example, when Rotate = 0, the current hue is at the starting point of the interval, corresponding to the minimum increment of the RGB components. For example, at the starting point of the red - orange interval, the G component is 0; when Rotate = 1, the current hue is at the end point of the interval, corresponding to the maximum increment of the RGB components. For example, at the end point of the red - orange interval, the G component is 165 / 255; when 0 < Rotate < 1, the current hue is in the middle of the interval, and the increment of the RGB components changes linearly in proportion. For example, when Rotate = 0.5, the G component is 0.5×165 / 255 = 82.5 / 255 = 0.323529. Therefore, the calculation formula of the color growth amplitude Rotate is as follows:
[0070] Step S8032, determine the color component intensity and the white compensation component intensity according to the target brightness and the target saturation.
[0071] Specifically, in the embodiments of the present invention, the LED lamp ball has the characteristic that the input current and the actual luminous brightness are non - linear, that is, the luminous efficiency is low at low brightness and the efficiency is saturated at high brightness. Therefore, it is necessary to process the target brightness of the target point to ensure that the brightness selected by the user on the color palette is visually consistent with the actual light emitted by the LED lamp ball, and to avoid problems such as lack of hierarchy in the dark part and over - exposure in the bright part caused by the deviation of the RGB intensity calculation.
[0072] In some optional embodiments, the above - mentioned step S8032 includes: Step b1, perform gamma pre - processing on the target brightness to obtain the linear - space brightness.
[0073] Step b2, calculate the product of the linear - space brightness and the target saturation to obtain the color component intensity.
[0074] Step b3, calculate the product of the linear - space brightness and the saturation difference, where the saturation difference is the difference between the preset maximum saturation and the target saturation, to obtain the white compensation component intensity.
[0075] Specifically, in this embodiment of the invention, the target brightness is the perceived brightness set by the user through a color palette, and the target saturation is the color purity converted from the normalized radius of the color palette. If the target brightness (e.g., 50%) is directly used as the driving signal, the actual luminous brightness of the LED will be far lower than 50%, and the human eye's perception of brightness is also non-linear. Therefore, to ensure that the brightness set by the user, the actual luminous brightness of the LED, and the brightness perceived by the human eye are consistent, the industry-standard gamma power function transformation is used to convert the non-linear target brightness V into a linear spatial brightness V2 that conforms to the LED hardware characteristics and human vision.
[0076] Furthermore, based on this, the product of linear space luminance V2 and target saturation S is first calculated to obtain the color component intensity c, i.e., c = V28S. The color component intensity c represents the intensity of the pure color part that mixes the target hue, i.e., the luminous intensity of the pure color component after the RGB three primary colors are mixed according to the target hue ratio, which determines the basic vividness of the color. Secondly, the product of linear space luminance V2 and saturation difference ΔS is calculated to obtain the white compensation component intensity m, where the saturation difference ΔS is the difference between the preset maximum saturation (e.g., 1) and the target saturation S. Therefore, m = V2*(1-S). The white compensation component intensity m represents the intensity of the white component that supplements the luminance. Its function is to maintain the overall luminance by supplementing the white component when the saturation S decreases, as the pure color part decreases. This avoids the problem of luminance decreasing synchronously when saturation decreases in traditional solutions.
[0077] Step S8033: Determine the initial RGB intensity of the target point based on the color component intensity and color growth rate.
[0078] Specifically, in this embodiment of the invention, the initial RGB intensity of the target point in the hue range is determined based on the color component intensity *c* and the color growth rate *Rotate*. For example, in the red-orange range, the initial R intensity is *c*, the initial G intensity is *c* × *Rotate* × 165 / 255, and the initial B intensity is 0; in the orange-yellow range, the initial R intensity is *c*, the initial G intensity is *c* × *165 / 255* + *Rotate* × 165 / 255, and the initial B intensity is 0; in the yellow-green range, the initial R intensity is *c*, the initial G intensity is *c* × *1* × *Rotate*, and the initial B intensity is 0; and so on, until in the magenta range, the initial R intensity is *c*, the initial G intensity is 0, and the initial B intensity is *c* × *1* × *Rotate*. The embodiments of the present invention adopt a strategy of fixing one primary color and adjusting one primary color (such as fixing R and adjusting G in the red-orange range), combined with the linear adjustment of Rotate, to ensure that there are no jumps in the RGB components within the range, which fits the natural spectrum transition and ensures that the light effect with more natural and smooth brightness transition is produced. This fundamentally avoids the problem of dark mid-tones and dull colors caused by the non-linear response of LEDs.
[0079] Step S8034: Correct the initial RGB intensity based on the intensity of the white compensation component to obtain the target RGB intensity.
[0080] Specifically, in this embodiment of the invention, the initial RGB intensity only includes the pure color portion, with a brightness of c, which is less than the linear space brightness V2. If the LED is directly driven, it will result in insufficient brightness, and the lower the saturation, the larger the brightness gap, and the darker the visual effect. Therefore, the initial RGB intensity needs to be corrected based on the white compensation component intensity m, i.e., target RGB intensity = initial RGB intensity + m, so that the white compensation component intensity m is superimposed on the initial RGB to fill the brightness gap and ensure that the total brightness is the linear space brightness V2, thereby ensuring that the brightness and saturation of the colors are correctly reproduced. At the same time, if the corrected component is >1 (normalized value), it is calculated as 1 (corresponding to 255); if it is <0, it is calculated as 0. Finally, the normalized target RGB component is multiplied by 255 and rounded to obtain the integer RGB value that the LED can execute.
[0081] The color mapping method provided by this invention pre-constructs a color palette based on a rainbow color ring canvas. It determines the color space information of a target point selected by the user on the palette, and then determines the target RGB intensity based on this color space information. The method then drives the light-emitting device to map the target color of the target point based on this target RGB intensity. This invention constructs a precise color palette based on a rainbow color ring canvas and combines the advantages of HSV and sRGB driving schemes on this precise palette. This ensures that the colors displayed by the LED sphere and the colors selected on the palette correspond to the actual light, guaranteeing consistency between color sampling and display. It achieves continuous and accurate reproduction of natural spectrum colors on the LED sphere, meeting color requirements in multiple scenarios and improving user experience and satisfaction.
[0082] This embodiment also provides a color mapping device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware implementations, or a combination of software and hardware, are also possible and contemplated.
[0083] This embodiment provides a color mapping device, such as Figure 10 As shown, it includes: The coordinate information acquisition module 1001 is used to acquire the coordinate information of the target point selected by the user on the color palette, which is a canvas containing multiple colors.
[0084] The color space information determination module 1002 is used to determine the color space information of the target point on the color palette based on the coordinate information.
[0085] The color mapping module 1003 is used to determine the target RGB intensity based on the color space information, so as to drive the light-emitting device to map the target color corresponding to the target point based on the target RGB intensity.
[0086] In some optional implementations, the color space information determination module 1002 includes: The coordinate transformation unit is used to convert coordinate information into polar coordinates relative to the palette.
[0087] The hue determination unit is used to determine the target hue and normalized radius of the target point on the color palette based on polar coordinates.
[0088] The saturation and brightness determination unit is used to determine the target saturation and target brightness of the target point on the color palette based on the normalized radius.
[0089] In some alternative implementations, the color mapping module 1003 includes: The first color calculation unit is used to determine the hue range of the target point and the color growth rate within the hue range based on the target hue.
[0090] The second color calculation unit is used to determine the intensity of the color components and the intensity of the white compensation components based on the target brightness and target saturation.
[0091] The initial intensity determination unit is used to determine the initial RGB intensity of the target point based on the color component intensity and the color growth rate.
[0092] The target intensity determination unit is used to correct the initial RGB intensity based on the intensity of the white compensation component to obtain the target RGB intensity.
[0093] In some alternative implementations, the first color calculation unit includes: The hue range determination subunit is used to obtain the hue range of the color palette. The color palette is pre-divided into a preset number of hue ranges, and different hue ranges correspond to different hue ranges.
[0094] The hue range comparison sub-unit is used to compare the target hue with each hue range to determine the hue range in which the target point is located.
[0095] The color growth rate calculation subunit is used to determine the color growth rate of the target point in the hue range based on the lower limit of the range corresponding to the hue range and the target hue.
[0096] In some alternative implementations, the second color calculation unit includes: The linear spatial brightness calculation subunit is used to perform gamma preprocessing on the target brightness to obtain linear spatial brightness.
[0097] The color component intensity calculation subunit is used to calculate the product of linear spatial brightness and target saturation to obtain the color component intensity.
[0098] The compensation component intensity calculation subunit is used to calculate the product of the linear spatial brightness and saturation difference to obtain the white compensation component intensity. The saturation difference is the difference between the preset maximum saturation and the target saturation.
[0099] The color mapping apparatus provided in this embodiment of the invention can execute the color mapping method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the various modules and units described above are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0100] Figure 11 This is a schematic diagram of the structure of a control module in a lighting display device provided in an embodiment of the present invention.
[0101] The following is a detailed reference. Figure 11 The diagram illustrates a structural schematic suitable for implementing a control module in an embodiment of the present invention. The control module may include a processor (e.g., a central processing unit, graphics processing unit, etc.) 1101, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 1102 or a program loaded from memory 1108 into random access memory (RAM) 1103. The RAM 1103 also stores various programs and data required for the operation of the control module. The processor 1101, ROM 1102, and RAM 1103 are interconnected via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0102] Typically, the following devices can be connected to I / O interface 1105: input devices 1106 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1107 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; memory 1108 including, for example, magnetic tape, hard disk, etc.; and communication devices 1109. Communication device 1109 allows the control module to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 11 A control module with various devices is shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.
[0103] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 1109, or installed from a memory 1108, or installed from a ROM 1102. When the computer program is executed by the processor 1101, it performs the functions defined in the color mapping method of the embodiments of the present invention.
[0104] Figure 11 The control module shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.
[0105] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the color mapping method shown in the above embodiments is implemented.
[0106] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0107] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A color mapping method, characterized in that, The method includes: Obtain the coordinate information of the target point selected by the user on the color palette, which is set up as a canvas containing multiple colors; The color space information of the target point on the color palette is determined based on the coordinate information. The target RGB intensity is determined based on the color space information, and the light-emitting device is driven to map the target color corresponding to the target point based on the target RGB intensity.
2. The method according to claim 1, characterized in that, The color palette is circular, and the color space information includes: target hue, target saturation, and target brightness. Determining the color space information of the target point on the color palette based on the coordinate information includes: The coordinate information is converted into polar coordinates relative to the color palette; The target hue and normalized radius of the target point on the color palette are determined based on the polar coordinates. The target saturation and target brightness of the target point on the color palette are determined based on the normalized radius.
3. The method according to claim 2, characterized in that, Determining the target RGB intensity based on the color space information includes: The hue range of the target point and the color increase range in the hue range are determined based on the target hue. The color component intensity and the white compensation component intensity are determined based on the target brightness and the target saturation. The initial RGB intensity of the target point is determined based on the color component intensity and the color growth rate. The initial RGB intensity is corrected based on the intensity of the white compensation component to obtain the target RGB intensity.
4. The method according to claim 3, characterized in that, The step of determining the hue range of the target point and the color increase magnitude within the hue range based on the target hue includes: Obtain the hue range of the color palette, which is pre-divided into a preset number of hue ranges, with different hue ranges corresponding to different hue ranges; The target hue is compared with each of the hue ranges to determine the hue range in which the target point is located; The color growth rate of the target point in the hue range is determined based on the lower limit of the range corresponding to the hue range and the target hue.
5. The method according to claim 3, characterized in that, The step of determining the color component intensity and white compensation component intensity based on the target brightness and the target saturation includes: The target brightness is preprocessed with gamma to obtain linear spatial brightness; The color component intensity is obtained by calculating the product of the linear spatial brightness and the target saturation. The intensity of the white compensation component is obtained by calculating the product of the linear spatial brightness and saturation difference, where the saturation difference is the difference between the preset maximum saturation and the target saturation.
6. A color mapping device, characterized in that, The device includes: The coordinate information acquisition module is used to acquire the coordinate information of the target point selected by the user on the color palette, which is a canvas containing multiple colors. A color space information determination module is used to determine the color space information of the target point on the color palette based on the coordinate information. The color mapping module is used to determine the target RGB intensity based on the color space information, so as to drive the light-emitting device to map the target color corresponding to the target point based on the target RGB intensity.
7. A lighting display device, characterized in that, include: Control module and light-emitting device; The control module includes a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the color mapping method according to any one of claims 1 to 5.
8. The lighting display device according to claim 7, characterized in that, The lighting display device also includes: a color palette and a driving module; The color palette is connected to the control module, and the color palette is set up with a canvas containing multiple colors; The driving module is connected to the control module and is used to drive the light-emitting device to emit light based on the target RGB intensity output by the control module.
9. The lighting display device according to claim 7, characterized in that, The light-emitting device is an LED bulb.
10. An electrical appliance, characterized in that, include: The operation panel and the lighting display device according to any one of claims 7 to 9, wherein the color palette of the lighting display device is disposed on the operation panel.
11. The electrical equipment according to claim 10, characterized in that, The electrical device is a purifier.