Awesome Go

color-extractor

CategoryImages
SubcategoryImages
Stars0

Dominant color extractor with no external dependencies

About color-extractor

Simple image color extractor written in Go with no external dependencies.

Go Reference Go Report Card Go Coverage

Demo:

https://color-extractor-demo.marekm4.com/

Blog post:

https://medium.com/@marek.michalik/c-vs-rust-vs-go-performance-analysis-945ab749056c

Usage:

package main

import (
	"fmt"
	"image"
	_ "image/jpeg"
	"os"

	"github.com/marekm4/color-extractor"
)

func main() {
	file := "Fotolia_45549559_320_480.jpg"
	imageFile, _ := os.Open(file)
	defer imageFile.Close()

	image, _, _ := image.Decode(imageFile)
	colors := color_extractor.ExtractColors(image)

	fmt.Println(colors)
}

Example image:

Image

Extracted colors:

Colors

Frequently Asked Questions

What is color-extractor?

color-extractor is a Images library for the Go programming language. Dominant color extractor with no external dependencies

How do I install color-extractor?

Install color-extractor with the Go module system using `go get marekm4/color-extractor`. Check the repository for the current installation instructions.

What category does color-extractor belong to?

color-extractor is listed under Images, specifically Images.

← Back to Images