Palgen

Palgen is a lightweight color palette generator for linux. You can find the source on my codeburg repo.

To show off palgen's color palette capabilities, why don't we use it to generate a color palette to use for the rest of this page using the following image?

Palgen can generate any size color palette in about half a second on average. You can also change how many threads to use to speed up generation on large images or for larger palettes.

To generate a palette, palgen uses lloyd's algorithm to segment colors into K clusters, where K is the color palette size supplied by the user. Turns out generating a color palette is a form of the K-Mean clustering problem, which is why we can use lloyd's algorithm: for more information feel free to checkout the README.md on the repo.

Palgen is still in developlemt, I am planning on adding options to generate a good background color to patch the palette, add more color palette generation algorithms, and have a library developers can link against to generate palettes in their projects.