src/vs/workbench/api/common/extHostTerminalService.ts/asTerminalColor
function asTerminalColor(color?: vscode.ThemeColor): ThemeColor | undefined {
	return ThemeColor.isThemeColor(color) ? color as ThemeColor : undefined;
}