vivid is a generator for the LS_COLORS
environment variable that controls the colorized output of
ls
, tree
,
fd
, bfs
, dust
and many other tools.
It uses a YAML configuration format for the filetype-database
and the color themes. In contrast to
dircolors
,
the database and the themes are organized in different files. This allows users to
choose and customize color themes independent from the collection of file extensions.
Instead of using cryptic ANSI escape codes, colors can be specified in the RRGGBB
format and will be translated to either truecolor (24-bit) ANSI codes or 8-bit codes
for older terminal emulators.
| snazzy
| molokai
| ayu
|
| --- | --- | --- |
| |
|
|
| lava
|
| --- |
| |
Choose a color theme (for example: molokai
). Then, add this to your shells RC file
(~/.bashrc
, ~/.zshrc
, …):
bash
export LS_COLORS="$(vivid generate molokai)"
To try all available themes with your current directory:
bash
for theme in $(vivid themes); do
echo "Theme: $theme"
LS_COLORS=$(vivid generate $theme)
ls
echo
done
By default, vivid
runs in true color mode (24-bit). If you don't have a terminal
that supports 24-bit colors, use the --color-mode 8-bit
option when running vivid
. This will generate interpolated 8-bit colors:
bash
export LS_COLORS="$(vivid -m 8-bit generate molokai)"
Custom filetypes.yml
databases can be placed in /usr/share/vivid
, $HOME/.config/vivid
, or $XDG_CONFIG_PATH/vivid
on POSIX systems,
or in %APPDATA%\vivid
on Windows systems.
Custom color themes go into a themes
subfolder, respectively. You can also specify an explicit path to your custom theme: vivid generate path/to/my_theme.yml
.
As a starting point, you can use one of the bundled themes.
Download one of the Debian packages from the release page
and install it via dpkg -i
:
bash
wget "https://github.com/sharkdp/vivid/releases/download/v0.7.0/vivid_0.7.0_amd64.deb"
sudo dpkg -i vivid_0.7.0_amd64.deb
You can install vivid
from the official package repository:
bash
pacman -S vivid
You can install vivid
from GURU Overlay
bash
emerge vivid
You can install vivid
from the FreeBSD Ports Collection:
bash
pkg install vivid
You can install vivid
from Homebrew:
bash
brew install vivid
Note that the BSD version of ls
does not use LS_COLORS
, but you can use the GNU version of ls
instead:
bash
brew install coreutils
alias ls="gls --color"
Check out the release page for binary builds.
If you have Rust 1.54 or higher, you can install vivid
from source via cargo
:
bash
cargo install vivid
Licensed under either of
at your option.
File types: - https://en.wikipedia.org/wiki/Listoffile_formats - https://fileinfo.com/
ANSI colors: - https://jonasjacek.github.io/colors/
Similar and related projects:
LS_COLORS
themes: