# Webcam interaction (colour component)

**URL:** <https://discourse.processing.org/t/webcam-interaction-colour-component/30577>\
**Category:** Coding Questions\
**Created:** [June 8, 2021, 5:16pm UTC](https://discourse.processing.org/t/webcam-interaction-colour-component/30577 "2021-06-08T17:16:51Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [June 8, 2021, 5:38pm UTC](https://discourse.processing.org/t/webcam-interaction-colour-component/30577/2 "2021-06-08T17:38:22Z")

</div>

Hello,

I changed topic to p5.js category.

See example here:

> [@Alternative to get() for faster performance?](https://discourse.processing.org/t/alternative-to-get-for-faster-performance/30228/8):
>
> Hello, This topic inspired me! Something I worked on: 
> 
> > **Example of random tiling \< Click here to see code!**
> >
> > // Pixel Manipulation // v1.0.0 // GLV 2021-05-30 let img; let cap; function setup() { createCanvas(640, 480); // Set to video size img = createGraphics(width, height); pixelDensity(1); img.pixelDensity(1); cap = createCapture(VIDEO); cap.hide(); //d = pixelDensity(); // Future! See references. } function draw() { cap.loadPixels(); img.loadPi…

Example may be a bit complicated (moving tiles) but I had to sort out color for pixels and learned this recently.

References:  
[https://p5js.org/reference/#/p5.Image/pixels](https://p5js.org/reference/#/p5.Image/pixels)

Have fun!

`:)`

---

_[View the full topic](https://discourse.processing.org/t/webcam-interaction-colour-component/30577)._
