I have made a color picker in the past you can check out it’s code to maybe help you understand it better.