basically i want to make A big tag with width & height both 512 pixels that displays all the shades of RGB where red is 0, green is the x-coordinate divided by 2, and blue is the y-coordinate divided by two
var c = document.getElementById("big");
var ctx = c.getContext("2d");
console.log(ctx.height);
var my_gradient = ctx.createLinearGradient(c.width/2, c.height/2, 120,120);
my_gradient.addColorStop(0, "red");
my_gradient.addColorStop(0.5 ,"green");
my_gradient.addColorStop(1, "blue");
ctx.fillStyle = my_gradient;
ctx.fillRect(0, 0, 512, 512);
end goal is to make a colour picker with should look like attached picture
