From b650cf78a7d0c400a87340158bb0e7106d545a2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAlia=20Jaeger=20Foresti?= <60678893+juliajforesti@users.noreply.github.com> Date: Thu, 7 Jul 2022 16:10:03 -0300 Subject: [PATCH] Chore: update avatar colors (#26153) --- apps/meteor/app/utils/lib/getAvatarColor.js | 22 --------------------- apps/meteor/app/utils/lib/getAvatarColor.ts | 3 +++ 2 files changed, 3 insertions(+), 22 deletions(-) delete mode 100644 apps/meteor/app/utils/lib/getAvatarColor.js create mode 100644 apps/meteor/app/utils/lib/getAvatarColor.ts diff --git a/apps/meteor/app/utils/lib/getAvatarColor.js b/apps/meteor/app/utils/lib/getAvatarColor.js deleted file mode 100644 index 758920cac72..00000000000 --- a/apps/meteor/app/utils/lib/getAvatarColor.js +++ /dev/null @@ -1,22 +0,0 @@ -const colors = [ - '#F44336', - '#E91E63', - '#9C27B0', - '#673AB7', - '#3F51B5', - '#2196F3', - '#03A9F4', - '#00BCD4', - '#009688', - '#4CAF50', - '#8BC34A', - '#CDDC39', - '#FFC107', - '#FF9800', - '#FF5722', - '#795548', - '#9E9E9E', - '#607D8B', -]; - -export const getAvatarColor = (name) => colors[name.length % colors.length]; diff --git a/apps/meteor/app/utils/lib/getAvatarColor.ts b/apps/meteor/app/utils/lib/getAvatarColor.ts new file mode 100644 index 00000000000..109a42df1d7 --- /dev/null +++ b/apps/meteor/app/utils/lib/getAvatarColor.ts @@ -0,0 +1,3 @@ +const colors = ['#158D65', '#7F1B9F', '#B68D00', '#E26D0E', '#10529E', '#6C727A']; + +export const getAvatarColor = (name: string): string => colors[name.length % colors.length];