Preferences > Theme > Color Theme" /> Preferences > Theme > Color Theme" />

Thay đổi giao diện visual studio 2017


Color themes let you modify the colors in Visual Studio"s user interface to suit your preferences & work environment.

Bạn đang xem: Thay đổi giao diện visual studio 2017


Selecting the màu sắc Theme

In VS, mở cửa the màu sắc Theme picker with File > Preferences > Theme > Color Theme. ( > Preferences > Theme > Color Theme on macOS).You can also use the keyboard shortcut ⌘K ⌘T (Windows, Linux Ctrl+K Ctrl+T) to display the picker.Use the cursor keys lớn preview the colors of the theme.Select the theme you want & press Enter.


The active màu sắc theme is stored in your user settings (keyboard shortcut ⌘, (Windows, Linux Ctrl+,)).

// Specifies the màu sắc theme used in the workbench. "workbench.colorTheme": "Default Dark+"Tip: By default, the theme is stored in your user settings & applies globally khổng lồ all workspaces. You can also configure a workspace specific theme. To vì so, phối a theme in the Workspace settings.

Color Themes from the Marketplace

There are several out-of-the-box color themes in VS for you khổng lồ try.

Many more themes have been uploaded lớn the VS Extension Marketplace by the community. If you find one you want to lớn use, install it and restart VS và the new theme will be available.

You can search for themes in the Extensions view (⇧⌘X (Windows, Linux Ctrl+Shift+X)) search box using the
category:"themes" filter.


Auto switch based on OS color scheme

Windows & macOS support light và dark color schemes. There is a setting, window.autoDetectColorScheme, that instructs VS to lớn listen to changes khổng lồ the OS"s color scheme & switch to lớn a matching theme accordingly.

To customize the themes that are used when a màu sắc scheme changes, you can set the preferred light, dark, & high contrast themes with the settings:

workbench.preferredLightColorTheme - defaults khổng lồ "Default Light+"workbench.preferredDarkColorTheme - defaults to lớn "Default Dark+"workbench.preferredHighContrastColorTheme - defaults lớn "Default High Contrast"workbench.preferredHighContrastLightColorTheme - defaults khổng lồ "Default High Contrast Light"

Customizing a màu sắc Theme

Workbench colors

You can customize your active màu sắc theme with the workbench.colorCustomizations và editor.tokenColorCustomizations user settings.

To mix the colors of VS UI elements such as list và trees (File Explorer, suggestions widget), diff editor, Activity Bar, notifications, scroll bar, split view, buttons, & more, use workbench.colorCustomizations.


You can use IntelliSense while setting workbench.colorCustomizations values or, for a danh mục of all customizable colors, see the Theme color Reference.

To customize a specific theme only, use the following syntax:

"workbench.colorCustomizations": "": "sideBar.background": "#347890" If a customization applies lớn more than one themes, you can name multiple themes or use * as wildcard at the beginning và the kết thúc of the name:

"workbench.colorCustomizations": "": "activityBar.background": "#ff0000" , "": "activityBar.background": "#ff0000"

Editor syntax highlighting

To tune the editor"s syntax highlighting colors, use editor.tokenColorCustomizations in your user settings settings.json file:


A pre-configured mix of syntax tokens ("comments", "strings", ...) is available for the most common constructs. If you want more, you can vày so by directly specifying TextMate theme màu sắc rules:


Note: Directly configuring TextMate rules is an advanced skill as you need to lớn understand on how TextMate grammars work. Go lớn the color Theme guide for more information.

Again, to lớn customize specific themes, you can vày this in one of the following ways:

"editor.tokenColorCustomizations": "": "comments": "#229977" , "<*Dark*>": "variables": "#229977" , "": "keywords": "#f00"

Editor semantic highlighting

Some languages (currently: TypeScript, JavaScript, Java) provide semantic tokens. Semantic tokens are based on the language service"s symbol understanding and are more accurate than the syntax tokens coming from the TextMate grammars that are driven by regular expressions. The semantic highlighting that is computed from the semantic tokens goes on vị trí cao nhất of syntax highlighting and can correct & enrich the highlighting as seen in the following example:

The "Tomorrow Night Blue" màu sắc theme without semantic highlighting:


The "Tomorrow Night Blue" màu sắc theme with semantic highlighting:


Notice the màu sắc differences based on language service symbol understanding:

line 10: languageModes is colored as a parameter.line 11: Range & Position are colored as classes và document as a parameter.line 13: getFoldingRanges is colored as a function.

The settings editor.semanticHighlighting.enabled serves as the main control on whether semantic highlighting is applied. It can have values true, false, và configuredByTheme.

true & false turn semantic highlighting on or off for all themes.configuredByTheme is the default và lets each theme control whether semantic highlighting is enabled or not. All the themes that ship with VS (for example, the "Dark+" default) have semantic highlighting enabled by default.

Users can override the theme setting by:

"editor.semanticTokenColorCustomizations": "": "enabled": true When semantic highlighting is enabled & available for a language, it is up khổng lồ the theme khổng lồ configure whether and how semantic tokens are colored. Some semantic tokens are standardized and maps to well-established TextMate scopes. If the theme has a coloring rule for these TextMate scopes, the semantic token will be rendered with that color, without the need for any additional coloring rules.

Xem thêm: Chơi Game Truy Kích Trung Quốc 4399 Lậu Mới 2020 Full Vàng, Tải Truy Kích Mobile Trung Quốc Cực Kỳ Đơn Giản

Additional styling rules can be configured by the user in editor.semanticTokenColorCustomizations":

"editor.semanticTokenColorCustomizations": "": "enabled": true, "rules": "*.declaration": "bold": true To see what semantic tokens are computed và how they are styled, users can use the scope inspector (Developer: Inspect Editor Tokens và Scopes), which displays information for the text at the current cursor position.


If semantic tokens are available for the language at the given position & enabled by theme, the inspect tool shows a section semantic token type. The section shows the semantic token information (type and any number of modifiers) as well as the styling rules that apply.

More information on semantic tokens và styling rule syntax can be found in the Semantic Highlighting Guide.

Creating your own màu sắc Theme

Creating & publishing a theme extension is easy. Customize your colors in your user settings then generate a theme definition file with the Developer: Generate màu sắc Theme From Current Settings command.

VS"s Yeoman extension generator will help you generate the rest of the extension.

See the Create a new màu sắc Theme topic in our Extension API section lớn learn more.

Remove default color Themes

If you"d lượt thích to remove some of the default themes shipped with VS from the màu sắc Theme picker, you can disable them from the Extensions view (⇧⌘X (Windows, Linux Ctrl+Shift+X)). Click the Filter Extensions button from the đứng top of the Extensions view, select the Built-in option, & you"ll see a THEMES section listing the default themes.


You can disable a built-in theme extension as you would any other VS extension with the Disable command on the gear context menu.


File Icon Themes

File icon themes can be contributed by extensions và selected by users as their favorite mix of file icons. Tệp tin icons are shown in the file Explorer và tabbed headings.

Selecting the file Icon Theme

In VS, open the file Icon Theme picker with File > Preferences > Theme > File Icon Theme. ( > Preferences > Theme > File Icon Theme on macOS).You can also use the Preferences: file Icon Theme command from the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)).Use the cursor keys lớn preview the icons of the theme.Select the theme you want và hit Enter.


By default, the Seti tệp tin icon phối is used and those are the icons you see in the tệp tin Explorer. Once a file icon theme is selected, the selected theme will be remembered & appear again whenever VS is restarted. You can disable tệp tin icons by selecting None.

VS ships with two file icon themes; Minimal and Seti. Khổng lồ install more tệp tin icon themes, select the Install Additional tệp tin Icon Themes cống phẩm in the file icon theme picker and you"ll see a query for tệp tin icon themes (tag:icon-theme) in the Extensions view.

You can also browse the VS Marketplace site directly to lớn find available themes.

The active tệp tin Icon theme is persisted in your user settings (keyboard shortcut ⌘, (Windows, Linux Ctrl+,)).

Xem thêm: # 10 Set Đồ Mạnh Nhất Của Dk ? Just A Moment Top 18 Các Set Đồ Của Dk Trong Mu Mới Nhất 2022

// Specifies the file icon theme used in the workbench. "workbench.iconTheme": "vs-seti"

Creating your own file Icon Theme

You can create your own tệp tin Icon Theme from icons (preferably SVG), see the tệp tin Icon Theme topic in our Extension API section for details.

Next steps

Themes are just one way to lớn customize VS If you"d like to learn more about VS customization and extensibility, try these topics:

Chuyên mục: Game Mobile

lịch phát sóng bóng đá hôm nay