## General - Color Light

### Function Introduction
- The color value of Tuya Color Light DP adopts [HSV color model](https://baike.baidu.com/item/HSV%E9%A2%9C%E8%89%B2%E6%A8%A1%E5%9E%8B/21501482), and the string value corresponding to the HSV model color is sent through the panel.
- 1. Hue (H)
Hue adjustment range: 0-360, the range of the value sent by the panel is 0-360, and the color ring adjustment range and the value sent by the panel are in a linear correspondence.
- 2. Saturation (S)
Saturation adjustment range: 0%-100%, the range of the value sent by the panel is 0-1000, and the color ring adjustment range and the value sent by the panel are in a linear correspondence.
- 3. Brightness (V)
Brightness adjustment range: 1%-100%, the value range sent by the panel is 10-1000, and the color ring adjustment range and the value sent by the panel are linearly corresponding.
- Color light supports display:
- [Three channels](/en/miniapp/solution-ai/ability/lamp-solution/lamp#number-of-channels)
- [Four channels](/en/miniapp/solution-ai/ability/lamp-solution/lamp#number-of-channels)
- [Five channels](/en/miniapp/solution-ai/ability/lamp-solution/lamp#number-of-channels)

### DP protocol

- Real-time DP: control_data (**For specific device availability, refer to [Device Communication Protocol](/en/miniapp/solution-ai/ability/lamp-solution/lamp/ability-set/protocols)**)

|Serial number | Name | Number of characters | Identifier | Data type | Field attributes | Field description|
| ----|---- | ------- |---|---- |---|---- |
|1|Change mode|1|change_mode|Enumeration|Jump: 0, Gradual: 1| |
|2|Hue|4|H|Value|Maximum: 360 Minimum: 0 Step: 1 Multiple: 0| Hue: 0 - 360, 0X0000 - 0X0168|
|3|Saturation|4|S|Value|Maximum: 1000 Minimum: 0 Step: 1 Multiple: 0| Saturation: 0 - 1000, 0X0000 - 0X03E8|
|4|Brightness|4|V|Value|Maximum: 1000 Minimum: 0 Step: 1 Multiple: 0| Brightness: 0 - 1000, 0X0000 - 0X03E8|
|5|White brightness|4|B|Value|Maximum: 1000 Minimum: 0 Step: 1 Multiple: 0| White brightness: 0 - 1000 0X0000 - 0X03E8|
|6|Color temperature value|4|T|Value|Maximum value: 1000 Minimum value: 0 Step: 1 Multiple: 0| Color temperature value: 0 - 1000, 0X0000 - 0X03E8|

- Color light DP: [colour_data](/en/miniapp/solution-ai/ability/lamp-solution/lamp/ability-set/dp-parser/ColourTransformer)

|Serial number | Name | Number of characters | Identifier | Data type | Field attributes | Field description|
| ----|---- | ------- |---|---- |---|---- |
|1|Chroma|4|H|Value|Maximum value: 360 Minimum value: 0 Step: 1 Multiple: 0| Chroma: 0 - 360, 0X0000 - 0X0168|
|2|Saturation|4|S|Value|Maximum value: 1000 Minimum value: 0 Step: 1 Multiple: 0| Saturation: 0 - 1000, 0X0000 - 0X03E8|
|3|Brightness|4|V|Value|Maximum value: 1000 Minimum value: 0 Step: 1 Multiple: 0|Brightness: 0 - 1000, 0X0000 - 0X03E8|

### How to develop
- Monitor, report and send DP according to UI interaction
  - [Specific monitoring and sending examples](/en/miniapp/solution-panel/ability#device-function-point-management)

### Notes
- Protocol issues:
  - Sig Mesh
    - dpCode "control_data" is not supported for real-time sending
    - It is not recommended to have a smearing interaction mode. If the operation is fast, it is easy to lose packets. You can consider the click interaction mode.
    - If the interaction is changed after smearing, it is also possible to send it down.
    - The principle is: a large amount of DP data cannot be sent down in a short period of time.
  - Beacon
    - Since Beacon DP data is only sent down and not reported, the relevant data needs to be stored in the cloud to ensure the synchronization of the status.

### Related materials
- [Function page]: 
  - None
- [Component]:
  1. [Touch slider](/en/miniapp/solution-ai/ability/lamp-solution/lamp/ability-set/component#%E9%80%9A%E7%94%A8%E7%85%A7%E6%98%8E%E8%A7%A6%E6%91%B8%E6%BB%91%E5%8A%A8%E6%9D%A1)
  2. [Lighting basic slider](/en/miniapp/solution-ai/ability/lamp-solution/lamp/ability-set/component#%E9%80%9A%E7%94%A8%E7%99%BE%E5%88%86%E6%AF%94%E6%BB%91%E5%8A%A8%E6%9D%A1)
  3. [Circular color light palette](/en/miniapp/solution-ai/ability/lamp-solution/lamp/ability-set/component#%E9%80%9A%E7%94%A8%E5%9C%86%E5%BD%A2%E5%BD%A9%E5%85%89%E8%89%B2%E7%9B%98)
  4. [Ring color light color plate](/en/miniapp/solution-ai/ability/lamp-solution/lamp/ability-set/component#%E9%80%9A%E7%94%A8%E7%8E%AF%E5%BD%A2%E5%BD%A9%E5%85%89%E8%89%B2%E7%9B%98)
  5. [Bright rectangular color plate component photo](/en/miniapp/solution-ai/ability/lamp-solution/lamp/ability-set/component#%E9%80%9A%E7%94%A8%E6%98%8E%E7%9F%A9%E5%BD%A2%E8%89%B2%E7%9B%98%E7%BB%84%E4%BB%B6%E7%85%A7)
  6. [Lighting color circular block ring](/en/miniapp/solution-ai/ability/lamp-solution/lamp/ability-set/component#%E9%80%9A%E7%94%A8%E7%85%A7%E6%98%8E%E5%BD%A9%E8%89%B2%E5%9C%86%E5%BD%A2%E8%89%B2%E5%9D%97%E7%8E%AF)
  7. [Lighting color card](/en/miniapp/solution-ai/ability/lamp-solution/lamp/ability-set/component#%E9%80%9A%E7%94%A8%E7%85%A7%E6%98%8E%E5%BD%A9%E5%85%89%E8%89%B2%E5%8D%A1)
  8. [Lighting color collection component](/en/miniapp/solution-ai/ability/lamp-solution/lamp/ability-set/component#%E9%80%9A%E7%94%A8%E7%85%A7%E6%98%8E%E8%89%B2%E5%BD%A9%E6%94%B6%E8%97%8F%E7%BB%84%E4%BB%B6)
- [Tutorial]: 
  - None
- [SDK]: 
  - None
- [API]: 
  - None