Please click this link, especially if it does not work on your phone. Just move the cursor up and down.
The map function in p5.js
var col = 0; var backgr = 0; function setup() { createCanvas(600, 400); } function draw(){ col = mouseY col = map(mouseY, 0, 400, 125, 255) backgr = map(mouseY, 0, 400, 0, 125) background(backgr); fill(col) ellipse(200, mouseY, 64, 64) }