PHPackages                             rpc-scandinavia/rpc\_rcm\_patches - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rpc-scandinavia/rpc\_rcm\_patches

ActiveRoundcube-plugin[Utility &amp; Helpers](/categories/utility)

rpc-scandinavia/rpc\_rcm\_patches
=================================

Patches dark mode for the message viewer and the message editor. Includes a Scandinavian Inter font. Options can be configured by the user or forced by the systems administrator. Requires minimum RoundCubeMail version 1.7.

00JavaScript

Since Apr 6Pushed 2mo agoCompare

[ Source](https://github.com/rpc-scandinavia/RpcRoundCubeMailPatches)[ Packagist](https://packagist.org/packages/rpc-scandinavia/rpc_rcm_patches)[ RSS](/packages/rpc-scandinavia-rpc-rcm-patches/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

RPC RoundCubeMail Patches
=========================

[](#rpc-roundcubemail-patches)

This plugin for RoundCubeMail version 1.7, patches dark mode for the mail editor and the mail viewer. I think the quality is close to what you get in **Thunderbird**.

It also includes a customized version of the Inter font made by Rasmus Andersson from Scandinavia, released under SIL Open Font License version 1.1.

 and

It extends the mail editor dark mode work done by Dhiego Cassiano Fogaça Barbosa, which is released under Apache License version 2.0.

Inter font
----------

[](#inter-font)

The configurable option `use_scandinavian_inter_font` lets you choose whether to use the modified Inter font.

ValueDescriptionyesUse the Scandinavian Inter font in both the mail viewer and the mail editor.viewerUse the Scandinavian Inter font in the mail viewer.editorUse the Scandinavian Inter font in the mail editor.Any other value will disable use of the Scandinavian Inter font.When used in the mail editor, the Inter font is added to the `available_fonts`option and set as default in the `default_font` option.

A note about custom fonts in the message editor. Even though the font is available in the message **css**, the `@font face` is most likely stripped by the receiving mail servers with the result that the message receiver will see an alternative font unless the message receiver has an `inter` font installed, in which case the message receiver should see the Inter font though not the Scandinavian version.

Dark mode prerequisites
-----------------------

[](#dark-mode-prerequisites)

This plugin assumes that RCM adds and removes the `dark-mode` class on the `html`element, specifying whether **dark mode** is enabled or not:

- For the web program itself
- For the mail viewer `iframe`
- For the mail viewer `window` or `tab`
- For the mail editor `iframe` (TinyMCE)

Mail viewer
-----------

[](#mail-viewer)

The configurable option `invert_implementation` lets you choose which **inverting**implementation to use.

ValueDescriptionclassicThe initial implementation (see examples below).colourAn alternative implementation that retains more colours.### Known bugs

[](#known-bugs)

Minor: Not all the **css** and **js** is minified.

### White flash

[](#white-flash)

Sometimes there is a white flash when a mail is selected. It looks like this is coming from white or bright background in the message itself, and the flash is caused by the delay between loading the message and the plugin inverting the message HTML elements.

I have tried to fix this in two ways.

Message shown in the viewer: The IFrame element which is the message viewer is hidden with `display = "none"`, and then shown after the message inversion has been performed. This seems to work as intended.

**Message shown in its own tab or window**: The element containing the message is hidden with `display = 'none'`, and then shown after the message inversion has been performed. This don't work 100%, because it is not possible (I have not fund a way) to hide the element from plug-in code any earlier then in the **DOMContentLoaded** event listener. This fix is actually also done in the message viewer, just inside the IFrame.

I am concidering to remove the second fix, because it actually causes a blink because the message is briefly shown, then hidden and inverted if in dark mode, and finally shown again. It is basicly the top 11 lines in `darkmode-viewer.js`.

Mail editor (TinyMCE)
---------------------

[](#mail-editor-tinymce)

RCM does not set the `dark-mode` class on the `html` element when the mail editor is created/initialised, the plugin fixes that.

RCM does however set the `dark-mode` class on the `html` element when the user toggles between **dark** and **light** mode.

### Fix css

[](#fix-css)

The message editor **css** is fixed by creating a new **css** file containing the existing **css** from `skins/elastic/styles/embed.min.css` and some additional **css**. The RCM configuration setting `editor_css_location` is set with the path to the new combined **css** file, which causes RCM to use that file when it initialises the mail editor (TinyMCE).

### Known bugs

[](#known-bugs-1)

Minor: Not all the **css** is minified.

File permissions
----------------

[](#file-permissions)

Because files are written, the following file permissions are required:

```
chmod  u+w  plugins/rpc_rcm_patches/skin/elastic
```

Installation
------------

[](#installation)

Basic steps to install this plugin:

- Download code from GitHub ( )
- Extract files, and copy directory `rpc_rcm_patches` to `plugins`
- Enable plugin in `config/config.inc.php` by adding `rpc_rcm_patches` to ` $config['plugins']` array
- Copy configuration file `plugins/rpc_rcm_patches/config.inc.php.dist` to ` plugins/rpc_rcm_patches/config.inc.php` and modify as needed
- Allow plugin to create **css** file: `chmod  u+w  plugins/rpc_rcm_patches/skin/elastic`

Changes
-------

[](#changes)

Changes made.

VersionDescription2026.0Added a button in the message toolbar, that can toggle between dark and light mode, when the application is in dark mode.2025.0Initial version.Examples
--------

[](#examples)

### Message editor

[](#message-editor)

[![Message editor in dark mode](images/dark-mode-example1.png)](images/dark-mode-example1.png)

### Message viewer

[](#message-viewer)

[![Message viewer in dark mode](images/dark-mode-example5.png)](images/dark-mode-example5.png)

[![Message viewer in dark mode](images/dark-mode-example6.png)](images/dark-mode-example6.png)

#### The same message in RoundCubeMail and Thunderbird

[](#the-same-message-in-roundcubemail-and-thunderbird)

[![Message viewer in dark mode](images/dark-mode-example7-in-rcm.png)](images/dark-mode-example7-in-rcm.png)

[![Thunderbird in dark mode](images/dark-mode-example7-in-thunderbird.png)](images/dark-mode-example7-in-thunderbird.png)

René Paw Christensen

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance56

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10145161?v=4)[René Paw Christensen](/maintainers/rpc-scandinavia)[@rpc-scandinavia](https://github.com/rpc-scandinavia)

---

Tags

darkroundcubemail

### Embed Badge

![Health badge](/badges/rpc-scandinavia-rpc-rcm-patches/health.svg)

```
[![Health](https://phpackages.com/badges/rpc-scandinavia-rpc-rcm-patches/health.svg)](https://phpackages.com/packages/rpc-scandinavia-rpc-rcm-patches)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
