# Accessing data from color picker array

**URL:** <https://discourse.processing.org/t/accessing-data-from-color-picker-array/14960>\
**Category:** Coding Questions\
**Created:** [October 27, 2019, 4:55am UTC](https://discourse.processing.org/t/accessing-data-from-color-picker-array/14960 "2019-10-27T04:55:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MackMurphy](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@MackMurphy](https://discourse.processing.org/u/MackMurphy)\
**Post date:** [October 27, 2019, 4:55am UTC](https://discourse.processing.org/t/accessing-data-from-color-picker-array/14960/1 "2019-10-27T04:55:19Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [October 27, 2019, 7:41am UTC](https://discourse.processing.org/t/accessing-data-from-color-picker-array/14960/2 "2019-10-27T07:41:32Z")

</div>

r g b get with the red green blue function ON THE COLOR:

> **[p5.js Web Editor](https://editor.p5js.org/kll/sketches/l094yegrh)**
>
> A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners.

please understand that the

> color picker

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

* * *

for ref:

> **[\- HTML: HyperText Markup Language | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color)**
>
> elements of type color provide a user interface element that lets a user specify a color, either by using a visual color picker interface or by entering the color into a text field in #rrggbb hexadecimal format.

> **[reference | p5.js](https://p5js.org/reference/#/p5/createColorPicker)**
>
> p5.js a JS client-side library for creating graphic and interactive experiences, based on the core principles of Processing.

> **[p5.js Web Editor](https://editor.p5js.org/figraham/sketches/SJ9vUWAeV)**
>
> A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners.

> **[reference | p5.js](https://p5js.org/reference/#/p5/red)**
>
> p5.js a JS client-side library for creating graphic and interactive experiences, based on the core principles of Processing.

> **[reference | p5.js](https://p5js.org/reference/#/p5/green)**
>
> p5.js a JS client-side library for creating graphic and interactive experiences, based on the core principles of Processing.

> **[reference | p5.js](https://p5js.org/reference/#/p5/blue)**
>
> p5.js a JS client-side library for creating graphic and interactive experiences, based on the core principles of Processing.

---

<div class="post-metadata">

**Author:** ![MackMurphy](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@MackMurphy](https://discourse.processing.org/u/MackMurphy)\
**Post date:** [October 27, 2019, 2:08pm UTC](https://discourse.processing.org/t/accessing-data-from-color-picker-array/14960/3 "2019-10-27T14:08:14Z")

</div>

Ok, thank you so much!
