{"repo":"james-see/swatchify","free":true,"listed":false,"github":"https://github.com/james-see/swatchify","clone":"git clone https://github.com/james-see/swatchify.git","description":"Extract dominant colors from images using k-means clustering","language":"Go","stars":72,"topics":["cli","color-palette","color-schemes","colors","image-analysis"],"license":"MIT","category":"cli-tools","readme_excerpt":"Swatchify A fast, cross-platform CLI tool that extracts dominant colors from images using k-means clustering. Installation Go Install (requires Go 1.21+) Homebrew (macOS/Linux) Download Binary Download the latest release for your platform from the Releases page. Build from Source Usage Examples Flags Flag Short Default Description ------ ------- --------- ------------- --colors -n 5 Number of dominant colors to extract --json false Output in JSON format --png Generate palette PNG at specified path --exclude-white false Exclude colors close to white --exclude-black false Exclude colors close to black --min-contrast 0 Minimum color distance between palette colors --show false Open generated palette image after creation --quality 50 Downscale quality 0-100 (higher = more accurate, slower) --width 1000 Palette image width in pixels --height 200 Palette image height in pixels Supported Formats - JPEG/JPG - PNG - WebP - GIF (first frame) - BMP - TIFF Output Formats Text (default) JSON Palette PNG Generates a horizontal color strip with blocks sized proportionally to color prevalence. Each block displays its hex code with automatic contrast text (white on dark, black on light). Performance - Target execution time: < 300ms for typical images - Memory footprint: < 100MB - Images are automatically downscaled for processing speed Run as API Server Start swatchify as an HTTP server for REST API access: Endpoints POST /extract — Extract colors from uploaded image Response: GET /health — H","default_branch":null,"files":null,"tree":[],"storefront":"/r/james-see","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/james-see/swatchify/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}