alexwlchan / dominant_colours

A CLI tool to find the dominant colours in an image 🎨
https://dominant-colours.glitch.me
MIT License
91 stars 4 forks source link

16 colour generation for terminal theming purposes + more #26

Closed Aadniz closed 8 months ago

Aadniz commented 9 months ago

I have been looking for an alternative to applications like pywal.

This PR serves to be able to get out the 16 colours sorted correctly from black, red, green, yellow etc given an image based on the colour distance of the generated colours from kmeans_colors.

By using --terminal-colours argument, it will perform this sorting. Here is an example using the lighthouse.jpg:

image

Here you can see the blackest colour it found was #120a0b and thus set as the first one, then the closest to dark red is #721d2a, closest to dark green #5a5a2f etc.


Additionally to this, I added some few other nice optional arguments, the --random-seed and --seed <SEED>, these and terminal-colours tests made to them.

Aadniz commented 8 months ago

This is a feature, and may not align with this repo's simple and well done structure.