A dark color scheme for Vim
Switch branches/tags
Nothing to show
Clone or download



moonfly is a dark color scheme for Vim and Neovim that has taken inspiration from:

Note, the moonfly color scheme does incrementally change from time to time, primarily in regards to language and plugin theming. However, the core color palette will not change; except the time I changed crimson (July 1 2017), sorry.

Primary Colors

Normal Color Bright Color
Background background Foreground foreground
Grey grey Coral coral
Red red Crimson crimson
Green green Emerald emerald
Khaki khaki Wheat wheat
Blue blue Light Blue light-blue
Magenta magenta Purple purple
Turquoise turquoise Light Green light-green
Orange orange Violet violet






The font in use is Iosevka.

Languages explicitly styled

  • C/C++
  • Shell
  • Python
  • Ruby
  • Crystal
  • Elixir
  • JavaScript
  • CoffeeScript
  • PureScript
  • TypeScript
  • Markdown
  • Go
  • Rust
  • Java
  • Scala
  • PHP
  • Haskell
  • Clojure
  • Elm
  • Lua

Plugins explicity styled


The moonfly color scheme supports lightline.vim. To enable the moonfly lightline colorscheme, after the lightline.vim plugin has been installed, please add the following to your vimrc:

let g:lightline = { 'colorscheme': 'moonfly' }

The moonfly color scheme also supports vim-airline. To enable the moonfly airline theme, after the vim-airline plugin has been installed, please add the following to your vimrc:

let g:airline_theme = 'moonfly'

Alternatively, a companion status line, vim-moonfly-statusline, is available for those that just want a simple moonfly themed statusline.


Use your favoured plugin manager to install bluz71/vim-moonfly-colors then set the colorscheme in your vimrc file.

If using vim-plug do the following:

  1. Add Plug 'bluz71/vim-moonfly-colors' to your vimrc
  2. Run :PlugInstall
  3. Add colorscheme moonfly to your vimrc, make sure this line appears after the Plug declaration.


The g:moonflyCursorLineNr option specifies whether to highlight the cursor line, as blue, in the number column if the relativenumber or cursorline settings are in effect. By default the cursor line will be highlighted as such.

To disable highlighting of the current cursor line in the number column please add the following to your vimrc:

let g:moonflyCursorLineNr = 0

The g:moonflyCursorColor option specifies whether to color the cursor or not. By default the cursor will NOT be colored. If you prefer a colored cursor then add the following to your vimrc:

let g:moonflyCursorColor = 1

The g:moonflyTerminalColors option specifies whether to use the moonfly color palette in :terminal windows when termguicolors is set. By default this option is enabled, if you prefer not to use the moonfly color palette for the first 16 terminal colors then add the following to your vimrc:

let g:moonflyTerminalColors = 0

The g:moonflyUnderlineMatchParen options specifies whether to underline matching parentheses. By default this option is disabled. If you want to underline matching parentheses then add the following to your vimrc:

let g:moonflyUnderlineMatchParen = 1

True Color Terminals

Many terminal programs, such as iTerm2 and GNOME Terminal, support 24-bit true colors. Modern versions of Vim and Neovim, on such terminals, support true colors when set termguicolors is enabled.

Caveat, Terminal.app on macOS and xterm on Unix do not support true colors.

On terminals that do support true colors, and when termguicolors is set, the moonfly color scheme will not require any terminal configuration to emit the correct moonfly colors.

For the true colors moonfly color scheme to display correctly inside tmux the following setting will be required in ~/.tmux.conf:

set -ga terminal-overrides ',xterm-256color:Tc'

Vim, as against Neovim, inside tmux, will also require the following setting be added to vimrc:

set t_8b=^[[48;2;%lu;%lu;%lum
set t_8f=^[[38;2;%lu;%lu;%lum

Note: ^[ in the above snippet is a real escape character; to insert it, enter Ctrl-v followed by Esc. Repeating, the above t_8* settings are not required for Neovim.

If consistency between Vim colors and $SHELL colors is important then I recommend proceeding with the 256-color configurations listed in the next section.

256 Color Terminals

The moonfly color scheme, when used with Vim absent termguicolors, requires the host terminal be configured with a specific color palette.

Firstly, the terminal emulator must be configured for 256 colors, which usually means setting the terminal's type to xterm-256color or screen-256color when used inside tmux.

The terminal can now be configured with the following moonfly colors:

Type Category Value Color
Background Background 080808 background
Foreground Forground b2b2b2 background
Bold Bold eeeeee background
Cursor Cursor 9e9e9e background
Cursor Text Cursor Text 080808 background
Highlight Highlight b2ceee background
Highlight Text Highlight Text 080808 background
Color 1 Black (normal) 373c40 background
Color 2 Red (normal) ff5454 background
Color 3 Green (normal) 8cc85f background
Color 4 Yellow (normal) e3c78a background
Color 5 Blue (normal) 80a0ff background
Color 6 Magenta (normal) ce76e8 background
Color 7 Cyan (normal) 7ee0ce background
Color 8 White (normal) de935f background
Color 9 Black (bright) f09479 background
Color 10 Red (bright) f74782 background
Color 11 Green (bright) 42cf89 background
Color 12 Yellow (bright) cfcfb0 background
Color 13 Blue (bright) 78c2ff background
Color 14 Magenta (bright) ae81ff background
Color 15 Cyan (bright) 85dc85 background
Color 16 White (bright) e2637f background

iterm2 users on macOS can import this color scheme.

Gnome Terminal users can run this script to create a Moonfly profile. Firstly before executing the script, please install the dconf-cli command line utility for modern versions of Gnome (3.28 and later), for example sudo apt install dconf-cli. Lastly after executing the script, please set the cursor and highlight colors by hand, with the color values listed above, in Preferences / Moonfly / Colors.

xterm users on Linux can add the following snippet to their ~/.Xresources file and launch xterm with xterm -name xterm-moonfly.

xterm-moonfly*background:  #080808
xterm-moonfly*foreground:  #b2b2b2
xterm-moonfly*cursorColor: #9e9e9e
xterm-moonfly*colorBD:     #eeeeee
xterm-moonfly*color0:      #373c40
xterm-moonfly*color1:      #ff5454
xterm-moonfly*color2:      #8cc85f
xterm-moonfly*color3:      #e3c78a
xterm-moonfly*color4:      #80a0ff
xterm-moonfly*color5:      #ce76e8
xterm-moonfly*color6:      #7ee0ce
xterm-moonfly*color7:      #de935f
xterm-moonfly*color8:      #f09479
xterm-moonfly*color9:      #f74782
xterm-moonfly*color10:     #42cf89
xterm-moonfly*color11:     #cfcfb0
xterm-moonfly*color12:     #78c2ff
xterm-moonfly*color13:     #ae81ff
xterm-moonfly*color14:     #85dc85
xterm-moonfly*color15:     #e2637f

A complete Xresources file is available here.