Skip to content

About

Just a Simple Dark Mode Module for PrestaShop BackOffice

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

Repository files navigation

Dark Mode for Prestashop back office

BackOffice Dark Mode

version MIT license Dark Reader Badge PrestaShop GitHub Downloads (all assets, all releases)

A PrestaShop module that allows you to enable dark mode support on all interfaces of the administration panel in order to give a rest to your eyes or those of your customers, using Dark Reader.

Features

  • Dynamic dark mode for your PrestaShop admin panel.
  • Uses the Dark Reader engine for high-quality, customizable dark themes.
  • Supports Shadow DOM, adopted style sheets, and dynamic CSS overrides.
  • Handles CSS imports, variables, and inline styles.
  • Includes fallback and user-agent style overrides for maximum compatibility.

How It Works

  • Injects Dark Reader scripts and styles into your back office's pages.
  • Dynamically modifies CSS to apply dark mode, including handling of CSS variables and custom properties.

Installation

  1. Copy the bodarkmode folder to your PrestaShop modules/ directory.
  2. Install the module from the PrestaShop admin panel.

How to Use

  1. Find Toggle: After installation, refresh the admin page to see the Toggle Dark Mode button in the sidebar under Dashboard.
  2. Enable Dark Mode: Toggle the dark mode button to activate.
  3. Enjoy: The dark theme will be applied automatically to all admin pages.

Development

Tested on PrestaShop 8 and 9. Should work with 1.7 too. This module makes use of the following Javascript library Dark Reader MIT License

You can update darkreader script files via a CDN such as:

DO NOT USE .mjs files, ONLY .js.

Themes

The default Dark Reader theme is configured in views/js/back.js. To change the current palette, edit the DARK_READER_THEME object.

Available presets:

Color Scheme Background Text
Default '#181a1b' '#e8e6e3'
Dracula '#282b36' '#e8e6e3'
Nord '#2e3440' '#eceff4'
Custom '#0b0e14' '#e6ebf2'

Change the default theme

Open the file and update these values:

const DARK_READER_THEME = {
    brightness: 100,
    contrast: 90,
    grayscale: 0,
    sepia: 0,
    darkSchemeBackgroundColor: '#2e3440',
    darkSchemeTextColor: '#eceff4',
    darkColorScheme: 'Nord',
};

Replace '#2e3440', '#eceff4', and 'Nord' with any of the preset values above or with your own colors.

Create a custom theme

For a fully custom look, set:

darkColorScheme: 'Custom',
darkSchemeBackgroundColor: '#0b0e14',
darkSchemeTextColor: '#e6ebf2',

Then refresh the PrestaShop back office to apply the new palette. You can also change other Dark Reader options such as brightness, contrast, grayscale, and sepia to fine-tune the look.

Fix charts and canvas elements

The DARK_READER_FIXES config is used for CSS exceptions that keep charts, canvases, and similar SVG/chart widgets readable when dark mode is enabled.

const DARK_READER_FIXES = {
    invert: [],
    css: 'canvas, svg.chart, .chart, [class*="chart"], [id*="chart"] { background: #e8e6e3 !important; }',
    ignoreInlineStyle: ['canvas', 'svg', '.chart', '[class*="chart"]', '[id*="chart"]'],
    ignoreImageAnalysis: ['canvas', 'svg', '.chart', '[class*="chart"]', '[id*="chart"]'],
};

If a chart or graph still looks too dark, add its selector here or adjust the css rule to match your backend styling.

To Do

  • create a configuration form to change default values

Credits

License

This module includes code from Dark Reader, which is licensed under the MIT License. Bodarkmode module is licensed under MIT.
Copyright (c) 2025-26 Adorade

Thanks for use

Hopefully, this module is useful to you.

About

Just a Simple Dark Mode Module for PrestaShop BackOffice

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages