As I dig into colouring pixels more and more through p5.js (A JavaScript library for creative coding), the first thing that jumped into my mind is Andy Warhol's prints. It would be great if I could "cooperate" with Andy Warhol for this live video mirror project.
 The path I chose is to work with the mapping of the brightness introduced by Mr Dan Schiffman from his Coding Train Series. By drawing the rectangle with pixels, I could change the vScale easily to change the rectangle size, to get a different effect.
Since I need to manipulate different colours for each image, I created 3 functions to draw the different images, so I won't confuse myself by giving variables to different colours...And within each function, I hard-coded the colours by trying different brightness values. The process is definitely not smart, but it did help me understand better how the brightness works. Importing resources like face detection from ml5 sure is an easy way to apply colours for this self-portrait project, but by doing this way, I believe I got myself more familiar with the basics.
Link to the full code: https://editor.p5js.org/yz7720/sketches/RjnvQqKKZ​​​​​​​

You may also like

Back to Top