let rp=((s='.myCanvas',c=document.querySelector(s),ctx=c.getContext('2d')) => (x,y)=>Object.values(ctx.getImageData(x, y, 1, 1).data))();
let pp= ((s='.myCanvas',c=document.querySelector(s),ctx=c.getContext('2d'),id=ctx.createImageData(1,1)) => (x,y,r=0,g=0,b=0,a=255)=>(id.data.set([r,g,b,a]),ctx.putImageData(id, x, y),c))()
// draw point
pp(50,60, 198,236,247,250) // x,y, r,g,b,a
// read color
let c = rp(50,60);
console.log(c);
<canvas class="myCanvas" width=100 height=100 style="background: black"></canvas>