When navigating filesystems using command-line file listing tools like ls, eza, tree, or fd, file categories and permissions are differentiated through terminal ANSI color codes configured in the LS_COLORS environment variable. By default, standard Linux distributions use primitive, high-contrast colors (such as harsh bright blue for directories and dark green for executables) that can be difficult to read on dark or solarized color themes.
Manually editing the colon-separated string of ANSI escape sequences that forms LS_COLORS is notoriously complex and fragile. vivid is an open-source command-line tool written in Rust that simplifies this entirely. With vivid, you can generate beautifully curated, accessible LS_COLORS profiles using pre-configured themes (such as Catppuccin, Nord, Solarized, and Dracula) with a single command. This guide explains how to install, configure, and automate vivid on Linux.
Why Use vivid for Terminal Color Management?
- Curated Design Themes: Includes built-in color palettes designed by typography and UI experts to ensure maximum legibility against dark and light terminal backgrounds.
- File Extension Differentiation: Automatically differentiates hundreds of file extensions (code files, multimedia, compressed archives, temporary files, documents, and database files) with distinct, harmonious shades.
- Support for 24-bit TrueColor: Fully supports truecolor (RGB) ANSI sequences alongside legacy 8-bit color modes.
- Blazing Fast Execution: Generates the color string instantaneously, adding zero detectable overhead to your shell startup time.
Installing vivid on Linux
Method 1: Using APT on Debian / Ubuntu
Recent Debian and Ubuntu releases include vivid in standard repositories or official GitHub deb releases:
# Download deb package from GitHub releases
wget https://github.com/sharkdp/vivid/releases/latest/download/vivid_0.9.0_amd64.deb
sudo dpkg -i vivid_0.9.0_amd64.deb
Method 2: Using the Cargo Toolchain
cargo install vivid
Method 3: On Arch Linux
sudo pacman -S vivid
Listing and Testing Available Themes
To inspect all pre-installed color themes available in vivid, run:
vivid themes
Popular built-in themes include:
molokai: Vibrant, high-contrast colors inspired by the classic code editor theme.nord: Elegant, cool arctic blue and pastel tones.dracula: Modern dark theme with high legibility.solarized-dark&solarized-light: Mathematically balanced contrast ratios.catppuccin-mocha: Warm, pastel colors designed for dark backgrounds.alabaster: Minimalist aesthetic highlighting only important file distinctions.
Configuring vivid in Your Shell Profile
To make your custom color scheme permanent, add the vivid generate command to your shell startup file (~/.bashrc or ~/.zshrc):
For Bash Users (~/.bashrc):
# Set custom LS_COLORS using vivid
export LS_COLORS="$(vivid generate molokai)"
For Zsh Users (~/.zshrc):
# Set custom LS_COLORS using vivid
export LS_COLORS="$(vivid generate nord)"
For Fish Users (~/.config/fish/config.fish):
# Set custom LS_COLORS using vivid
set -gx LS_COLORS (vivid generate dracula)
After saving, reload your shell configuration (e.g. source ~/.bashrc). Run ls -la or eza -la to verify that directories, symlinks, executables, and media files render in your chosen color palette.
Theme Comparison Matrix
| Theme Name | Primary Background | Visual Characteristic |
|---|---|---|
nord |
Dark | Cool blue-gray tones; low eye fatigue |
dracula |
Dark | Vibrant purple, pink, and cyan accents |
molokai |
Dark | Sharp, distinct colors for coding and dev work |
solarized-light |
Light | Warm yellow/tan base with high readability |
one-dark |
Dark | Atom-inspired balanced palette |
Creating Custom File Color Maps
If your project uses proprietary file extensions (e.g. .log2, .datafile), you can create a custom YAML file under ~/.config/vivid/filetypes.yaml to map custom extensions to specific hex colors, ensuring complete control over terminal presentation.