marlonrichert/zcolors
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.
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 ToolsREADME.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
- For completion highlighting: Zsh's "new" completion system.
- For command line highlighting:
zsh-syntax-highlighting.
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:
cdinto the repo.To generate the default theme, run:
zcolors > ~/zshthemeAlternatively, to generate a custom theme based on your GNU
$LS_COLORS, run:zcolors "$LS_COLORS" > ~/zsh_themeβ οΈ Note:
- Your
$LS_COLORSvalues fordi,ln,so,pi,ex,bd,cd,su,sg,twandowneed to contain 3- or 4-bit colors only. 8- and 24-bit colors are currently not supported! zcolorswill generate BSD$LSCOLORSfor you, but you cannot pass it as input!
- Your
Add to your
.zshrcfile:source zshthemeClose 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
cdinto the repo and rungit pull.Repeat the steps under Usage.
Author and license
See the LICENSE file for more details.
Explore related projects
Loadingβ¦