Reproduction Steps
Title basically says it all. I should not have to pcall this basic function. If the values are out of bounds, clamp it.
Repro: Put this in the command bar.
=Color3.fromRGB(500,100,-10):ToHex()
Unable to convert color to valid hex code
Stack Begin
Script ‘print(Color3.fromRGB(500,100,-10):ToHex())’, Line 1
Stack End
Expected Behavior
Color3:ToHex() should just work. Clamp the values, but it is very unintuitive and annoying to need a pcall on this basic utility function.
Actual Behavior
Unable to convert color to valid hex code
Stack Begin
Script ‘print(Color3.fromRGB(500,100,-10):ToHex())’, Line 1
Stack End
Workaround
Manually clamping each channel before constructing a new Color3 object to call ToHex on.
Issue Area: Engine
Issue Type: Other
Impact: Low
Frequency: Sometimes