diff --git a/client/src/app/shared/shared-actor-image/actor-avatar.component.html b/client/src/app/shared/shared-actor-image/actor-avatar.component.html index 13a5385a8..c285b6cc3 100644 --- a/client/src/app/shared/shared-actor-image/actor-avatar.component.html +++ b/client/src/app/shared/shared-actor-image/actor-avatar.component.html @@ -1,7 +1,7 @@ -
+
{{ initial }}
diff --git a/client/src/app/shared/shared-actor-image/actor-avatar.component.ts b/client/src/app/shared/shared-actor-image/actor-avatar.component.ts index bc7e8a096..b2e1ef46e 100644 --- a/client/src/app/shared/shared-actor-image/actor-avatar.component.ts +++ b/client/src/app/shared/shared-actor-image/actor-avatar.component.ts @@ -89,9 +89,11 @@ export class ActorAvatarComponent { } private getColorTheme () { + const initialLowercase = this.initial.toLowerCase() + // Keep consistency with CSS const themes = { - abc: 'blue', + '0123456789abc': 'blue', def: 'green', ghi: 'purple', jkl: 'gray', @@ -102,7 +104,7 @@ export class ActorAvatarComponent { } const theme = Object.keys(themes) - .find(chars => chars.includes(this.initial)) + .find(chars => chars.includes(initialLowercase)) return themes[theme] }