Difference between revisions of "Color schemes"

From Vifm Wiki
Jump to navigation Jump to search
Line 5: Line 5:
  
 
===Command syntax===
 
===Command syntax===
 +
From <code>$HOME/.vifm/colors/Default</code>:
 +
<nowiki>" You can edit this file by hand.
 +
" The " character at the beginning of a line comments out the line.
 +
" Blank lines are ignored.
 +
 +
" The Default color scheme is used for any directory that does not have
 +
" a specified scheme and for parts of user interface like menus. A
 +
" color scheme set for a base directory will also
 +
" be used for the sub directories.
 +
 +
" The standard ncurses colors are:
 +
" Default = -1 = None, can be used for transparency or default color
 +
" Black = 0
 +
" Red = 1
 +
" Green = 2
 +
" Yellow = 3
 +
" Blue = 4
 +
" Magenta = 5
 +
" Cyan = 6
 +
" White = 7
 +
 +
" Light versions of colors are also available (set bold attribute):
 +
" LightBlack
 +
" LightRed
 +
" LightGreen
 +
" LightYellow
 +
" LightBlue
 +
" LightMagenta
 +
" LightCyan
 +
" LightWhite
 +
 +
" Available attributes (some of them can be combined):
 +
" bold
 +
" underline
 +
" reverse or inverse
 +
" standout
 +
" none
 +
 +
" Vifm supports 256 colors you can use color numbers 0-255
 +
" (requires properly set up terminal: set your TERM environment variable
 +
" (directly or using resources) to some color terminal name (e.g.
 +
" xterm-256color) from /usr/lib/terminfo/; you can check current number
 +
" of colors in your terminal with tput colors command)
 +
 +
" highlight group cterm=attrs ctermfg=foreground_color ctermbg=background_color</nowiki>
 +
 +
 
===Hierarchy===
 
===Hierarchy===
===Color definitions===
 
  
 
==Preparing your terminal==
 
==Preparing your terminal==

Revision as of 19:57, 23 July 2014

Color scheme Files

Location

$HOME/.vifm/colors/

Command syntax

From $HOME/.vifm/colors/Default:

" You can edit this file by hand.
" The " character at the beginning of a line comments out the line.
" Blank lines are ignored.

" The Default color scheme is used for any directory that does not have
" a specified scheme and for parts of user interface like menus. A
" color scheme set for a base directory will also
" be used for the sub directories.

" The standard ncurses colors are:
" Default = -1 = None, can be used for transparency or default color
" Black = 0
" Red = 1
" Green = 2
" Yellow = 3
" Blue = 4
" Magenta = 5
" Cyan = 6
" White = 7

" Light versions of colors are also available (set bold attribute):
" LightBlack
" LightRed
" LightGreen
" LightYellow
" LightBlue
" LightMagenta
" LightCyan
" LightWhite

" Available attributes (some of them can be combined):
" bold
" underline
" reverse or inverse
" standout
" none

" Vifm supports 256 colors you can use color numbers 0-255
" (requires properly set up terminal: set your TERM environment variable
" (directly or using resources) to some color terminal name (e.g.
" xterm-256color) from /usr/lib/terminfo/; you can check current number
" of colors in your terminal with tput colors command)

" highlight group cterm=attrs ctermfg=foreground_color ctermbg=background_color


Hierarchy

Preparing your terminal

There are a variety of possibilities for how you terminal deals with color. Your terminal emulator will be capable of up a certain number of colors. Some possibilities are: 8, 8+8(bold as light colors), 16, and 256 colors. Your Terminal communicates which colors it can handle by setting the $TERM variable. This should not be set manually in .bashrc, but in your terminal's configuration. For xterm and some xterm compatible

  • light vs bold

Terminal Specific Tips

xterm

Permanently Applying Color schemes

colorscheme Default

Per-directory schemes.

User Color schemes

Tips for Customizing

Add Your Custom Colors schemes Here

Include:

  • Terminal Specifications/Pallet
  • vifm Color scheme commands

Example Color scheme:

$HOME/.Xresources:

! Common
#define S_yellow #b58900
#define S_orange #cb4b16
#define S_red #dc322f
#define S_magenta #d33682
#define S_violet #6c71c4
#define S_blue #268bd2
#define S_cyan #2aa198
#define S_green #859900

! Dark
#define S_base03 #002b36
#define S_base02 #073642
#define S_base01 #586e75
#define S_base00 #657b83
#define S_base0 #839496
#define S_base1 #93a1a1
#define S_base2 #eee8d5
#define S_base3 #fdf6e3

! Light

! #define S_base03 #fdf6e3
! #define S_base02 #eee8d5
! #define S_base01 #93a1a1
! #define S_base00 #839496
! #define S_base0 #657b83
! #define S_base1 #586e75
! #define S_base2 #073642
! #define S_base3 #002b36

$HOME/.vifm/colors/solarized-16color:

" colorscheme: solarized-16color
" Version: 1.0
" Author: Stéphane (a.k.a. istib)
" Edited by: y2kbugger 18JUL2014
" Now with all 16 colors in solarized pallet + bold
"  support. Tweaked to adhere more strictly to
"  solarized usage guidelines. Can be used in Light
"  or Dark mode.
"  see http://ethanschoonover.com/solarized#usage-development
" map colors from solarized scheme to ncurses:
" ------------------------------------------
"             ncurses/            CIELAB
" solarized   terminal       ##   lightness   
" ------------------------------------------
" NA          default/none   -1    NA

" base03      lightblack     08    15     
" base02      black          00    20     
" base01      lightgreen     10    45     
" base00      lightyellow    11    50     
" base0       lightblue      12    60     
" base1       lightcyan      14    65     
" base2       white          07    92     
" base3       lightwhite     15    97     

" yellow      yellow         03    60     
" orange      lightred       09    50     
" red         red            01    50     
" magenta     magenta        05    50     
" violet      lightmagenta   13    50     
" blue        blue           04    55     
" cyan        cyan           06    60     
" green       green          02    60     

highlight Win           ctermfg=12 ctermbg=08 cterm=none

highlight TopLine       ctermfg=04 ctermbg=08 cterm=none
highlight TopLineSel    ctermfg=04 ctermbg=00 cterm=none
highlight StatusLine    ctermfg=04 ctermbg=00 cterm=none
highlight Border        ctermfg=04 ctermbg=00 cterm=none

highlight Selected      ctermfg=-1 ctermbg=00 cterm=none
highlight CurrLine      ctermfg=-1 ctermbg=-1 cterm=standout

highlight WildMenu      ctermfg=07 ctermbg=-1 cterm=underline
highlight CmdLine       ctermfg=14 ctermbg=-1 cterm=none
highlight ErrorMsg      ctermfg=01 ctermbg=00 cterm=none

highlight Directory     ctermfg=12 ctermbg=-1 cterm=bold
highlight Link          ctermfg=03 ctermbg=-1 cterm=none
highlight BrokenLink    ctermfg=01 ctermbg=-1 cterm=none
highlight Socket        ctermfg=05 ctermbg=-1 cterm=none
highlight Device        ctermfg=01 ctermbg=-1 cterm=none
highlight Fifo          ctermfg=06 ctermbg=-1 cterm=none
highlight Executable    ctermfg=02 ctermbg=-1 cterm=none

Troubleshooting