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
import * as color from "wowlua:color" local orange = color.hex("ff880")print(orange:GetRGB())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
$ wowlua explain E8390 E8390 (error): Invalid color hex literal