Actions
Feature #44723
closedIncrease the number of initials avatar background colors from 8 to 16
Feature #44723:
Increase the number of initials avatar background colors from 8 to 16
Description
The background color of the initials avatar is chosen from 8 colors based on user.id % 8, so 1 in 8 pairs of users with the same initials get exactly the same avatar (#44717).
The attached patch increases the number of colors to 16, which halves this probability. Even 16 colors cannot completely prevent such collisions, but more colors would require additional light, low-saturation colors, which are hard to distinguish at the small sizes at which avatars are displayed.
Current 8 colors:
![]()
Proposed 16 colors:
![]()
Notes on the colors:
- All colors are taken from Open Color, the palette already used in Redmine's stylesheets. All 12 chromatic hues are used, with at most two shades per hue.
- The colors were selected to maximize the smallest perceptual difference (OKLab deltaE) between any two colors. The result is 12.6, larger than the 10.9 of the current colors (red-7 and pink-5), so no pair is harder to tell apart than before.
- The text color for each background was chosen based on APCA contrast, which reflects legibility of white text on mid-tone colors better than the WCAG 2 contrast ratio. Light backgrounds use black text and the others use white text.
- Users with consecutive IDs get consecutive colors in the list, so the colors are ordered to make consecutive ones clearly different.
Files
Actions