Skip to content
Projects

marlonrichert/zcolors has 87 GitHub stars and 3 forks. GitHot measured 0 stars in 24 hours, +1 in 7 days, and +1 in 15 days. Last checked 2026-11-24 15:13 UTC. Last push 2026-08-04.

How these counts are measured

Measured star growth

in 24h
0
in 7 days
+1
in 15 days
+1
in 1 month
Collecting history

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

About

🌈 Generate a single, coherent theme for ls, git, grep, less and zsh

Developer Tools

README.md

Original

🌈 Z Colors

Tools to generate a coherent theme git, less, grep, and your Zsh prompt, completions and syntax highlighting

Also includes convienences for working with ANSI colors in general.

Do you enjoy using this software? Then please consider to become a sponsor. πŸ’

Requirements

Installation

To install, simply clone the repo:

git clone https://github.com/marlonrichert/zcolors.git

Usage

Z Colors' main usage is to generate a theme:

  1. cd into the repo.

  2. To generate the default theme, run:

    zcolors > ~/zshtheme
    

    Alternatively, to generate a custom theme based on your GNU $LS_COLORS, run:

    zcolors "$LS_COLORS" > ~/zsh_theme
    

    ⚠️ Note:

    • Your $LS_COLORS values for di, ln, so, pi, ex, bd, cd, su, sg, tw and ow need to contain 3- or 4-bit colors only. 8- and 24-bit colors are currently not supported!
    • zcolors will generate BSD $LSCOLORS for you, but you cannot pass it as input!
  3. Add to your .zshrc file:

    source zshtheme
    
  4. Close your current shell and open a new one.

Repeat these steps whenever you want to update your theme.

Additionally to configuring your theme, doing the above also exposes the following array and functions.

`$zcolor

An associative array that contains your theme values for file types di, ln, so, pi, ex, bd, cd, su, sg, tw and ow.

Example:

# $'...': string with support for `print` escape codes
# %{<esc>%}: Tell the prompt that <esc> is zero-width output.
# %{\e[m%}: Reset all colors and other highlighting.
# %~: present working dir
# %#: `%` for normal user, `#` for root
PS1=$'%{\e['$zcolor[di]$'m%}%~%{\e[m%}/ %# '

color

Converts a $color entry to ANSI and prints it.

Example usage:

color dim
print 'This text is now dim'
color none

lscolor

Prints the ANSI highlighting for a particular file type.

Example usage:

print 'The current directory is '
lscolor di
print $PWD
color none

Updating

  1. cd into the repo and run git pull.

  2. Repeat the steps under Usage.

Author and license

See the LICENSE file for more details.

Explore related projects

Loading…