Change:
(Moved from internal Windows Feedback bug database) on High Contrast Black VS Code that inside of the frame, the text shows up normally (not in high contrast). This is an accessibility issue
The current workaround is to manually switch VS Code to the High Contrast Theme via
is there electron API to detect high contrast mode automatically?
Yeah I thought we detect high contrast on Windows, I have to check.
I see that the theme is correctly passed on to the renderer () but then is reset back to the previous one (e.g. ). Can you check why the theme is not applied? To reproduce: enable HC theme on Windows start VS Code expect it to show in HC theme
The hc theme needs to be set in the settings or on the theme service, like (). This will trigger all theming participants that then ally the theming and generate the css rules. Setting the class name just helps with the initial window appearance.
it looks like you removed that code that handles high contrast on Windows and never it back to the renderer ()? I created to prefer the HC theme if we detect high contrast mode. It is a bit ugly though because the settings are still containing the previous theme, not sure we should just blindly overwrite it because the HC theme on Windows could be a temporary thing.

Discussion:
export const VS_DARK_THEME = 'vs-dark'; export const VS_HC_THEME = 'hc-black'; <ins> export const HC_THEME_ID = 'Default High Contrast'; </ins> export const COLOR_THEME_SETTING = 'workbench.colorTheme'; <ins> export const DETECT_HC_SETTING = 'window.autoDetectHighContrast'; </ins> export const ICON_THEME_SETTING = 'workbench.iconTheme'; export const CUSTOM_WORKBENCH_COLORS_SETTING = 'workbench.colorCustomizations'; export const CUSTOM_EDITOR_COLORS_SETTING = 'editor.tokenColorCustomizations';

import nls = require('vs/nls'); import * as types from 'vs/base/common/types'; import { IExtensionService } from 'vs/platform/extensions/common/extensions'; <del> import { IWorkbenchThemeService, IColorTheme, ITokenColorCustomizations, IFileIconTheme, ExtensionData, VS_LIGHT_THEME, VS_DARK_THEME, VS_HC_THEME, COLOR_THEME_SETTING, ICON_THEME_SETTING, CUSTOM_WORKBENCH_COLORS_SETTING, CUSTOM_EDITOR_COLORS_SETTING, CUSTOM_EDITOR_SCOPE_COLORS_SETTING } from 'vs/workbench/services/themes/common/workbenchThemeService'; </del> <ins> import { IWorkbenchThemeService, IColorTheme, ITokenColorCustomizations, IFileIconTheme, ExtensionData, VS_LIGHT_THEME, VS_DARK_THEME, VS_HC_THEME, COLOR_THEME_SETTING, ICON_THEME_SETTING, CUSTOM_WORKBENCH_COLORS_SETTING, CUSTOM_EDITOR_COLORS_SETTING, CUSTOM_EDITOR_SCOPE_COLORS_SETTING, DETECT_HC_SETTING, HC_THEME_ID } from 'vs/workbench/services/themes/common/workbenchThemeService'; </ins> import { IStorageService } from 'vs/platform/storage/common/storage'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { Registry } from 'vs/platform/registry/common/platform';

import { ColorThemeStore } from 'vs/workbench/services/themes/electron-browser/colorThemeStore'; import { FileIconThemeStore } from 'vs/workbench/services/themes/electron-browser/fileIconThemeStore'; import { FileIconThemeData } from 'vs/workbench/services/themes/electron-browser/fileIconThemeData'; <ins> import { IWindowService } from 'vs/platform/windows/common/windows'; </ins> // implementation

@IBroadcastService private broadcastService: IBroadcastService, @IConfigurationService private configurationService: IConfigurationService, @ITelemetryService private telemetryService: ITelemetryService, <ins> @IWindowService private windowService: IWindowService, </ins> @IInstantiationService private instantiationService: IInstantiationService) { this.container = container;

} private initialize(): TPromise<[IColorTheme, IFileIconTheme]> { <ins> let detectHCThemeSetting = this.configurationService.getValue<boolean>(DETECT_HC_SETTING); let colorThemeSetting: string; if (this.windowService.getConfiguration().highContrast && detectHCThemeSetting) { colorThemeSetting = HC_THEME_ID; } else { colorThemeSetting = this.configurationService.getValue<string>(COLOR_THEME_SETTING); } </ins> <del> let colorThemeSetting = this.configurationService.getValue<string>(COLOR_THEME_SETTING); </del> let iconThemeSetting = this.configurationService.getValue<string>(ICON_THEME_SETTING) || ''; return Promise.join([