Select Color Theme@theme


  1. In HBuilderX, you can click on the top menu [Tool - Color Theme] to your favorite color theme.
  2. HBuilderX has 3 built-in themes, Default Monokai Atom one Dark.

Select Color Theme@theme - 图1

The settings of the current color theme stored in the user settings ([Settings] [Source View], that is, the settings.json file)

  1. "editor.colorScheme" : "Default"

Custom theme@custom


Supported from HBuilderX 1.8.8+

The settings of the current color theme stored in settings.json file. You can customize the color theme by overriding related settings.

Custom Window Theme@custom-window

In settings.json file of source view, you can customize the theme color you like by overriding the “workbench.colorCustomizations” field. Custom theme parameters

  1. "workbench.colorCustomizations": {
  2. "[Default]": {//Default
  3. "sideBar.background":"#faf6e6",
  4. "editor.background":"#faf6e6"
  5. },
  6. "[Monokai]": {//Monokai
  7. "toolBar.background": "#272822",
  8. "sideBar.background":"#272822"
  9. },
  10. "[Atom One Dark]": {//Atom one Dark
  11. "sideBar.background": "#282c34",
  12. "editor.background":"#282c3f"
  13. }
  14. }

Custom editor code color@custom-editor-code-style

Custom editor code color function, supported from HBuilderX 3.1.19+;

- Which code areas can be customized?

Custom code color supports setting different colors for code snippets, such as comment, string, keyword, variable, and tag, etc.

Currently supported languages include: JavaScript(ES6+)HTML(ES6+)VueCSSLessSCSSStylusTypescriptMarkdownJSON

- How to customize?@how-to-custom

In settings.json file of source view, you can customize the theme color you like by overriding the “editor.tokenColorCustomizations” field.

You can copy the settings of Custom theme parameters to override rules block of themes ([Default][Monokai][Atom One Dark]), and then just change the color value.

Note:This method is only suitable for people who are familiar with the rules of the “settings.json” file. We recommend that you use the “color assist function” to update the “settings.json” file.

Example:

  1. "editor.tokenColorCustomizations": {
  2. "[Default]": {//Default
  3. "rules":[
  4. {
  5. "scope": "comment",
  6. "settings": {
  7. "fontStyle": "italic",
  8. "foreground": "#248C85"
  9. }
  10. }
  11. ]
  12. },
  13. "[Monokai]": {//Monokai
  14. "rules":[
  15. //...
  16. ]
  17. },
  18. "[Atom One Dark]": {//Atom one Dark
  19. "rules":[
  20. //...
  21. ]
  22. }
  23. }

Complete code color list:Custom code color parameters

- Custom code color assist function@auxiliary

Please follow our steps to customize code color:

  1. In settings.json file of source view, add the configuration "editor.tokenColorCustomizations". (This step is required.
  2. Place the cursor on the code position where you want to change the color, select the menu Tools-Theme-Inspect Tokens And Colors to view the current code coloring information
  3. Copy the content of Token Color Rule output from the console in the previous step to "editor.tokenColorCustomizations" field of settings.json file. (Note: Put it under the corresponding theme)
  4. After saving the settings.json file, you can see the modified theme.

Complete steps

Select Color Theme@theme - 图2

Notes: Now, you can customize the theme based on the 3 built-in themes Default, Monokai and Atom One Dark by overriding the theme settings, but you cannot create new themes.

File Icon Theme@file-icon


Menu [Tools] [File Icon Theme], you can choose the file icon theme.

Select Color Theme@theme - 图3