瀏覽代碼

feat(avatar-background): Change default colors for avatar backgrounds

master
hmuresan 3 年之前
父節點
當前提交
4a322d2e60
共有 1 個檔案被更改,包括 10 行新增8 行删除
  1. 10
    8
      react/features/base/avatar/functions.js

+ 10
- 8
react/features/base/avatar/functions.js 查看文件

@@ -3,15 +3,17 @@
3 3
 import _ from 'lodash';
4 4
 
5 5
 const AVATAR_COLORS = [
6
-    '232, 105, 156',
7
-    '255, 198, 115',
8
-    '128, 128, 255',
9
-    '105, 232, 194',
10
-    '234, 255, 128'
6
+    '#6A50D3',
7
+    '#FF9B42',
8
+    '#DF486F',
9
+    '#73348C',
10
+    '#B23683',
11
+    '#F96E57',
12
+    '#4380E2',
13
+    '#2AA076',
14
+    '#00A8B3'
11 15
 ];
12 16
 
13
-const AVATAR_OPACITY = 0.4;
14
-
15 17
 /**
16 18
  * Generates the background color of an initials based avatar.
17 19
  *
@@ -35,7 +37,7 @@ export function getAvatarColor(initials: ?string, customAvatarBackgrounds: Array
35 37
         colorIndex = nameHash % colorsBase.length;
36 38
     }
37 39
 
38
-    return hasCustomAvatarBackgronds ? colorsBase[colorIndex] : `rgba(${colorsBase[colorIndex]}, ${AVATAR_OPACITY})`;
40
+    return colorsBase[colorIndex];
39 41
 }
40 42
 
41 43
 /**

Loading…
取消
儲存