Lichess reads from this repository to get the list of available flairs. If you want to add a flair, please submit a pull request.
The available flairs are visible at https://lichess1.org/assets/flair/index.html.
Lichess flairs are not animated.
Flair images must:
- be webp, more on this below
- not be animated
- be square
- have a width between 60px and 100px (most are 60px)
- have a transparent background
- have a known license allowing use within Lichess
- be nice, respectful, not controversial and not offensive
This is probably a good source for new flairs: https://slackmojis.com/.
Feel free to make your own, or to get them from somewhere else - but be mindful of licenses.
You can convert your png to webp with cwebp
:
cwebp path/to/horsey.png -o lila/public/flair/img/activity.lichess-horsey.webp
Similar programs are available, such as ImageMagick.
The name of the file is important, it's the only metadata we have. It's made of two parts: the category, and the name.
<category>.<multi-word-name>.webp
The category will be used to group the flairs in the UI. It can be one of the following:
smileys
, people
, nature
, food-drink
, activity
, travel-places
, objects
, symbols
.
The name will be used to identify the flair in the UI. It can be any string, but it should be short and descriptive. It can only contain letters, numbers, and dashes. Descriptive names help users find the flair.
Optional. You can add and remove flair images without compiling the flair list, and wait for someone else to compile it before it comes online.
If you have a command line and want to compile the flair list, run the following:
./flair/list.sh
It will update the flair/list.txt
file which you must commit along with the updated flair images.
Lichess reads flair/list.txt
periodically to update its flair database.