I recommend you use SVG to create this shape. It offers simplicity and scalability.
We can use the SVG circle element to create a shape as described above, and fill / stroke it with some kind of solid color, gradient or pattern.
The following code will create a circle shape:
<circle cx="50" cy="50" r="39" fill="blue" />
The following is a brief description of the parameters used in the above code:
cx determines the position of the circle x .cy determines the position of the circle y .r defines the radius of the circle.
To fill the closed form with a gradient, we need to create a gradient object:
<defs> <linearGradient id="grad1" x1="1" y2="1"> <stop offset="0" stop-color="#3acfd5" /> <stop offset="1" stop-color="#3a4ed5" /> </linearGradient> </defs>
This object can reference the fill and stroke attribute in the form using id , like fill="url(#grad1) or stroke="url(#grad1) . And the direction of the gradient can be controlled using the attributes x1 , y1 , x2 and y2 .
Output Image:

Working example:
<svg width="100" height="100" viewBox="0 0 100 100"> <defs> <linearGradient id="grad1" x1="1" y2="1"> <stop offset="0" stop-color="#3acfd5" /> <stop offset="1" stop-color="#3a4ed5" /> </linearGradient> <linearGradient id="grad2" y2="1"> <stop offset="0" stop-color="#43257f" /> <stop offset="1" stop-color="#40c4ff" /> </linearGradient> </defs> <circle cx="50" cy="50" r="45" fill="none" stroke="url(#grad1)" stroke-width="2" /> <circle cx="50" cy="50" r="39" fill="url(#grad2)" /> </svg>
Useful resources:
The following are useful links for SVG :
source share