v0.13.7
errors and warnings / stdlib

errors and warnings / stdlib / E8390

E8390 error

Invalid color hex literal

area
stdlib (x8xxx)
fails the build
yes

A literal passed to color.hex is not a color. Write six hex digits rrggbb, or eight aarrggbb with the alpha first, optionally after #. Literals are checked and folded into CreateColor(r, g, b, a) at compile time, so a wrong one is caught before the addon runs.

Example

× failswowlua
import * as color from "wowlua:color" local orange = color.hex("ff880")print(orange:GetRGB())
✓ compileswowlua
import * as color from "wowlua:color" local orange = color.hex("ff8800")print(orange:GetRGB())

The compiler reports it like this:

error[E8390]: `ff880` is not a color: write "rrggbb" or "aarrggbb" in hex digits, optionally after `#`
  ┌─ src/main.wowlua:3:26
  │
3 │ local orange = color.hex("ff880")
  │                          ^^^^^^^ here

Offline

terminal
$ wowlua explain E8390
E8390 (error): Invalid color hex literal

source on GitHub ↗