Gradiavatar is a simple tool to generate a gradient avatar from a string.
The homepage of the project is a simple interactive mode where you can enter a string and see the result.
You can customize some of the options, such as the gradient mode (linear or radial), the gradient direction or offset and the presence of the text string's initial letter.
The API provides two endpoints:
/linear/[str]to generate a linear gradient avatar/radial/[str]to generate a radial gradient avatar
You can pass the following parameters to the query string:
size(default: 256): the size of the image in pixelsinitial(default: false): whether to display the initial letter of the string
For linear gradients, you can also pass the following parameter:
direction(default: diagonal): the direction of the gradient, which can be one of the following values:vertical,horizontal,diagonal,antidiagonal
For radial gradients, you can also pass the following parameter:
offset(default:northeast): the offset of the gradient from the center of the circle, which can be one of the following values:north,northeast,east,southeast,south,southwest,west,northwest
Both endpoints return a simple SVG image.
/linear/Gradiavatar
/linear/Gradiavatar?initial
/linear/Gradiavatar?direction=vertical
/radial/Gradiavatar
/radial/Gradiavatar?initial
/radial/Gradiavatar?offset=southwest