color

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dump

func Dump(out io.Writer)

Dump ...

func FindApproximateColorCode

func FindApproximateColorCode(r, g, b uint32) int

FindApproximateColorCode ...

func GetCodeByRGBA

func GetCodeByRGBA(r, g, b, a uint32) int

GetCodeByRGBA ...

func RGB2Hex

func RGB2Hex(r, g, b uint32) uint32

RGB2Hex ...

Types

type AverageColorPicker

type AverageColorPicker struct{}

AverageColorPicker picks average color of given RectAngle area of src image.

func (AverageColorPicker) Pick

func (picker AverageColorPicker) Pick(src image.Image, cell image.Rectangle) (r, g, b, a uint32)

Pick of AverageColorPicker.

type CenterColorPicker

type CenterColorPicker struct{}

CenterColorPicker picks the very central point's color of given RectAngle area of src image.

func (CenterColorPicker) Pick

func (picker CenterColorPicker) Pick(src image.Image, cell image.Rectangle) (r, g, b, a uint32)

Pick of CenterColorPicker.

type HorizontalAverageColorPicker

type HorizontalAverageColorPicker struct{}

HorizontalAverageColorPicker picks horizontal-average color of center of given RectAngle area of src image.

func (HorizontalAverageColorPicker) Pick

func (picker HorizontalAverageColorPicker) Pick(src image.Image, cell image.Rectangle) (r, g, b, a uint32)

Pick of HorizontalAverageColorPicker.

type LeftTopColorPicker

type LeftTopColorPicker struct{}

LeftTopColorPicker picks color of left top (inital point) of given RectAngle of src image.

func (LeftTopColorPicker) Pick

func (picker LeftTopColorPicker) Pick(src image.Image, cell image.Rectangle) (r, g, b, a uint32)

Pick of LeftTopColorPicker.

type Picker

type Picker interface {
	Pick(image.Image, image.Rectangle) (r, g, b, a uint32)
}

Picker ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL