Skip to content
Simple REST API for image color analysis
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
server add concurrency for prediction results Feb 16, 2019
.gitignore start parsing image pixels and getting colors Dec 4, 2018
Dockerfile docker prod crgo build release Jan 25, 2019 add clustering algorithm for image analysis Feb 8, 2019

Rust Color Analyzer

Simple REST API for image color analysis.

This is a first attempt at using Rust, and largely a learning experience. Please feel free to contribute and teach me a few things.


Feel free to test out the project here


  • Submit a hosted URL or file upload at upload page
  • Allows for image url submission at predict endpoint
  • Allows for form data submission at submit endpoint
  • Parses base hex colors from server/src/colors.json
  • Output ordered list of colors based on individual pixel analysis
  • Runs on GAE Flexible custom runtime
  • UI Option to predict based on middle of image (middle 50% of pixels)

Up and Running

docker build -t color_analyzer .
docker build -t color_analyzer_dev -f .
docker run -id -p 8080:8080 -v $(pwd)/server:/usr/src/app --name color color_analyzer_dev

Running test suite

docker exec -it color cargo test


docker tag color_analyzer:latest
gcloud auth configure-docker
docker push
gcloud app deploy app.yaml


  • Add K-NN approach for determining dominant color
  • Run all prediction operations asynchronously
  • Explore Luma color pixels as an options
You can’t perform that action at this time.