What does "doesn't work correctly" mean exactly?
Can you describe the actual result and the expected result?
See screenshots. Sometimes i get weird a weird color and i can't figure out why that happens.
Plus can you narrow it down in your project a bit more? I don't intend to read your whole project, just to help with this bug of yours.
Pretty much anything irrelevant to this issue has been stripped out already. sorry, but I don't have much more that i can remove.
As I don't know TGUI, is this a standard TGUI element? Maybe asking on the TGUI forum will be more efficient.
TGUI does not have a colorpicker element, it has slider, checkbox, textlabel, buttons, etc.
Hence the need to write my own.
I can try to explain better though;
I'm taking an int from each of my 3 scrollbars and feed them into HSV() to construct a color, i send that color through HSVToRGB() to update my chosen element
Both functions are inside:
https://bitbucket.org/Ryder17z/color-picker-sfml-tgui/src/master/src/ColorHeader.hI do everything related inside
https://bitbucket.org/Ryder17z/color-picker-sfml-tgui/src/master/src/main.cpplines 205-267
the rest is pretty standard stuff, init window, load resources (in this case gui element styling, respective default values)
I hope that is enough details