PixelHue is a simple Streamlit web app that extracts a color palette from any uploaded image using K-Means clustering.
It helps designers, developers, and anyone interested in color to quickly generate a set of colors from their images.
- Upload images in various formats (JPG, PNG, JPEG, BMP, GIF, WEBP).
- Extract a customizable number of colors.
- Visualize the palette as color swatches with hex codes.
- Uses K-Means clustering for accurate color extraction.
Try it here: PixelHue
-
Clone the repository:
git clone https://github.com/j-ncel/PixelHue.git cd pixel-hue -
Install dependencies:
pip install requirements.txt
or
pip install streamlit pillow scikit-learn numpy
streamlit run main.pyOpen the provided local URL in your browser to use PixelHue.
- Click Browse files or drag a picture to select an image file.
- View the extracted palette and copy the hex codes as needed.
- Adjust the "Number of Colors" if you want to set how many colors you want in your palette.
pixel-hue/
├── main.py
├── palette_extractor.py
├── koala.png
├── requirements.txt
├── README.md
main.py— Streamlit app UI and logic.palette_extractor.py— Color extraction logic.koala.png— Default image
Pixel Hue on Playstore. The idea was remade to Android Flutter app. You can try it here:
- Koala sample picture (Image by André Santana Design André Santana from Pixabay)
- Built with Streamlit.