|
|
|
@ -4,19 +4,22 @@ type OldColor =
|
|
|
|
|
| 'amber'
|
|
|
|
|
| 'blue'
|
|
|
|
|
| 'blue_grey'
|
|
|
|
|
| 'brown'
|
|
|
|
|
| 'cyan'
|
|
|
|
|
| 'deep_orange'
|
|
|
|
|
| 'deep_purple'
|
|
|
|
|
| 'green'
|
|
|
|
|
| 'grey'
|
|
|
|
|
| 'indigo'
|
|
|
|
|
| 'lime'
|
|
|
|
|
| 'light_blue'
|
|
|
|
|
| 'light_green'
|
|
|
|
|
| 'orange'
|
|
|
|
|
| 'pink'
|
|
|
|
|
| 'purple'
|
|
|
|
|
| 'red'
|
|
|
|
|
| 'teal';
|
|
|
|
|
| 'teal'
|
|
|
|
|
| 'yellow';
|
|
|
|
|
|
|
|
|
|
type NewColor =
|
|
|
|
|
| 'blue'
|
|
|
|
@ -33,19 +36,26 @@ type NewColor =
|
|
|
|
|
export function migrateColor(color: OldColor): NewColor {
|
|
|
|
|
switch (color) {
|
|
|
|
|
// These colors no longer exist
|
|
|
|
|
case 'amber':
|
|
|
|
|
case 'orange':
|
|
|
|
|
case 'brown':
|
|
|
|
|
return 'red';
|
|
|
|
|
|
|
|
|
|
case 'blue_grey':
|
|
|
|
|
case 'deep_purple':
|
|
|
|
|
return 'purple';
|
|
|
|
|
|
|
|
|
|
case 'light_blue':
|
|
|
|
|
return 'blue';
|
|
|
|
|
|
|
|
|
|
case 'deep_purple':
|
|
|
|
|
return 'purple';
|
|
|
|
|
case 'blue_grey':
|
|
|
|
|
return 'cyan';
|
|
|
|
|
|
|
|
|
|
case 'light_green':
|
|
|
|
|
return 'teal';
|
|
|
|
|
case 'lime':
|
|
|
|
|
return 'green';
|
|
|
|
|
|
|
|
|
|
case 'orange':
|
|
|
|
|
case 'amber':
|
|
|
|
|
case 'yellow':
|
|
|
|
|
return 'deep_orange';
|
|
|
|
|
|
|
|
|
|
// These can stay as they are
|
|
|
|
|
case 'blue':
|
|
|
|
|