Generate gradient avatars on demand.
This is a port of Aelpxy's avatar generator. View repository
Clone this repository or download the zip and extract it to a folder you like.
You need Python 3.6+ for this to work.
Open a terminal in the folder this readme is in.
Make sure python is on path.
Run:
python -m pip install -r requirements.txt
OR
python -m pip install colorhash
Make sure python3 is on path.
(If this command gives an error saying no module pip or something, make sure any python pip related packages are installed.)
Run:
python3 -m pip install -r requirements.txt
OR
python3 -m pip install colorhash
Open a terminal in the src folder.
Make sure python is on path.
Run:
py app.py
Make sure python3 is on path.
Run:
python3 app.py
Goto http://localhost:5050/ for a random image.
Goto http://localhost:5050/<some text> where <some text>
is the seed.
You can use the parameter size
to change its size in pixels.
Examples:
- For random image: http://localhost:5050/?size=100
This changes the size of the image to 100 pixels. - With a seed: http://localhost:5050/<seed>?size=340
Where<seed>
is the seed.
This changes the size of the image to 340 pixels.
You can use the parameter square
to change the shape of the svg to square.
Accepts values:
true
,t
,yes
,y
and1
(any case) if you want to see square image.false
,f
,no
,n
and0
(any case) if you want to see the circular image
Examples:
- For random image: http://localhost:5050/?square=1
- With a seed: http://localhost:5050/<seed>?square=yes
Where<seed>
is the seed.
If you want to change the size of the image and also make it a square image, you can do so too by putting a &
between the parameters.
Examples:
- For random image: http://localhost:5050/?size=305&square=true
This changes the size of the image to 305 pixels and also makes it a square. - With a seed: http://localhost:5050/<seed>?square=y&size=1058
Where<seed>
is the seed.
This changes the size of the image to 1058 pixels and also makes it a square.