When I tried to draw without a canvas in JavaScript, I tried to create a gradient on that "canvas". The 10x10 canvas I created used table cells as pixels. For this I had to calculate the color of each cell when trying to make a gradient. And now I implemented it in App Inventor.
Method i'm using: