Accessing data from color picker array

Hi, I’m using createColorPicker in p5.js and was wondering if there was any way to individually access the r, g, and b values from it, rather than using the entire color with colorPickerName.color(), and if there is, what the syntax would be, thanks for your time!

1 Like

r g b get with the red green blue function ON THE COLOR:
https://editor.p5js.org/kll/sketches/l094yegrh

please understand that the

color picker

is not a p5.js function, it is a wrapped DOM HTML “element”


for ref:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color
https://p5js.org/reference/#/p5/createColorPicker
https://editor.p5js.org/figraham/sketches/SJ9vUWAeV
https://p5js.org/reference/#/p5/red
https://p5js.org/reference/#/p5/green
https://p5js.org/reference/#/p5/blue

1 Like

Ok, thank you so much!

1 Like