Design HEX becomes fromRGB
- Input
- #FF5733
- Expected output
- Color3.fromRGB(255, 87, 51)
fromRGB uses the same 0-255 scale any image editor color picker shows, making it the most direct way to paste a HEX value copied from outside Roblox Studio.
HEX to Color3
The number one mix-up for anyone starting in Luau is the scale: Color3.fromRGB(r, g, b) takes integers 0 to 255, the same format any image editor shows for HEX, while Color3.new(r, g, b) expects fractions from 0 to 1, the engine's actual internal representation. This tool converts HEX, RGB, HSV and all three Color3 forms at once, starting from any one of them as input.
fromRGB uses the same 0-255 scale any image editor color picker shows, making it the most direct way to paste a HEX value copied from outside Roblox Studio.
The green channel, 87 ÷ 255, is the repeating decimal 0.34117647... rounded to 0.341; it is the channel most often typed wrong when someone converts by hand instead of using the tool.
This HEX matches the legacy "Bright blue" palette entry byte for byte, so the tool shows the old name alongside the modern Color3, useful for anyone inheriting an old script that still uses BrickColor.new.
Color3.fromRGB takes integers from 0 to 255 (e.g. Color3.fromRGB(255, 89, 0)) and is the most intuitive way because it matches any color picker. Color3.new takes floats from 0 to 1 (e.g. Color3.new(1, 0.349, 0)) and is the engine's internal form. Both produce exactly the same color; use whichever you prefer, many pick fromRGB because it is more readable.
Color3.fromRGB takes integers 0 to 255, the same scale as HEX and any image editor; Color3.new takes fractions 0 to 1, the actual internal representation Roblox's engine stores, so swapping one constructor for the other without dividing or multiplying by 255 produces a completely different color.
255 factors into 3 × 5 × 17, and 87 is not a multiple of any of those factors in a way that makes the division land exactly; only values like 0, 51, 85, 102, 170, 204 or 255, multiples of 255's divisors, resolve to an exact decimal fraction, everything else becomes a rounded repeating decimal.
No: all three Color3.fromHSV parameters are 0-to-1 fractions, hue included, so a hue of 205° on the common 0-360 scale first needs to be divided by 360, becoming 0.569, not the raw value 205 that most people type in by mistake.
Because the tool only recognizes a small, verified subset of Roblox's legacy BrickColor palette, each entry with a fixed RGB value; a color needs to match one of those values exactly to get a name, and the vast majority of possible colors simply have no counterpart in the legacy table.
Color3.fromRGB(255, 89, 0)Color3.new(1, 0.349, 0)Color3.fromHSV(0.058, 1, 1)#FF5900rgb(255, 89, 0)21°, 100%, 100%Conversion runs locally in your browser; nothing is sent to any server.