📖
ImGo Documentation
  • GETTING STARTED
    • Introduction
    • Coordinate Axis
    • Supported Formats
    • Update Logs
  • Usage
    • Usage Overview
    • Errors handling
  • API
    • Blur
    • Bounds
    • Canvas
    • Circle
    • Color2Hex
    • Crop
    • Ellipse
    • Extension
    • Filesize
    • Flip
    • GaussianBlur
    • Grayscale
    • Height
    • HttpHandler
    • Insert
    • Load
    • LoadFromBase64
    • LoadFromFile
    • LoadFromImage
    • LoadFromImgo
    • LoadFromPath
    • LoadFromUrl
    • Line
    • MainColor
    • Mimetype
    • Mosaic
    • PickColor
    • Pixel
    • Pixelate
    • RadiusBorder
    • Rectangle
    • Resize
    • Rotate
    • Save
    • String
    • Text
    • Thumbnail
    • ToBase64
    • ToImage
    • Width
Powered by GitBook
On this page
  • Parameters
  • Return Values
  • Examples
  1. API

PickColor

Returns the color at the specified coordinates of the image.

Parameters

Parameter
Type
Description

x

int

coordinate x axis

y

int

coordinate y axis

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").
        PickColor(50, 50).
        RGBA()
    fmt.Println(r, g, b, a)
}
PreviousMosaicNextPixel

Last updated 2 years ago