gradient

package module
v0.0.0-...-9a6e2e9 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: MIT Imports: 5 Imported by: 0

README

gradient-string

Generate gradient strings. Won't recommend to use it for production

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveANSICodes

func RemoveANSICodes(input string) string

Types

type GradientBuilder

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

func NewGradientBuilder

func NewGradientBuilder(options ...Option) *GradientBuilder

func (*GradientBuilder) Build

func (b *GradientBuilder) Build() (*GradientBuilder, error)

func (*GradientBuilder) RenderBackground

func (b *GradientBuilder) RenderBackground(s string) string

func (*GradientBuilder) RenderForeground

func (b *GradientBuilder) RenderForeground(s string) string

type GradientDirection

type GradientDirection int
const (
	Horizontal GradientDirection = iota
	Vertical
)

type Option

type Option func(*GradientBuilder)

func WithColors

func WithColors(colors ...color.Color) Option

func WithDirection

func WithDirection(direction GradientDirection) Option

func WithDomain

func WithDomain(domain ...float64) Option

func WithHTMLColors

func WithHTMLColors(colors ...string) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳