Skip to content

Themes

Themes in Xed Editor allow you to customize the look and feel of the user interface.

A theme always consists of light and dark color schemes that style the UI of the application, editor and terminal.

Built-in Themes

Xed Editor comes with a small set of pre-installed themes that you can use immediately without any configuration.

  • Blueberry theme (Default) – blue-based color palette
  • Lime theme – green-based color palette

AMOLED Mode

AMOLED mode is available for all themes.

When enabled, it replaces the background surfaces with pure black backgrounds. This is mainly useful for OLED displays to reduce power consumption and improve contrast.

Dynamic Theming (Monet)

Xed Editor supports dynamic colors, also known as Monet.

On supported Android versions (Android 12 and above), the system can generate a complete color scheme based on your device wallpaper.

When enabled, the editor will automatically derive its theme colors from the system dynamic palette instead of using a manually defined theme.

You can enable this feature in:

Settings → Appearance → Use dynamic colors

INFO

When dynamic colors are enabled the active theme is replaced with the Monet-based palette. This means you either use a custom theme or rely on dynamic system theming, but not both at the same time.

Installing Themes

A theme is just a JSON file. You can install it by going to Settings → Themes → Add Theme and selecting the theme JSON file from storage.

In addition, themes can also be installed directly from the extension marketplace inside the settings.

Creating Custom Themes

Because Xed-Editor is built with Material 3 design principles in mind, theme creation follows a structure similar to Material You (Material 3) theming.

TIP

Instead of creating a theme from scratch, you can use the Theme-Template repository as a starting point.

Basic Structure

json
{
  "id": "unique-theme-id",
  "name": "Theme Name",
  "targetVersion": 75,
  "inheritBase": true,
  "light": {},
  "dark": {}
}

Top-Level Properties

PropertyTypeRequiredDescription
idstringYesUnique identifier for the theme
namestringYesDisplay name for the theme
targetVersionintegerYesTarget version of Xed-Editor
inheritBasebooleanNo (default: true)Whether to inherit tokenColors from base theme
lightobjectNoColor palette for light mode
darkobjectNoColor palette for dark mode

You can omit optional fields. If a field is missing, the base theme's value will be used as a fallback. This applies to all colors in the theme file except for tokenColors if inheritBase is set to false (Base inheritance).

NOTE

All properties in the theme.json file are case-sensitive. Make sure to use the correct casing when defining properties.

NOTE

The base theme is the default Xed-Editor theme that ships with the application, it's called blueberry.

Base Inheritance

If inheritBase is set to true, the theme will inherit the tokenColors from the base theme if they are not defined in the custom theme. That means all properties defined in the custom theme will override the base theme's properties, while any missing properties will fall back to the base theme's values. If inheritBase is set to false, the theme will only use the properties defined in the custom theme. This means any missing syntax element colors will not have a fallback so they will not be distinguishable from other syntax elements.

Color Palettes

Each of the light and dark objects can contain the following color categories:

CategoryTypeDescription
baseColorsobjectColors for the user interface of the app
editorColorsobjectColors for the user interface of the editor
terminalColorsobjectColors for the integrated terminal
tokenColorsobject | arraySyntax highlighting colors for the editor

You can read more about each category in the API Reference section.

API Reference

This section provides detailed information about each color category and its properties.

baseColors

Defines colors for the user interface of the application. As Xed-Editor follows the Material You design guidelines, these colors are based on the Material Design color system (https://m3.material.io/styles/color/roles). The values have to be in the standard Android hex color format (#RRGGBB or #AARRGGBB). Optionally color names can be used (e.g., red, blue, etc.).

PropertyTypeDescriptionUsage example
primarystringPrimary color used in the UIActive tab
onPrimarystringColor used for text/icons on primary colorCurrently not used
primaryContainerstringContainer color for primary colorActive terminal session background in drawer
onPrimaryContainerstringColor used for text/icons on primary containerActive terminal session foreground in drawer
secondarystringSecondary color used in the UIFile icons in drawer
onSecondarystringColor used for text/icons on secondary colorCurrently not used
secondaryContainerstringContainer color for secondary colorCurrently not used
onSecondaryContainerstringColor used for text/icons on secondary containerCurrently not used
tertiarystringTertiary color used in the UICurrently not used
onTertiarystringColor used for text/icons on tertiary colorCurrently not used
tertiaryContainerstringContainer color for tertiary colorCurrently not used
onTertiaryContainerstringColor used for text/icons on tertiaryCurrently not used
errorstringColor used for error messagesError message below input field
onErrorstringColor used for text/icons on error colorCurrently not used
errorContainerstringContainer color for error colorCurrently not used
onErrorContainerstringColor used for text/icons on error containerCurrently not used
backgroundstringBackground color of the applicationSettings or terminal background
onBackgroundstringColor used for text/icons on backgroundSettings title
surfacestringSurface color for UI elementsToolbar
onSurfacestringColor used for text/icons on surface colorFile name in drawer or terminal default text
surfaceVariantstringVariant surface color for UI elementsDragged tab background
onSurfaceVariantstringColor used for text/icons on surface variantToolbar actions or settings subtitle
outlinestringColor used for outlinesCurrently not used
outlineVariantstringVariant outline colorDividers in editor and settings
inverseSurfacestringInverse surface color for UI elementsCurrently not used
inverseOnSurfacestringColor used for text/icons on inverse surfaceCurrently not used
inversePrimarystringInverse primary color used in the UICurrently not used
surfaceTintstringTint color for surfacesCurrently not used
surfaceDimstringDimmed surface color for UI elementsCurrently not used
surfaceBrightstringBrightened surface color for UI elementsCurrently not used
surfaceContainerLoweststringLowest container surface colorCurrently not used
surfaceContainerLowstringLow container surface colorCurrently not used
surfaceContainerstringContainer surface colorDropdown menu
surfaceContainerHighstringHigh container surface colorCurrently not used
surfaceContainerHigheststringHighest container surface colorCurrently not used
scrimstringColor used for scrimsCurrently not used

editorColors

Defines colors for the user interface of the text editor. The values have to be in the standard Android hex color format (#RRGGBB or #AARRGGBB). Optionally color names can be used (e.g., red, blue, etc.).

PropertyTypeDescription
problem_typostringColor for text marked as a typo
problem_warningstringColor for warnings in editor
problem_errorstringColor for errors in editor
sticky_scroll_dividerstringColor of sticky scroll divider
strikethroughstringColor for strikethrough text
strike_throughstringold property for strikethrough (Deprecated)
diagnostic_tooltip_actionstringColor of action buttons in diagnostic tooltips
diagnostic_tooltip_detailed_msgstringColor for detailed messages in diagnostic tooltips
diagnostic_tooltip_brief_msgstringColor for brief messages in diagnostic tooltips
diagnostic_tooltip_backgroundstringBackground color of diagnostic tooltips
function_char_background_strokestringStroke color for function character background
hard_wrap_markerstringColor for hard wrap markers
text_inlay_hint_foregroundstringForeground color of inlay hints
text_inlay_hint_backgroundstringBackground color of inlay hints
snippet_background_editingstringBackground for editable snippet areas
snippet_background_relatedstringBackground for related snippet areas
snippet_background_inactivestringBackground for inactive snippet areas
side_block_linestringColor of side block lines
non_printable_charstringColor of non-printable characters
text_selectedstringForeground color for selected text
matched_text_backgroundstringBackground for matched text
matched_text_borderstringBorder for matched text
completion_wnd_cornerstringColor of completion window corners
completion_wnd_backgroundstringBackground color of completion window
completion_wnd_text_matchedstringColor for matched text in completion window
completion_wnd_text_primarystringPrimary text color in completion window
completion_wnd_text_secondarystringSecondary text color in completion window
completion_wnd_item_currentstringBackground color of current item in completion window
line_block_labelstringcolor for line block label (Deprecated)
text_highlight_strong_backgroundstringBackground for strong highlights
text_highlight_strong_borderstringBorder for strong highlights
text_highlight_backgroundstringBackground for normal highlights
text_highlight_borderstringBorder for normal highlights
highlighted_delimiters_backgroundstringBackground color for highlighted delimiters
highlighted_delimiters_underlinestringUnderline color for highlighted delimiters
highlighted_delimiters_foregroundstringForeground color for highlighted delimiters
highlighted_delimiters_borderstringBorder color for highlighted delimiters
line_number_panel_textstringText color for line number panel
line_number_panelstringBackground for line number panel
block_line_currentstringColor for the current block line
block_linestringColor for non-current block lines
scroll_bar_trackstringColor of scroll bar track
scroll_bar_thumb_pressedstringColor of pressed scroll bar thumb
scroll_bar_thumbstringColor of scroll bar thumb
underlinestringColor for underlined text
current_linestringBackground for current line
current_row_borderstringBorder for current row
selection_handlestringColor of selection handle
selection_insertstringColor for insertion point
selected_text_backgroundstringBackground for selected text
selected_text_borderstringBorder for selected text
text_normalstringDefault text color
whole_backgroundstringBackground color of editor
line_number_backgroundstringBackground for line numbers
line_number_currentstringBackground for current line number
line_numberstringText color for line numbers
line_dividerstringColor for line dividers
signature_text_normalstringDefault color for signature text
signature_text_highlighted_parameterstringHighlight color for signature parameters
hover_text_normalstringNormal text color in hover tooltip
hover_text_highlightedstringHighlighted text in hover tooltip
hover_backgroundstringBackground of hover tooltip
hover_borderstringBorder of hover tooltip
static_span_backgroundstringBackground for static spans
static_span_foregroundstringForeground for static spans
signature_backgroundstringBackground for signature blocks
signature_borderstringBorder for signature blocks
text_action_window_backgroundstringBackground for text action window
text_action_window_icon_colorstringIcon color for text action window
attribute_valuestringold property for attribute value (Deprecated)
attribute_namestringold property for attribute name (Deprecated)
html_tagstringold property for HTML tags (Deprecated)
annotationstringold property for annotations (Deprecated)
function_namestringold property for function names (Deprecated)
identifier_namestringold property for identifier names (Deprecated)
identifier_varstringold property for identifier variables (Deprecated)
literalstringold property for literals (Deprecated)
operatorstringold property for operators (Deprecated)
commentstringold property for comments (Deprecated)
keywordstringold property for keywords (Deprecated)

terminalColors

Defines colors for the integrated terminal.

PropertyTypeDescriptionUsage example
foregroundstringNOTE: Please use baseColors.onSurface instead.Currently not used
backgroundstringNOTE: Please use baseColors.background instead.Currently not used
cursorstringColor of the terminal cursorTerminal cursor
color0stringColor for ANSI color 0 (black)ANSI black color
color1stringColor for ANSI color 1 (red)ANSI red color
color2stringColor for ANSI color 2 (green)ANSI green color
color3stringColor for ANSI color 3 (yellow)ANSI yellow color
color4stringColor for ANSI color 4 (blue)ANSI blue color
color5stringColor for ANSI color 5 (magenta)ANSI magenta color
color6stringColor for ANSI color 6 (cyan)ANSI cyan color
color7stringColor for ANSI color 7 (white)ANSI white color
color8stringColor for ANSI color 8 (bright black)ANSI bright black color
color9stringColor for ANSI color 9 (bright red)ANSI bright red color
color10stringColor for ANSI color 10 (bright green)ANSI bright green color
color11stringColor for ANSI color 11 (bright yellow)ANSI bright yellow color
color12stringColor for ANSI color 12 (bright blue)ANSI bright blue color
color13stringColor for ANSI color 13 (bright magenta)ANSI bright magenta color
color14stringColor for ANSI color 14 (bright cyan)ANSI bright cyan color
color15stringColor for ANSI color 15 (bright white)ANSI bright white color
color16stringColor for ANSI color 16ANSI extended colors
color17stringColor for ANSI color 17ANSI extended colors
color18stringColor for ANSI color 18ANSI extended colors
color19stringColor for ANSI color 19ANSI extended colors
color20stringColor for ANSI color 20ANSI extended colors
color21stringColor for ANSI color 21ANSI extended colors

WARNING

Terminal colors only support solid colors. The values have to be in the hex color format ( #RRGGBB).

NOTE

Some general colors of the terminal are defined in the baseColors category, such as the terminal background.

NOTE

Only the standard, intense and some extended ANSI colors can be customized. The customization range is limited to 0-21. The rest of the ANSI colors will use default values. ANSI colors

tokenColors

Defines syntax highlighting colors for the text editor. You can either define it as an object (for simple themes) or as an array of rules (for more complex themes).

As an Object

When defined as an object, you can specify colors for different syntax elements directly. This option allows you to define a mapping only from syntax elements to their corresponding foreground colors. Example:

json
"tokenColors": {
"comment": "#6A9955",
"string": "#CE9178",
"keyword": "#569CD6",
"function": "#DCDCAA"
}

The values have to be in the hex color format (#RRGGBB or #RRGGBBAA). Optionally color names can be used (e.g., red, blue, etc.).

As an Array (TextMate-style)

When defined as an array, you can create more complex rules for syntax highlighting. This option follows the TextMate grammar conventions (https://manual.macromates.com/en/language_grammars). Example:

json
"tokenColors": [
{
"scope": "comment",
"settings": {
"foreground": "#6A9955",
"fontStyle": "italic"
}
},
{
"scope": "string",
"settings": {
"foreground": "#CE9178"
}
}
]

The scope property defines which syntax elements the rule applies to, and the settings property contains the color settings for that scope. Colors values have to be in the hex color format ( #RRGGBB or #RRGGBBAA). Optionally color names can be used (e.g., red, blue, etc.).