MainColor

Return the main color of the image.

Parameters

None

Return Values

Color of color.RGBA.

Examples

package main

import (
    "fmt"
    "github.com/fishtailstudio/imgo"
)

func main() {
    r, g, b, a := imgo.Load("gopher.png").
        MainColor().
        RGBA()
    fmt.Println(r, g, b, a)
}

Last updated