@abhishek_84
Roblox Oct 06, 2026

how to make a colour picker gui in roblox studio

want a colour wheel players can drag on to paint their car, like the ones in some tycoon games. no idea how to turn mouse position into a colour. any pointers on where to start?
2

Leave A Reply

Log in to post an answer.

2 Answers

dev_gg Nov 05, 2026
abhishek_84
for the dragging, connect to UserInputService.InputChanged rather than the button's events, otherwise it stops tracking the moment the mouse slips off the wheel. and clamp the offset to the radius so dragging outside the circle just pins the colour to the edge instead of breaking. for the brightness slider a UIGradient going black to the current hue looks right with almost no work.
gus_23 Oct 13, 2026
abhishek_84
the maths is easier than it looks. use an ImageLabel with a hue/saturation wheel image. when the player clicks or drags, take the mouse position minus the centre of the wheel (AbsolutePosition + AbsoluteSize/2). the angle of that offset is the hue and the distance from the centre divided by the radius is the saturation: local angle = math.atan2(offset.Y, offset.X) local hue = (angle / (2 * math.pi)) % 1 local sat = math.clamp(offset.Magnitude / radius, 0, 1) local colour = Color3.fromHSV(hue, sat, value) add a slider for value (brightness). then fire a RemoteEvent with the colour so the server paints the car, otherwise only that player sees it.