---
metadata:
  - name: generator
    content: Diplodoc Platform v5.54.5
alternate:
  - https://divkit.tech/docs/en/concepts/divs/2/color_variable.md
  - https://divkit.tech/docs/ru/concepts/divs/2/color_variable.md
  - href: en/concepts/divs/2/color_variable.md
    type: text/markdown
    title: Markdown version
  - href: ../../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://divkit.tech/docs/en/llms.txt

# color_variable
Variable — HEX color as a string.

## Parameters
| Parameters | Description |
| --- | --- |
| `name` | <p>**string**</p><p>Required parameter.</p><p>Variable name.</p> |
| `type` | <p>**string**</p><p>Required parameter.</p><p>The value must always be `color`.</p> |
| `value` | <p>**string**</p><p>Required parameter.</p><p>Value. Supports expressions for variable initialization.</p><p>Valid formats: `#RGB`, `#ARGB`, `#RRGGBB`, `#AARRGGBB`.</p> |

<details>
<summary>JSON</summary>

```json
{
  type*: "color",
  name*: "string",
  value*: "string"
}
```
</details>
