coloring

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorStack

type ColorStack struct {
	// contains filtered or unexported fields
}

func NewColorStack

func NewColorStack(entries ...ColorStackEntry) ColorStack

func (ColorStack) Debug

func (cs ColorStack) Debug(imgPath string, width, height int) error

func (ColorStack) Image added in v0.4.0

func (cs ColorStack) Image(width, height int) *image.RGBA

func (ColorStack) LinearSample

func (cs ColorStack) LinearSample(v float64) color.Color

type ColorStackEntry

type ColorStackEntry struct {
	// contains filtered or unexported fields
}

func NewColorStackEntry

func NewColorStackEntry(size, fadeLeft, fadeRight float64, color color.Color) ColorStackEntry

type WebColor added in v0.9.0

type WebColor struct {
	R byte
	G byte
	B byte
	A byte
}

Like color.RGBA but we can be serialized to JSON!

func Black added in v0.11.0

func Black() WebColor

func Blue added in v0.11.0

func Blue() WebColor

func Green added in v0.11.0

func Green() WebColor

func Red added in v0.11.0

func Red() WebColor

func White added in v0.11.0

func White() WebColor

func (WebColor) MarshalJSON added in v0.9.0

func (c WebColor) MarshalJSON() ([]byte, error)

func (WebColor) RGBA added in v0.9.0

func (c WebColor) RGBA() (r, g, b, a uint32)

func (WebColor) RGBA8 added in v0.9.0

func (c WebColor) RGBA8() color.RGBA

func (*WebColor) UnmarshalJSON added in v0.9.0

func (c *WebColor) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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