Conversation Colors
This commit is contained in:
parent
b63d8e908c
commit
28f016ce48
128 changed files with 3997 additions and 1207 deletions
|
@ -1,42 +1,53 @@
|
|||
// Copyright 2018-2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import { ColorType } from '../types/Colors';
|
||||
import { AvatarColorType } from '../types/Colors';
|
||||
|
||||
export function migrateColor(color?: string): ColorType {
|
||||
export function migrateColor(color?: string): AvatarColorType {
|
||||
switch (color) {
|
||||
// These colors no longer exist
|
||||
case 'orange':
|
||||
case 'amber':
|
||||
return 'deep_orange';
|
||||
return 'vermilion';
|
||||
case 'yellow':
|
||||
return 'brown';
|
||||
return 'burlap';
|
||||
case 'deep_purple':
|
||||
return 'purple';
|
||||
return 'violet';
|
||||
case 'light_blue':
|
||||
return 'blue';
|
||||
case 'cyan':
|
||||
return 'teal';
|
||||
case 'lime':
|
||||
return 'light_green';
|
||||
return 'wintergreen';
|
||||
|
||||
// Actual color names
|
||||
case 'red':
|
||||
return 'crimson';
|
||||
case 'deep_orange':
|
||||
return 'vermilion';
|
||||
case 'brown':
|
||||
return 'burlap';
|
||||
case 'pink':
|
||||
return 'plum';
|
||||
case 'purple':
|
||||
return 'violet';
|
||||
case 'green':
|
||||
return 'forest';
|
||||
case 'light_green':
|
||||
return 'wintergreen';
|
||||
case 'blue_grey':
|
||||
return 'steel';
|
||||
case 'grey':
|
||||
return 'steel';
|
||||
|
||||
// These can stay as they are
|
||||
case 'red':
|
||||
case 'deep_orange':
|
||||
case 'brown':
|
||||
case 'pink':
|
||||
case 'purple':
|
||||
case 'indigo':
|
||||
case 'blue':
|
||||
case 'indigo':
|
||||
case 'teal':
|
||||
case 'green':
|
||||
case 'light_green':
|
||||
case 'blue_grey':
|
||||
case 'grey':
|
||||
case 'ultramarine':
|
||||
return color;
|
||||
|
||||
default:
|
||||
return 'grey';
|
||||
return 'steel';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue