Skip to main content

Customizing themes

You can create custom interface themes for ONLYOFFICE Docs by adding JSON configuration files to the themes directory on the server.

Creating a theme file

Create a .json file with the following structure:

{
"name": "Amazing theme",
"l10n": {
"fr": "Thème incroyable",
"de": "Geweldig thema"
},
"id": "theme-amazing",
"type": "light",
"colors": {
"toolbar-header-document": "#446995",
"toolbar-header-spreadsheet": "#40865c",
"toolbar-header-presentation": "#aa5252",
"border-color-shading": "rgba(0, 0, 0, 0.15)",
...
}
}

Parameters

ParameterTypeDescription
namestringThe theme display name shown in the theme picker.
l10nobjectLocalized theme names. Keys are two-letter language codes, values are translated names.
idstringA unique theme identifier. Must start with theme- and can contain a-Z, 0-9, -, _.
typestringThe base theme type: dark or light.
colorsobjectColor definitions in hex (#446995) or RGBA (rgba(0, 0, 0, 0.15)) format.

Deploying the theme file

Place the .json file in the themes directory:

sudo docker cp /path/theme-file.json {container_id}:/var/www/onlyoffice/documentserver/web-apps/apps/common/main/resources/themes

The server cache refreshes every 5 minutes. After placing the file, refresh the editor page. In some cases, you may need to restart the services and clear the cache for changes to appear.

Once deployed, the theme will be available in the View tab > Interface Theme.

Applying custom themes via API

To apply a custom theme through the editor initialization config, pass its id to the editorConfig.customization.uiTheme parameter:

const config = {
editorConfig: {
customization: {
uiTheme: "theme-amazing",
},
},
}

Color parameters

The colors object supports the following parameters. All default values correspond to the built-in light theme.

Header toolbar

ParameterDefaultDescriptionExample
toolbar-header-document#446995The toolbar header color for text documents.toolbar-header-document
toolbar-header-spreadsheet#40865cThe toolbar header color for spreadsheets.toolbar-header-spreadsheet
toolbar-header-presentation#BE664FThe toolbar header color for presentations.toolbar-header-presentation
toolbar-header-pdf#AA5252The toolbar header color for PDFs.toolbar-header-pdf
text-toolbar-header-on-background-document#38567AThe text color of user initials in the text documents toolbar header.text-toolbar-header-on-background-document
text-toolbar-header-on-background-spreadsheet#336B49The text color of user initials in the spreadsheets toolbar header.text-toolbar-header-on-background-spreadsheet
text-toolbar-header-on-background-presentation#854535The text color of user initials in the presentations toolbar header.text-toolbar-header-on-background-presentation
text-toolbar-header-on-background-pdf#8D4444The text color of user initials in the PDFs toolbar header.text-toolbar-header-on-background-pdf

Background

ParameterDefaultDescriptionExample
background-normal#fffThe background color of windows, drop-down panels, and regular controls.background-normal
background-toolbar#f7f7f7The background color of the toolbar, all panels, and the dialog box header.background-toolbar
background-toolbar-additional#efefefThe additional toolbar background color for inactive sheets.background-toolbar-additional
background-primary-dialog-button#444The background color of the primary dialog button.background-primary-dialog-button
background-accent-button#446995The background color of the accent button in the text document editor.background-accent-button
background-tab-underline#444The background color of the tab underline for the gray toolbar.background-tab-underline
background-notification-popover#fcfed7The background color of the notification popover.background-notification-popover
background-notification-badge#ffd112The background color of icon notification badges.background-notification-badge
background-scrimrgba(0, 0, 0, 0.2)The scrim color reducing the background intensity of modal windows.background-scrim
background-loaderrgba(24, 24, 24, 0.9)The loader background color.background-loader
background-alt-key-hint#FFD938The background color of button shortcut hints when the Alt key is pressed.background-alt-key-hint
background-contrast-popover#fffThe background color of information tips.background-contrast-popover
background-fill-button#FFD112The background color of the button from the form header.background-fill-button
shadow-contrast-popoverrgba(0, 0, 0, 0.3)The shadow color of information tips.shadow-contrast-popover

Highlight

ParameterDefaultDescriptionExample
highlight-button-hover#e0e0e0The highlight color of buttons, drop-down menu items, and other interactive lists on hover.highlight-button-hover
highlight-button-pressed#cbcbcbThe pressed button highlight color.highlight-button-pressed
highlight-button-pressed-hover#bababaThe pressed button highlight color on hover.highlight-button-pressed-hover
highlight-primary-dialog-button-hover#1c1c1cThe highlight color of the primary dialog button on hover.highlight-primary-dialog-button-hover
highlight-accent-button-hover#375478The highlight color of the accent button on hover.highlight-accent-button-hover
highlight-accent-button-pressed#293f59The highlight color of the pressed accent button.highlight-accent-button-pressed
highlight-header-button-hoverrgba(255, 255, 255, 0.15)The highlight color of the header button on hover.highlight-header-button-hover
highlight-header-button-pressedrgba(255, 255, 255, 0.25)The highlight color of the pressed header button.highlight-header-button-pressed
highlight-toolbar-tab-underline#444The highlight color of the active tab underline for the gray toolbar.highlight-toolbar-tab-underline
highlight-text-select#3494fbThe highlight color of selected text in regular controls.highlight-text-select
highlight-fill-button-hover#FFE165The highlight color of the form header button on hover.highlight-fill-button-hover
highlight-fill-button-pressed#DFB500The background color of the pressed button from the form header.highlight-fill-button-pressed

Border

ParameterDefaultDescriptionExample
border-toolbar#cbcbcbThe border color of the toolbar, panels, and modal windows.border-toolbar
border-toolbar-active-panel-top#f7f7f7The border color of the top toolbar active panel.border-toolbar-active-panel-top
border-divider#dfdfdfThe color of borders that divide toolbar and panel elements.border-divider
border-regular-control#c0c0c0The border color of regular controls.border-regular-control
border-toolbar-button-hover#e0e0e0The general border color for toolbar buttons placed together on hover.border-toolbar-button-hover
border-preview-hover#bababaThe border color of preview control elements on hover.border-preview-hover
border-preview-select#888The border color of pressed preview control elements.border-preview-select
border-control-focus#848484The border color of focused regular controls.border-control-focus
border-color-shadingrgba(0, 0, 0, 0.15)The border color of the palette colors.border-color-shading
border-error#f62211The border color of input boxes when entering an invalid value.border-error
border-contrast-popover#fffThe border color of information tips.border-contrast-popover
border-button-pressed-focus#848484The border color of focused pressed buttons.border-button-pressed-focus

Text

ParameterDefaultDescriptionExample
text-normalrgba(0, 0, 0, 0.8)The default text color.text-normal
text-normal-pressedrgba(0, 0, 0, 0.8)The text color of active elements (selected tabs, pressed buttons).text-normal-pressed
text-secondaryrgba(0, 0, 0, 0.6)The secondary text color (notes, explanations).text-secondary
text-tertiaryrgba(0, 0, 0, 0.4)The tertiary text color (placeholders).text-tertiary
text-link#445799The text color of links and link buttons in notification popovers.text-link
text-link-hover#445799The text color of links and link buttons on hover in popovers.text-link-hover
text-link-active#445799The text color of pressed links and link buttons in popovers.text-link-active
text-link-visited#445799The text color of visited links and link buttons in popovers.text-link-visited
text-inverse#fffThe text color on the inverted toolbar background.text-inverse
text-toolbar-header#fffThe text color of the toolbar header.text-toolbar-header
text-contrast-background#fffThe text color for the contrast background (loader, cell titles).text-contrast-background
text-alt-key-hintrgba(0, 0, 0, 0.8)The text color of button shortcut hints when the Alt key is pressed.text-alt-key-hint

Icon

ParameterDefaultDescriptionExample
icon-normal#444The icon color.icon-normal
icon-normal-pressed#444The icon color of active elements (selected tabs, pressed buttons).icon-normal-pressed
icon-inverse#fffThe inverted icon color.
icon-toolbar-header#fffThe icon color from the toolbar header (user initials icon).icon-toolbar-header
icon-notification-badge#000The icon color of notification badges from the toolbar header.icon-notification-badge
icon-contrast-popover#fffThe icon color for contrast information tips.
icon-success#090The color of resolved comment checkboxes or success indications.icon-success

Canvas

ParameterDefaultDescriptionExample
canvas-background#eeeThe workspace background color behind the document page, sheet, or slide.canvas-background
canvas-content-background#fffThe background color of the document page, cells, or slide.canvas-content-background
canvas-page-border#cccThe border color of the document page.canvas-page-border
canvas-ruler-background#fffThe ruler background color.canvas-ruler-background
canvas-ruler-border#cbcbcbThe ruler border color.canvas-ruler-border
canvas-ruler-margins-background#d9d9d9The background color of ruler margins.canvas-ruler-margins-background
canvas-ruler-mark#555The color of ruler marks (target and text).canvas-ruler-mark
canvas-ruler-handle-border#555The border color of the ruler handle.canvas-ruler-handle-border
canvas-ruler-handle-border-disabled#aaaThe border color of the disabled ruler handle.canvas-ruler-handle-border-disabled
canvas-high-contrast#000The color of high-contrast elements (tab marks, grouped cell symbols).canvas-high-contrast
canvas-high-contrast-disabled#666The color of disabled high-contrast elements.canvas-high-contrast-disabled
canvas-cell-borderrgba(0, 0, 0, 0.1)The cell border color.canvas-cell-border
canvas-cell-title-text#444The text color of cell titles.canvas-cell-title-text
canvas-cell-title-background#f7f7f7The background color of cell titles.canvas-cell-title-background
canvas-cell-title-background-hover#dfdfdfThe background color of cell titles on hover.canvas-cell-title-background-hover
canvas-cell-title-background-selected#cfcfcfThe background color of selected cell titles.canvas-cell-title-background-selected
canvas-cell-title-border#d8d8d8The border color of cell titles.canvas-cell-title-border
canvas-cell-title-border-hover#c9c9c9The border color of cell titles on hover.canvas-cell-title-border-hover
canvas-cell-title-border-selected#bbbThe border color of selected cell titles.canvas-cell-title-border-selected
canvas-scroll-thumb#f1f1f1The scroll thumb color.canvas-scroll-thumb
canvas-scroll-thumb-hover#cfcfcfThe scroll thumb color on hover.canvas-scroll-thumb-hover
canvas-scroll-thumb-pressed#adadadThe pressed scroll thumb color.canvas-scroll-thumb-pressed
canvas-scroll-thumb-border#cfcfcfThe border color of the scroll thumb.canvas-scroll-thumb-border
canvas-scroll-thumb-border-hover#cfcfcfThe border color of the scroll thumb on hover.canvas-scroll-thumb-border-hover
canvas-scroll-thumb-border-pressed#adadadThe border color of the pressed scroll thumb.canvas-scroll-thumb-border-pressed
canvas-scroll-arrow#adadadThe scroll arrow color.canvas-scroll-arrow
canvas-scroll-arrow-hover#f1f1f1The scroll arrow color on hover.canvas-scroll-arrow-hover
canvas-scroll-arrow-pressed#f1f1f1The pressed scroll arrow color.canvas-scroll-arrow-pressed
canvas-scroll-thumb-target#cfcfcfThe target color of the scroll thumb.canvas-scroll-thumb-target
canvas-scroll-thumb-target-hover#f1f1f1The target color of the scroll thumb on hover.canvas-scroll-thumb-target-hover
canvas-scroll-thumb-target-pressed#f1f1f1The target color of the pressed scroll thumb.canvas-scroll-thumb-target-pressed
canvas-sheet-view-cell-background#73bf91The cell background color in Sheet View mode.canvas-sheet-view-cell-background
canvas-sheet-view-cell-background-hover#97e3b6The cell background color in Sheet View mode on hover.canvas-sheet-view-cell-background-hover
canvas-sheet-view-cell-background-pressed#aaffccThe pressed cell background color in Sheet View mode.canvas-sheet-view-cell-background-pressed
canvas-sheet-view-cell-title-label#121212The cell text color in Sheet View mode.canvas-sheet-view-cell-title-label
canvas-sheet-view-select-all-icon#3d664eThe Select All cells icon color in Sheet View mode.canvas-sheet-view-select-all-icon
canvas-freeze-line-1px#818181The freeze line color with shadow.canvas-freeze-line-1px
canvas-freeze-line-2px#aaaaaaThe freeze line color without shadow.canvas-freeze-line-2px
canvas-select-all-icon#82878fThe Select All cells icon color.canvas-select-all-icon

Full example

{
"name": "Amazing theme",
"l10n": {
"fr": "Thème incroyable",
"de": "Geweldig thema"
},
"id": "theme-amazing",
"type": "light",
"colors": {
"toolbar-header-document": "#446995",
"toolbar-header-spreadsheet": "#40865c",
"toolbar-header-presentation": "#BE664F",
"toolbar-header-pdf": "#AA5252",
"text-toolbar-header-on-background-document": "#38567A",
"text-toolbar-header-on-background-spreadsheet": "#336B49",
"text-toolbar-header-on-background-presentation": "#854535",
"text-toolbar-header-on-background-pdf": "#8D4444",

"background-normal": "#fff",
"background-toolbar": "#f7f7f7",
"background-toolbar-additional": "#efefef",
"background-primary-dialog-button": "#444",
"background-accent-button": "#446995",
"background-tab-underline": "#444",
"background-notification-popover": "#fcfed7",
"background-notification-badge": "#ffd112",
"background-scrim": "rgba(0, 0, 0, 0.2)",
"background-loader": "rgba(24, 24, 24, 0.9)",
"background-alt-key-hint": "#FFD938",
"background-contrast-popover": "#fff",
"background-fill-button": "#FFD112",
"shadow-contrast-popover": "rgba(0, 0, 0, 0.3)",

"highlight-button-hover": "#e0e0e0",
"highlight-button-pressed": "#cbcbcb",
"highlight-button-pressed-hover": "#bababa",
"highlight-primary-dialog-button-hover": "#1c1c1c",
"highlight-accent-button-hover": "#375478",
"highlight-accent-button-pressed": "#293f59",
"highlight-header-button-hover": "rgba(255, 255, 255, 0.15)",
"highlight-header-button-pressed": "rgba(255, 255, 255, 0.25)",
"highlight-toolbar-tab-underline": "#444",
"highlight-text-select": "#3494fb",
"highlight-fill-button-hover": "#FFE165",
"highlight-fill-button-pressed": "#DFB500",

"border-toolbar": "#cbcbcb",
"border-toolbar-active-panel-top": "#f7f7f7",
"border-divider": "#dfdfdf",
"border-regular-control": "#c0c0c0",
"border-toolbar-button-hover": "#e0e0e0",
"border-preview-hover": "#bababa",
"border-preview-select": "#888",
"border-control-focus": "#848484",
"border-color-shading": "rgba(0, 0, 0, 0.15)",
"border-error": "#f62211",
"border-contrast-popover": "#fff",
"border-button-pressed-focus": "#848484",

"text-normal": "rgba(0, 0, 0, 0.8)",
"text-normal-pressed": "rgba(0, 0, 0, 0.8)",
"text-secondary": "rgba(0, 0, 0, 0.6)",
"text-tertiary": "rgba(0, 0, 0, 0.4)",
"text-link": "#445799",
"text-link-hover": "#445799",
"text-link-active": "#445799",
"text-link-visited": "#445799",
"text-inverse": "#fff",
"text-toolbar-header": "#fff",
"text-contrast-background": "#fff",
"text-alt-key-hint": "rgba(0, 0, 0, 0.8)",

"icon-normal": "#444",
"icon-normal-pressed": "#444",
"icon-inverse": "#fff",
"icon-toolbar-header": "#fff",
"icon-notification-badge": "#000",
"icon-contrast-popover": "#fff",
"icon-success": "#090",

"canvas-background": "#eee",
"canvas-content-background": "#fff",
"canvas-page-border": "#ccc",
"canvas-ruler-background": "#fff",
"canvas-ruler-border": "#cbcbcb",
"canvas-ruler-margins-background": "#d9d9d9",
"canvas-ruler-mark": "#555",
"canvas-ruler-handle-border": "#555",
"canvas-ruler-handle-border-disabled": "#aaa",
"canvas-high-contrast": "#000",
"canvas-high-contrast-disabled": "#666",
"canvas-cell-border": "rgba(0, 0, 0, 0.1)",
"canvas-cell-title-text": "#444",
"canvas-cell-title-background": "#f7f7f7",
"canvas-cell-title-background-hover": "#dfdfdf",
"canvas-cell-title-background-selected": "#cfcfcf",
"canvas-cell-title-border": "#d8d8d8",
"canvas-cell-title-border-hover": "#c9c9c9",
"canvas-cell-title-border-selected": "#bbb",
"canvas-scroll-thumb": "#f1f1f1",
"canvas-scroll-thumb-hover": "#cfcfcf",
"canvas-scroll-thumb-pressed": "#adadad",
"canvas-scroll-thumb-border": "#cfcfcf",
"canvas-scroll-thumb-border-hover": "#cfcfcf",
"canvas-scroll-thumb-border-pressed": "#adadad",
"canvas-scroll-arrow": "#adadad",
"canvas-scroll-arrow-hover": "#f1f1f1",
"canvas-scroll-arrow-pressed": "#f1f1f1",
"canvas-scroll-thumb-target": "#cfcfcf",
"canvas-scroll-thumb-target-hover": "#f1f1f1",
"canvas-scroll-thumb-target-pressed": "#f1f1f1",
"canvas-sheet-view-cell-background": "#73bf91",
"canvas-sheet-view-cell-background-hover": "#97e3b6",
"canvas-sheet-view-cell-background-pressed": "#aaffcc",
"canvas-sheet-view-cell-title-label": "#121212",
"canvas-sheet-view-select-all-icon": "#3d664e",
"canvas-freeze-line-1px": "#818181",
"canvas-freeze-line-2px": "#aaaaaa",
"canvas-select-all-icon": "#82878f"
}
}