sources

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: GPL-3.0 Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultColors added in v0.9.1

func DefaultColors() []string

Types

type ColorPallet added in v0.9.1

type ColorPallet struct {
	// Base color, to be used as background
	Base color.Color
	// Text color, contract from base
	Text color.Color
	// Shadow color, complementary from base
	Shadow color.Color
}

Color Pallet.

type Colors added in v0.9.1

type Colors []string

Colors collection.

func (Colors) Random added in v0.9.1

func (cl Colors) Random() color.Color

Random color.

func (Colors) RandomPallet added in v0.9.1

func (cl Colors) RandomPallet() ColorPallet

RandomPallet.

type Sources

type Sources struct {
	Footer string `fig:"footer" yaml:"footer" default:"sources/footer.png"`
	Fonts  string `fig:"fonts" yaml:"fonts" default:"sources/fonts"`
	Covers string `fig:"covers" yaml:"covers" default:"sources/covers"`
	Colors Colors `fig:"colors" yaml:"colors"`
}

func (Sources) GetFooter

func (s Sources) GetFooter() (image.Image, error)

func (Sources) ListCovers

func (s Sources) ListCovers() ([]string, error)

func (Sources) ListFonts

func (s Sources) ListFonts() ([]string, error)

func (Sources) OpenRandomCover

func (s Sources) OpenRandomCover() (image.Image, error)

func (Sources) OpenRandomFont

func (s Sources) OpenRandomFont() (*truetype.Font, error)

func (Sources) RandomColorPallet added in v0.9.1

func (s Sources) RandomColorPallet() ColorPallet

func (Sources) RandomCover

func (s Sources) RandomCover() (string, error)

func (Sources) RandomFont

func (s Sources) RandomFont() (string, error)

Jump to

Keyboard shortcuts

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