A program that extracts colors from an image, modifies them, and inserts the selected colors into other files.
git clone https://github.com/SAANN3/color-replacer
cd color-replacer
cargo build --releaseThe built binary will be located in target/release/color-replacer
- Enter the absolute path to the image you want to use, then press Continue.
- On the second page, choose which colors to assign to each key (primary, secondary, tertiary).
- Adjust colors by pressing +(or =) to lighten the selected color and - to darken.
- When you are ready, press replace button.
Pass --cli flag for cli mode and --image, which will be used. unlike the tui, you can't select or modify colors (Will be fixed in future! (ᵕ—ᴗ—))
color-replacer -c -i /path/to/imageAt first start it will create a config file (or you can create it manually) in ~/.config/colors_replacer/config.json. Then you put in it files that will be modified
{
"warning": {
"first_time": false, // <-- set it to false to continue
"text": "Set first_time to false in order to continue!"
},
"files": [ // array of files that will be processed
{
"from": "/absolute/path/from", // file that contains keys, which will be replaced
"to": "/absolute/path/to" // file that will be created|modified as output
}
]
}for example, 'from' file
my_first_color = $[primary]
my_second_color = $[secondary]
third = $[tertiary]
$[primary]|$[secondary]|$[tertiary]
and output, file 'to'
my_first_color = #FFFFEA
my_second_color = #D79475
third = #B6AADE
#FFFFEA|#D79475|#B6AADE
-p, --path-cfg <PATH_CFG> Custom path to config file
-c, --cli Enables cli mode
-i, --image <IMAGE> Path to image that will be used in cli mode or opened in tui
-s, --silence Silence all output in cli mode
-h, --help Print help
-V, --version Print version
Note that cli mode requires image param to work
Copyright (c) SAANN3 95036865+SAANN3@users.noreply.github.com
This project is licensed under the MIT license (LICENSE or http://opensource.org/licenses/MIT)
