Change the Theme in Jupyter Notebook

A Jupyter Notebook theme is a pre-defined set of styles like background color, font style, font color, etc. which determines the visual appearance of the Jupyter Notebook interface. By default, Jupyter Notebook uses a light theme, but generally, developers prefer dark themes while working in long coding sessions which helps them to reduce eye strain and makes the visual interface more appealing there are a lot of themes that we discuss later in this article.

Importance of Themes in Jupyter Notebook

  • Reduce eye strain: While working in long coding sessions or working in low-light environments they can strain your eyes and hence to reduce eye strain there are different themes available to match the light of your environment.
  • Readability: Themes are designed in such a way that enhances the readability of the interface making it easier for color blind and visually impaired persons.
  • Personalization: Themes provide a more personal look to the user and make the application more user-friendly.

Jupyter Notebook Themes

To install jupyter notebook themes – open the terminal and run the following command:

pip install jupyterthemes

If you have already install jupyter themes and want to upgrade them run the below command in terminal,

pip install --upgrade jupyterthemes

List all the available themes – To list all the available theme run the following command in terminal,

jt -l

Available themes:

Below are the list that we can use Theme in Jupyter Notebook:

  • chesterish
  • grade3
  • gruvboxd
  • gruvboxl
  • monokai
  • oceans16
  • onedork
  • solarizedd
  • solarizedl

Syntax to Apply Themes in Jupyter Notebook

To apply theme to the jupyter notebook the command syntax is as follows:

!jt -t [theme name]

After applying theme you need to restart the Jupyter Notebook to see the changes.

To reset to the default theme of Jupyter Notebook use the following command,

jt -r

Example 1: Applying Monokai Theme

!jt -t monokai

Monokai

Example 2: Applying grade3 Theme

!jt -t grade3

grade3

Example 3: Applying onedork Theme

!jt -t onedork

Example 4: Applying Chesterish Theme

!jt -t chesterish

How to Change the Theme in Jupyter Notebook

In this article, we will cover how to change the theme in Jupyter Notebook. We will look at what is Jupyter notebook, the themes why we use them, and the different themes available in Jupyter Notebook we will look into examples along with the screenshots to get a better understanding. We will also see how can we customize our theme.

The Jupyter Notebook is the original web application for creating and sharing computational documents that contain live code, equations, visualizations, and narrative text. It offers a simple, streamlined, document-centric experience. Jupyter has support for over 40 different programming languages and Python is one of them.

Similar Reads

Change the Theme in Jupyter Notebook

A Jupyter Notebook theme is a pre-defined set of styles like background color, font style, font color, etc. which determines the visual appearance of the Jupyter Notebook interface. By default, Jupyter Notebook uses a light theme, but generally, developers prefer dark themes while working in long coding sessions which helps them to reduce eye strain and makes the visual interface more appealing there are a lot of themes that we discuss later in this article....

Customize Theme in Jupyter Notebook

There are different command line options available in jt command to customize the theme which are as follows:...

Contact Us