Hexadecimal numbers aren't recognized by IntelliSense

Hexadecimal numbers (0xXYZ) aren’t recognized by IntelliSense. I thought Lua didn’t support hexadecimal numbers when IntelliSense decided to reject it…

Code like

self.color = Color3.new(math.floor(colNum / 0x10000) / 0xFF, (math.floor(colNum / 0x100) % 0x100) / 0xFF, (colNum % 0x100) / 0xFF);

will display an error at the first hex color, but works fine runtime.

Quite confusing.

Curious, why are you using Hexadecimals? What’s wrong with Color3?

It also happens with simple cases anyway; like

local x = 0x1;

I’m using those numbers to convert string represented hex colors (like 488BC0) to Color3 values. Hexadecimal numbers make a million times more sense than decimal numbers in cases like this or when handling any bit-aligned stuff.

Nice find