Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vannrr/color-schemorator
Color Schemorator is a tool that adjusts the color palette of an image based on a provided list of hex color codes.
https://github.com/vannrr/color-schemorator
cli color-palette color-scheme command-line go golang hex-colors image-manipulation image-processing
Last synced: 27 days ago
JSON representation
Color Schemorator is a tool that adjusts the color palette of an image based on a provided list of hex color codes.
- Host: GitHub
- URL: https://github.com/vannrr/color-schemorator
- Owner: VannRR
- License: mit
- Created: 2024-08-30T23:17:21.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-15T21:43:37.000Z (3 months ago)
- Last Synced: 2024-09-15T23:25:01.712Z (3 months ago)
- Topics: cli, color-palette, color-scheme, command-line, go, golang, hex-colors, image-manipulation, image-processing
- Language: Go
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Color Schemorator
```
Usage:
csor -m generate -p -i -o
csor -m extract -i -P
csor -v
csor -hDescription:
Color Schemorator modifies an image's color palette based on a given list
of hex color codes (file can have '//' comments) or extracts the color
palette from an image.- Generate mode: Creates a new image by replacing its colors with the
closest matches from the specified palette.
- Extract mode: Extracts the color palette from an image (in order of
occurrence) and saves it to a file.Arguments:
-m Mode of operation: 'generate' or 'extract'.
-p Path to the plain text file containing hex color codes, one per line
(required for 'generate' mode).
-i Path to the input image file (supported formats: jpg, jpeg, png).
-o Path to the output image file (supported formats: jpg, jpeg, png)
(required for 'generate' mode).
-P Path to the output palette file (required for 'extract' mode).
-v Display the version of the Color Schemorator tool.
-h Display this help message.Example:
csor -m generate -p colors.txt -i original-image.jpg -o new-image.jpg
csor -m extract -i original-image.jpg -P palette.txt
```## Install
To install the Color Schemorator application,
follow these steps (note `go` and `make` need to be installed first):1) Clone the repository:
```
git clone https://github.com/vannrr/color-schemorator.git
cd color-schemorator
```2) Build and install:
```
make install
```
By default, the application will be installed to ~/bin/.
If you wish to change the installation directory,
you can modify the INSTALL_DIR variable in the Makefile:
```
INSTALL_DIR := /your/custom/path/
```
3) Verify the installation:
```
~/bin/csor -v
```
Replace ~/bin/ with your custom path if you changed the INSTALL_DIR.## Example Images
| Before | After |
|--------|-------|
| | |## License
This project is licensed under the MIT License. See the LICENSE file for details.