https://github.com/soft/palettematch
Find similar colors from a limited palette.
https://github.com/soft/palettematch
color-management colors rust utility
Last synced: about 1 year ago
JSON representation
Find similar colors from a limited palette.
- Host: GitHub
- URL: https://github.com/soft/palettematch
- Owner: Soft
- Created: 2017-02-15T16:32:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-27T11:23:52.000Z (over 8 years ago)
- Last Synced: 2025-01-28T04:29:08.199Z (over 1 year ago)
- Topics: color-management, colors, rust, utility
- Language: Rust
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Palettematch 🌈
palettematch — Find similar colors from a limited palette. Have you ever been
in a situation where you had to find a color from a predetermined palette that
most closely resembled some other color? I know, we have all been there. Well,
you're in luck since palettematch makes finding similar colors a breeze. Color
similarity is calculated using either CIE76 or CIE94 formulas.
Let's say you have your set of available colors neatly listed in a file
`palette.txt` and you want to know which one of them resembles lime green
(`#00ff00`) the most. This is easily figured out:
echo "#00ff00" | palettematch palette.txt
## Input formats
At present, palettematch only supports #rrggbb hex triplets as its input format.
The colors are assumed to be in sRGB color space.
## Fun Things
In the scripts directory there are few fun examples of what can be achieved with
palettematch. `scripts/color-squares.sh` script produces stunning presentations
of RGB space using only ANSI escape sequences and the 256 colors supported by
xterm. `scripts/catff.sh` displays
[farbfeld](http://tools.suckless.org/farbfeld/) images in terminal. Now you can
finally replace your old and bloated image viewer with a simple Bash script!
