palette

package
v0.0.0-...-c730260 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Basic

type Basic struct {
	common.Seeder

	// Effects provides options to SelectEffect
	// Effect spans are not set by the Basic Palette
	Effects []common.Effect
	// Painters provides options to SelectBender
	Painters []common.Painter
	// Benders provides options to SelectBender
	Benders []common.Bender
	// Shifters provides options to SelectShifter
	Shifters []common.Shifter

	// Colors provides options to SelectColor
	Colors []color.Color
	// Durations provides options to SelectDuration
	// Should generally range from 0.1s to 10s
	Durations []time.Duration
}

Basic will randomly choose from the possible options provided when the relevant resource is requested from any functions outlined by common.Palette

func NewRandom

func NewRandom(s common.Seeder) *Basic

NewRandom Provides a Palette which selects from all possible colors, effects, etc.

func (*Basic) SelectBender

func (v *Basic) SelectBender() common.Bender

SelectBender returns a Bender

func (*Basic) SelectColor

func (v *Basic) SelectColor() color.Color

SelectColor returns a Color

func (*Basic) SelectDuration

func (v *Basic) SelectDuration() time.Duration

SelectDuration returns a Duration

func (*Basic) SelectEffect

func (v *Basic) SelectEffect() common.Effect

SelectEffect returns a Effect

func (*Basic) SelectPainter

func (v *Basic) SelectPainter() common.Painter

SelectPainter returns a Painter

func (*Basic) SelectShifterHue

func (v *Basic) SelectShifterHue() common.Shifter

SelectShifterHue returns a Shifter which is aimed to shift hues

func (*Basic) SelectShifterLightness

func (v *Basic) SelectShifterLightness() common.Shifter

SelectShifterLightness returns a Shifter which is aimed to shift lightness

func (*Basic) SelectShifterSaturation

func (v *Basic) SelectShifterSaturation() common.Shifter

SelectShifterSaturation returns a Shifter which is aimed to shift saturation

Jump to

Keyboard shortcuts

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