Color wheel in React

Does it make sense to make the handle draggable? If so, how? Oh, and the main question, how to determine the color the handle is on.
No description
19 Replies
Tester
Tester2mo ago
To determine the color I think the best will be to use the position In your case, could you take a look at polar coordinates?
Mirrox
MirroxOP2mo ago
Polar coordinates?
Tester
Tester2mo ago
Btw, if you want to do it without the image but in square, you could layer 3 gradients, for colour, white and black at the end Yes Cause your image is Circular So you could take polar coordinates from the center of the image And adjust it Angle is H Distance is S Right handle is V
Mirrox
MirroxOP2mo ago
Okay that's interesting Thanks
Tester
Tester2mo ago
Yw
Mirrox
MirroxOP2mo ago
Can u explain that once more? I'd like to use the gradient but I'm not sure what you mean by that
Tester
Tester2mo ago
3 frames with ui gradients Or at least 2 have gradients 1st is the color
Mirrox
MirroxOP2mo ago
Ohh
Tester
Tester2mo ago
2 is white gradient from right to left with left fully transparent
Mirrox
MirroxOP2mo ago
Yh got it Ty
Tester
Tester2mo ago
3rd is black gradient from bottom to top with top fully transparent You have to layer is that order otherwise it's going to be messed up
Mirrox
MirroxOP2mo ago
What do u think would be better for the user Color wheel or
Tester
Tester2mo ago
Doesnt matter
Mirrox
MirroxOP2mo ago
Ic
Tester
Tester2mo ago
Btw if you want a cool way to input the colour by numbers don't follow the roblox's colour picker design I think it's too chunky The best Ive seen is you have 3 texboxes for rbg Then if you click on RGB text on the bottom, it switches to hsv And then to hex but with 1 textbox Then other suggestion will be, don't store position in color esp rgb You cat get the position from it at the start but no more If you gonna set colour to back e.g. black, it's going to mess up sliders
Mirrox
MirroxOP2mo ago
?
Tester
Tester2mo ago
Do you want the user to set his own colour via number or hex?
Mirrox
MirroxOP2mo ago
Doesn't really matter to me Rn it's hex cuz it's easier in my opinion
Tester
Tester2mo ago
Ok

Did you find this page helpful?