We create 3 variables for rgb colors red, green nad blue. In the setup we create the slider and we determinate that r variable is red the g is green and the b is blue. Then we fill the fill with uor variables and that's it.
See the Pen facecolors by Alfonso (@sito12) on CodePen.