A simple Go API to get most common colors from an image. Basic view is available to try at https://bentinata.com/palette.
You need to install gin
first.
go get -u github.com/gin-gonic/gin
Run it right away, like:
go run *.go
Or build it first, then execute:
go build && ./go-palette
Server will be available on port 5000.
The actual product is an HTTP API, available at POST /image
.
curl -F file=@/path/to/your/image 127.0.0.1:5000/image
This will return a response like:
{
"data": [
"#282a29",
"#ec1d25",
"#4b6688",
"#f1f1f4"
]
}