Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Commit Colors Test Status

See a lovely color swatch in your terminal every time you author a commit. The hexadecimal color comes from the first six characters in your commit ID. Here's what it looks like:

animated gif demonstrating commit colors

For a live demo and some background on the project, watch this 5-minute lunch-and-learn video.

Commit colors is written in Go, and is usable on Mac, Windows, and Linux.

Note: this readme contains instructions for commit-colors 2.0+. commit-colors 1.0 was written in JavaScript and distributed on npm. For instructions on that version of the project, see the v1 README.


Via Homebrew

brew tap sparkbox/commit-colors
brew install commit-colors

Via Direct Download

  1. Browse to the list of releases, and download the package that corresponds to your system (Mac, Windows or Linux).
  2. Move the executable to a location on your PATH (like /usr/local/bin, for example).
Β· Β· Β·

Once installed, you can do a quick test in the terminal:

commit-colors 123ADD5db8d67ba9621eb5d6765ffdef4c24077a

Commit Hooks Setup

Option 1: Create the hook by hand

Copy/paste the following text into a post-commit hook:

commit-colors $(git rev-parse HEAD)

In other words, put the above code in a file named post-commit at the location .git/hooks/post-commit in your git project of choice. Make sure this file is executable. If you want this hook to run on all your repos, see how to do that here.

Option 2: Use a Git Hooks manager

See this list of tools for managing git hooks.

Whatever tool you use, this is the command you'll want it to run: commit-colors $(git rev-parse HEAD)

For Maintainers


  1. Create a new tag, and push it up to Github:
git tag -a 2.0.0 -m "Version 2 release"
git push origin 2.0.0
  1. The Github Action handles the rest!


🎨 See a lovely color swatch in your terminal every time you author a commit.







No packages published