Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

LibGDX - Color Picker

How to implement color picker in LibGDX like below:

enter image description here

Any help will be appreciated.

like image 306
Nolesh Avatar asked Dec 20 '22 01:12

Nolesh


1 Answers

Basically you would have an Image with the texture in your question, and detect touches/drags over it. Once you know the coordinates you're on, and having the Pixmap, you can know the color code with.-

public int getPixel(int x, int y)

Hope it helps.

like image 71
ssantos Avatar answered Jan 03 '23 15:01

ssantos