pal

package module
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Brush

type Brush struct {
	Rank RGBA   `json:"rank"`
	File string `json:"filename"`
	// contains filtered or unexported fields
}

func (*Brush) Image added in v0.1.6

func (br *Brush) Image() *image.Image

Get Image

type Palette

type Palette struct {
	Dirname string  `json:"bucket"`
	List    []Brush `json:"brush"`
}

func LoadPalette

func LoadPalette(src string) (*Palette, error)

func NewPalette

func NewPalette(bucket string, size int) (*Palette, error)

func (*Palette) Closest added in v0.1.8

func (p *Palette) Closest(mean color.Color) *image.Image

func (*Palette) FillPalette added in v0.1.5

func (p *Palette) FillPalette(size int) error

FillPalette

func (*Palette) Save

func (p *Palette) Save(dst string) error

type RGBA

type RGBA struct {
	R uint32 `json:"r"`
	G uint32 `json:"g"`
	B uint32 `json:"b"`
	A uint32 `json:"a"`
}

func (*RGBA) RGBA added in v0.2.0

func (rgba *RGBA) RGBA() (uint32, uint32, uint32, uint32)

Jump to

Keyboard shortcuts

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