Radial Gradient in Canvas in HTML
Radial Gradient
As we know, a gradient is a smooth transition from one color to another. We can apply it to different shapes, and boxes on canvas.
The method used for the radial gradient is:-
- createRadialGradient(x,y,r,x1,y1,r1)
For your Information:-
The addColorStop() method defines the color stops and their position along the gradient. Gradient positions can be anywhere between 0 to 1.