별의 공부 블로그 🧑🏻‍💻
728x90
728x170

주피터 노트북을 다크모드로 변경하기

들어가며

  • 아나콘다 프롬프트에 간단한 명령을 함으로써 주피터 노트북을 다크 모드(Dark Mode)로 변경할 수 있다.

 

방법

① 아나콘다 프롬프트(Anaconda Prompt) 실행

 

② 명령어 입력

  • 다음의 명령을 입력하여 주피터 노트북테마가 담긴 패키지를 설치해준다.
> pip install jupyterthemes
Collecting jupyterthemes
  Downloading jupyterthemes-0.20.0-py2.py3-none-any.whl (7.0 MB)
     |████████████████████████████████| 7.0 MB 1.1 MB/s
Collecting lesscpy>=0.11.2
  Downloading lesscpy-0.15.0-py2.py3-none-any.whl (46 kB)
     |████████████████████████████████| 46 kB 1.2 MB/s
 ...

 

③ 주피터 노트북 테마 종류 확인

  • jt -l 명령을 입력하면, 적용할 수 있는 주피터 노트북의 테마를 확인할 수 있다.
> jt -l
Available Themes:
   chesterish
   grade3
   gruvboxd
   gruvboxl
   monokai
   oceans16
   onedork
   solarizedd
   solarizedl

 

④ 다크 모드 테마 적용

  • 다음과 같이 jt -t "테마명" 명령을 입력하여 다크 모드 테마를 주피터 노트북에 적용시켜준다.
> jt -t chesterish

 

⑤ 결과 확인

  • 주피터 노트북에 다크 모드가 적용된 것을 확인할 수 있다.

 

참고

옵션 확인하기

  • jt --help 명령을 입력하면 사용할 수 있는 옵션을 확인할 수 있다.
> jt --help
usage: jt [-h] [-l] [-t THEME] [-f MONOFONT] [-fs MONOSIZE] [-nf NBFONT] [-nfs NBFONTSIZE] [-tf TCFONT]
          [-tfs TCFONTSIZE] [-dfs DFFONTSIZE] [-ofs OUTFONTSIZE] [-mathfs MATHFONTSIZE] [-m MARGINS]
          [-cursw CURSORWIDTH] [-cursc CURSORCOLOR] [-cellw CELLWIDTH] [-lineh LINEHEIGHT] [-altp] [-altmd] [-altout]
          [-P] [-T] [-N] [-kl] [-vim] [-r] [-dfonts]

optional arguments:
  -h, --help            show this help message and exit
  -l, --list            list available themes
  -t THEME, --theme THEME
                        theme name to install
  -f MONOFONT, --monofont MONOFONT
                        monospace code font
  -fs MONOSIZE, --monosize MONOSIZE
                        code font-size
  -nf NBFONT, --nbfont NBFONT
                        notebook font
  -nfs NBFONTSIZE, --nbfontsize NBFONTSIZE
                        notebook fontsize
  -tf TCFONT, --tcfont TCFONT
                        txtcell font
  -tfs TCFONTSIZE, --tcfontsize TCFONTSIZE
                        txtcell fontsize
  -dfs DFFONTSIZE, --dffontsize DFFONTSIZE
                        pandas dataframe fontsize
  -ofs OUTFONTSIZE, --outfontsize OUTFONTSIZE
                        output area fontsize
  -mathfs MATHFONTSIZE, --mathfontsize MATHFONTSIZE
                        mathjax fontsize (in %)
  -m MARGINS, --margins MARGINS
                        fix margins of main intro page
  -cursw CURSORWIDTH, --cursorwidth CURSORWIDTH
                        set cursorwidth (px)
  -cursc CURSORCOLOR, --cursorcolor CURSORCOLOR
                        cursor color (r, b, g, p)
  -cellw CELLWIDTH, --cellwidth CELLWIDTH
                        set cell width (px or %)
  -lineh LINEHEIGHT, --lineheight LINEHEIGHT
                        code/text line-height (%)
  -altp, --altprompt    alt input prompt style
  -altmd, --altmarkdown
                        alt markdown cell style
  -altout, --altoutput  set output bg color to notebook bg
  -P, --hideprompt      hide cell input prompt
  -T, --toolbar         make toolbar visible
  -N, --nbname          nb name/logo visible
  -kl, --kernellogo     kernel logo visible
  -vim, --vimext        toggle styles for vim
  -r, --reset           reset to default theme
  -dfonts, --defaultfonts
                        force fonts to browser default

 

 

기본(Default) 테마로 복원하기

> jt -r
728x90
그리드형(광고전용)
⚠️AdBlock이 감지되었습니다. 원할한 페이지 표시를 위해 AdBlock을 꺼주세요.⚠️
starrykss
starrykss
별의 공부 블로그 🧑🏻‍💻


📖 Contents 📖