src/vs/workbench/services/themes/browser/workbenchThemeService.ts/WorkbenchThemeService/setColorTheme
class WorkbenchThemeService:	public setColorTheme(themeId: string | undefined, settingsTarget: ThemeSettingTarget): Promise<IWorkbenchColorTheme | null> {
		return this.colorThemeSequencer.queue(() => {
			if (!themeId) {
				return Promise.resolve(null);
			}
			if (themeId === this.currentColorTheme.id && this.currentColorTheme.isLoaded) {
				return this.settings.setColorTheme(this.currentColorTheme, settingsTarget);
			}

			themeId = validateThemeId(themeId); // migrate theme ids

			const themeData = this.colorThemeRegistry.findThemeById(themeId, DEFAULT_COLOR_THEME_ID);
			if (!themeData) {
				return Promise.resolve(null);
			}
			return themeData.ensureLoaded(this.extensionResourceLoaderService).then(_ => {
				themeData.setCustomizations(this.settings);
				return this.applyTheme(themeData, settingsTarget);
			}, error => {
				return Promise.reject(new Error(nls.localize('error.cannotloadtheme', "Unable to load {0}: {1}", themeData.location?.toString(), error.message)));
			});
		});
	}