# C_ColorUtil: World of Warcraft Forever API

Forever 1.60.1 (70959), Interface 16001, Lua 5.1, from Blizzard's own API documentation. Page: https://wowaddons.gg/forever-api/C_ColorUtil

## Functions

### C_ColorUtil.ConvertHSLToHSV

```lua
hsvH, hsvS, hsvV = C_ColorUtil.ConvertHSLToHSV(hslH, hslS, hslL)
```

Converts an unpacked HSL color to HSV.

Arguments:
- `hslH`: number
- `hslS`: number
- `hslL`: number

Returns:
- `hsvH`: number
- `hsvS`: number
- `hsvV`: number

### C_ColorUtil.ConvertHSVToHSL

```lua
hslH, hslS, hslL = C_ColorUtil.ConvertHSVToHSL(hsvH, hsvS, hsvV)
```

Converts an unpacked HSV color to HSL.

Arguments:
- `hsvH`: number
- `hsvS`: number
- `hsvV`: number

Returns:
- `hslH`: number
- `hslS`: number
- `hslL`: number

### C_ColorUtil.ConvertHSVToRGB

```lua
rgbR, rgbG, rgbB = C_ColorUtil.ConvertHSVToRGB(hsvH, hsvS, hsvV)
```

Converts an unpacked HSV color to RGB.

Arguments:
- `hsvH`: number
- `hsvS`: number
- `hsvV`: number

Returns:
- `rgbR`: number
- `rgbG`: number
- `rgbB`: number

### C_ColorUtil.ConvertRGBToHSV

```lua
hsvH, hsvS, hsvV = C_ColorUtil.ConvertRGBToHSV(rgbR, rgbG, rgbB)
```

Converts an unpacked RGB color to HSV. For achromatic inputs, the returned hue will be -1.

Arguments:
- `rgbR`: number
- `rgbG`: number
- `rgbB`: number

Returns:
- `hsvH`: number
- `hsvS`: number
- `hsvV`: number

### C_ColorUtil.GenerateTextColorCode

```lua
textColorCode = C_ColorUtil.GenerateTextColorCode(color)
```

Generates a hex color code suitable for use in text color code markup.

Arguments:
- `color`: colorRGB. Color to generate a hex color code from.

Returns:
- `textColorCode`: string. Hex representation of the color formatted as an 8-byte ARGB string, with alpha forced to 255.

### C_ColorUtil.WrapTextInColor

```lua
coloredText = C_ColorUtil.WrapTextInColor(text, color)
```

Wraps a given string with color code markup.

Arguments:
- `text`: cstring. Text to be wrapped in color markup.
- `color`: colorRGB. Color to apply to the text.

Returns:
- `coloredText`: string. The input text wrapped in '|c' and '|r' quoted code sequences for the supplied color.

### C_ColorUtil.WrapTextInColorCode

```lua
coloredText = C_ColorUtil.WrapTextInColorCode(text, textColorCode)
```

Wraps a given string with color code markup.

Arguments:
- `text`: cstring. Text to be wrapped in color markup.
- `textColorCode`: cstring. Color to apply to the text, formatted as an 8-byte ARGB string as returned by GenerateTextColorCode.

Returns:
- `coloredText`: string. The input text wrapped in '|c' and '|r' quoted code sequences for the supplied color.

---
Make an addon with your AI: tell it "Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it."
