Show HN: Swatchify – CLI to get a color palette from an image
13 days ago
- #command-line-tool
- #image-processing
- #color-extraction
- Install Swatchify via `go install` or `brew` for extracting dominant colors from images.
- Supports command-line usage with options like number of colors, JSON output, and PNG palette generation.
- Can exclude white, black, or similar colors and control minimum contrast between colors.
- Run as an HTTP server to POST images and receive JSON color data, with CORS enabled.
- Import as a Go package with functions like `ExtractFromFile()`, `ExtractFromImage()`, and `GeneratePalette()`.
- Features sub-300ms processing, automatic image downscaling, and advanced clustering for accurate color extraction.
- Generates machine-readable output with hex values and percentage weights.
- Create visual palettes with proportional color blocks and hex labels.
- Single binary support for macOS, Linux, and Windows, including ARM64.
- Server mode allows API access for color extraction with customizable options.