Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Looking for a good explanation on how to make a cololr picker?

Asked by 5 years ago

For example the colour picker in paint.net, or something. I'd want the player to be able to choose from a colour wheel and then it colours their house or something similar.

0
I need an explanation/push in right direction, no clue where to start. Twenty1chickens 4 — 5y
0
There's a free model. Find it in the library. User#22219 20 — 5y
0
Name? Twenty1chickens 4 — 5y
0
No doesn't work. Twenty1chickens 4 — 5y

1 answer

Log in to vote
0
Answered by
saenae 318 Moderation Voter
5 years ago

Hey Twenty!

So, I've never actually done this before myself, but having experimented with how the color picker in Roblox works, here's how I'd tackle it:

  1. Get an image of a color picker (preferably a rectangular one, it'll be easier).
  2. Make a crosshair that you track the position of, and can click and drag
  3. Ensure the crosshair is bound to the rectangle
  4. The 'x' coordinate of your crosshair should mark the Hue. The 'y' coordinate should be the saturation.
  5. You'll probably need a slider that changes the value, so just take the brightest color of your sat/hue and throw it beneath a black-to-transparent gradient image.

Note: You can change a part's Hue, Saturation, and Value with Color3.fromHSV(hue, sat, val).

The max Hue in Roblox is 359 and the saturation's max is 255. Therefore, it might be in your best interest to find an image around that size (to make the math a bit easier). The value slider's width doesn't matter, but a height of 255 is again going to make it easier on you.

I hope that helps!

Ad

Answer this question