Custom colors for default letter avatar generator

Out of the box you can control Discourse’s base color scheme as well as the colors available for categories (the category colors setting). But if you want to use our avatar generation system you either have to live with the somewhat random color assignments, fork the letter-avatar microservice, or create your own randomly-assigned defaults.

It would be nice if there were a site setting that accepts a list of colors (similar to the category colors setting) that are randomly paired with letters from the avatar generator.

11개의 좋아요

Working through this … our letter avatar service already allows for color to be specified:

https://avatars.discourse.org/v3/letter/m/ff0000/64.png

https://avatars.discourse.org/v3/letter/m/00ff00/64.png

https://avatars.discourse.org/v3/letter/m/0000ff/64.png

I am warm to a site setting that lets you restrict this, seems like the simplest thing to do here vs defining custom color palettes.

restrict_letter_avatar_colors : aa00aa,bbccdd,332244

If set only pick letter avatars from the restricted list.

@maja can you add this to your list?

Clearly the default is just to work as we do today, but if people define colors in the settings then we would only use a subset.

12개의 좋아요

This feature has been merged:

https://github.com/discourse/discourse/commit/7e9afdace33788a26d17e251d04f63d438f6c3f1

7개의 좋아요

안녕하세요, 여러분

기본 레터 아바타에서 사용되는 색상 세트를 변경할 수 있을까요? 해당 설정이나 관련 정보를 찾을 수가 없습니다.

카테고리와 마찬가지로, 기본 아바타에도 브랜드 색상을 적용하여 브랜딩을 하고 싶습니다.

감사합니다!

1개의 좋아요

네, admin > settings에 있으며 restrict_letter_avatar_colors라고 합니다.

2개의 좋아요

훌륭합니다, 감사합니다!

1개의 좋아요