Software & AppsOperating SystemLinux

How To Enable Dark Theme/Night Mode in Calibre Ebook Viewer

Ubuntu 5

Calibre is a powerful and versatile ebook manager that allows you to organize, save, and read ebooks in various formats. It also offers a plethora of customization options, one of which is the ability to switch to a dark theme or night mode. This article will guide you step-by-step on how to enable this feature.

Quick Answer

To enable dark theme/night mode in Calibre Ebook Viewer, you need to change the theme of the Calibre application itself by creating and modifying a file named calibre.sh in the /etc/profile.d/ directory. Additionally, you can change the background and text color in the Ebook Viewer and override book colors from within Calibre.

Changing the Calibre App Theme

The first step towards enabling a dark theme in Calibre involves changing the theme of the Calibre application itself. This can be achieved by creating and modifying a file named calibre.sh in the /etc/profile.d/ directory. Here’s how to do it:

  1. Open your terminal.
  2. Type in the following command to create and open the calibre.sh file in a text editor (we’re using nano in this example): sudo nano /etc/profile.d/calibre.sh.
  3. Once the file is open, add the following line to the file: export CALIBRE_USE_SYSTEM_THEME=1. This command sets the Calibre theme to use the system’s default theme.
  4. Save the file and exit the editor. In nano, you can do this by pressing Ctrl + X, then Y to confirm saving changes, and finally Enter to confirm the file name.
  5. Restart the display manager using the command sudo service gdm restart. This will apply the changes you made.

Changing the Background and Text Color in the Ebook Viewer

The next step is to change the background and text color in the Ebook Viewer. Here’s how:

  1. Open an ebook in the Ebook Viewer (not in the main Calibre app).
  2. Right-click anywhere in the viewer and select “Preferences”.
  3. In the Preferences window, navigate to the “Colors” section.
  4. Click on “New scheme” and set the desired background and foreground (text) colors for the dark theme.
  5. Click “Apply” and then “OK” to save the changes.

Overriding Ebook CSS

In some cases, the font color in ebooks may not change even after adjusting the viewer settings. This can be fixed by manually modifying the CSS file inside the ebook. Here’s how:

  1. Extract the ebook file (which is essentially a zip file).
  2. Locate the Content.css file in the extracted files.
  3. Open the file and search for the color:Black line.
  4. Replace it with a different color value, such as “Gray” or “#DBDBDB”. This changes the font color to a lighter shade, making it visible against a dark background.
  5. Save the changes, compress the extracted files back into a zip file, and change the file extension to .epub.

Overriding Book Colors from Within Calibre

Calibre also offers an in-built feature to override book colors. Here’s how to use it:

  1. Go to “Convert books” and select the book you want to modify.
  2. In the “Look and feel” section, choose to convert to the same format and check the “Colors” option.
  3. This allows you to change the colors of the book without manually editing the CSS file.

Remember, the specific steps and options may vary depending on the version of Calibre you are using. Always refer to the official Calibre documentation for the most accurate and up-to-date information.

By following these steps, you can enjoy a more comfortable reading experience in Calibre, especially during the night or in low-light conditions. Happy reading!

Can I enable dark theme in Calibre on all operating systems?

Yes, you can enable dark theme in Calibre on all operating systems by following the steps mentioned in the article.

Does changing the Calibre app theme affect the theme of the Ebook Viewer?

No, changing the Calibre app theme does not affect the theme of the Ebook Viewer. You need to change the background and text color settings in the Ebook Viewer separately.

Can I customize the background and text color for each ebook individually?

Yes, you can customize the background and text color for each ebook individually by following the steps mentioned in the article. This allows you to have different color schemes for different ebooks.

Will changing the font color in the CSS file affect the original ebook?

Yes, changing the font color in the CSS file will affect the original ebook. However, it is recommended to make a backup of the original file before making any modifications.

Can I override book colors without manually editing the CSS file?

Yes, you can override book colors without manually editing the CSS file by using the "Convert books" feature in Calibre. This allows you to change the colors of the book without directly modifying the CSS file.

Leave a Comment

Your email address will not be published. Required fields are marked *