Skip to content

Commit bf97b56

Browse files
committed
Update README with information of CLI
Fixes #15
1 parent 42bbf7c commit bf97b56

File tree

1 file changed

+56
-5
lines changed

1 file changed

+56
-5
lines changed

README.md

Lines changed: 56 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,63 @@
11
# 🎨 Pigmnts
2-
Pigmnts is a color palette creator from image built using Rust. It uses the [K-means++](https://en.wikipedia.org/wiki/K-means%2B%2B) clustering algorithm to select the most commonly occuring colors from the image.
2+
Pigmnts is a color palette creator from an image built using Rust. It uses the [K-means++](https://en.wikipedia.org/wiki/K-means%2B%2B) clustering algorithm to select the most commonly occurring colors from the image.
33

4-
Pigmnts library is compiled to WebAssembly which allows for super-fast color palette extraction from an image on the web.
4+
**Pigmnts library** is compiled to WebAssembly which allows for super-fast color palette extraction from an image on the web.
55
The library can be found in the `lib` directory.
66

7-
## Project Structure
8-
The development of the Pigmnts library is in the `lib` directory.
9-
The root project is a Cargo workspace that uses the Pigmnts library to build a CLI.
7+
## Pigmnts CLI
8+
Pigmnts CLI is a tool designed to create color palettes from an image right on your terminal. It supports various image formats like `JPEG`, `PNG`, `GIF`, `WebP`, `TIFF` along with external HTTP(S) image URLs. It provides a beautiful terminal output to preview the colors in the palette.
9+
10+
Pigmnts CLI comes with various output modes and provides on-demand data of the palette generated while maintaining high speeds.
11+
12+
### Output modes
13+
14+
#### Default mode
15+
The default mode displays the palette in a user-friendly way with a small preview and corresponding color codes in a tabular structure. This is meant for the common use of the CLI.
16+
17+
![](https://user-images.githubusercontent.com/21107799/77250424-f112d600-6c6d-11ea-82ef-4ebb32d86ee0.png)
18+
19+
### Quiet (or Silent) mode
20+
This mode displays only the essential output without the intermediate logs. The output is in plain text format with each data item separated by `:`. This is meant for use in a pipeline where the output of the CLI is used as input for another process. It can be activated by the `-q or --quiet` flag.
21+
22+
![](https://user-images.githubusercontent.com/21107799/77250518-801fee00-6c6e-11ea-9086-b077447fd4d1.png)
23+
24+
25+
### Flags and options in the CLI
26+
The following flags and options are supported by the latest release of the CLI.
27+
```
28+
FLAGS:
29+
-d, --dominance Enable dominance percentage of colors
30+
-h, --help Prints help information
31+
-x, --hex Enable Hex code output of colors
32+
-s, --hsl Enable HSL output of colors
33+
-l, --lab Enable L*AB output of colors
34+
-q, --quiet Suppress the normal output [aliases: silent]
35+
-r, --rgb Enable RGB output of colors
36+
-V, --version Prints version information
37+
38+
OPTIONS:
39+
-c, --count <COUNT>... Number of colors in the palette
40+
```
41+
42+
#### Examples of these flags
43+
44+
- `pigmnts pic-1.jpg -c 5 pic-2.jpg -c 8`
45+
Generate a palette of 5 colors from pic-1.jpg and 8 colors from pic-2.jpg.
46+
47+
- `pigmnts pic-1.jpg -rxdl`
48+
Generate a palette of 5 colors from pic-1.jpg and show the RGB code, hex code, dominance, LAB code for each color in the palette.
49+
50+
- `pigmnts pic-1.jpg pic-2.jpg -sxq`
51+
Generate a palette of 5 colors from pic-1.jpg and pic-2.jpg. For each color in the palette show the HSL code, hex code in `quiet` mode.
52+
53+
54+
## Contributing
55+
This repository is a Cargo workspace that includes the development of both core Pigmnts library and the CLI.
56+
57+
### Project Structure
58+
- **Pigmnts Library** - development of the core library is in the `lib` directory.
59+
- **Pigmnts CLI** - root project is Pigmnts CLI that uses the Pigmnts library.
60+
1061

1162
## License
1263
Pigmnts is [MIT Licensed](https://github.com/blenderskool/pigmnts/blob/master/LICENSE.md)

0 commit comments

Comments
 (0)