by metakirby5

metakirby5 / colorz

:art: A k-means color scheme generator.

131 Stars 6 Forks Last release: Not found MIT License 58 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:



|Sample Usage|

A k-means color scheme generator.



pip install colorz

or just move
to somewhere in your
. If you do the latter, you must install the dependencies in the following section manually.

Arch Linux:


git clone cd colorz makepkg -si


  • Python (2 or 3)
  • Pillow
  • scipy



usage: colorz [-h] [-n NUM_COLORS] [--minv MINV] [--maxv MAXV] [--bold BOLD] [--font-size FONT_SIZE] [--bg-color BG_COLOR] [--no-bg-img] [--no-preview] image

A color scheme generator. Takes an image (local or online) and grabs the most dominant colors using kmeans. Also creates bold colors by adding value to the dominant colors. Finally, outputs the colors to stdout (one normal and one bold per line, space delimited) and generates an HTML preview of the color scheme.

positional arguments: image the image file or url to generate from.

optional arguments: -h, --help show this help message and exit -n NUMCOLORS number of colors to generate (excluding bold). Default: 6 --minv MINV minimum value for the colors. Default: 170 --maxv MAXV maximum value for the colors. Default: 200 --bold BOLD how much value to add for bold colors. Default: 50 --font-size FONTSIZE what font size to use, in rem. Default: 1 --bg-color BG_COLOR what background color to use, in hex format. Default: #272727 --no-bg-img whether or not to use a background image in the preview. Default: background image on --no-preview whether or not to generate and show the preview. Default: preview on

Thanks to


.. |Sample Usage| image:: :target: colorz.png :alt: Color preview.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.