themes

package module
v1.7.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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Catppuccin = New(
	"catppuccin",
	[]*Variant{
		catppucinVariant(catppuccin.Latte),
		catppucinVariant(catppuccin.Frappe),
		catppucinVariant(catppuccin.Macchiato),
		catppucinVariant(catppuccin.Mocha),
	},
)

Catppuccin consists of 4 beautiful pastel color palettes, named flavors.

View Source
var Themes = []*Theme{
	Catppuccin,
}

Themes contains all available themes.

Functions

This section is empty.

Types

type Theme

type Theme struct {
	// Name is the name of the theme.
	Name string

	// Variants are the different styles that exists for a specific theme. These
	// are the standard styles and themes might allow you to customise them
	// further if you use them directly.
	Variants []*Variant
}

Theme represents a theme and its variants.

func ByName

func ByName(name string) (*Theme, bool)

ByName returns a theme by name.

func New

func New(name string, variants []*Variant) *Theme

New creates a New theme with the given name and variants.

func (*Theme) Variant

func (t *Theme) Variant(name string) (*Variant, bool)

VariantByName returns a variant of a theme by name.

type Variant

type Variant struct {
	// Name is the name of the flavour.
	Name string

	// Background is the background color of the flavour. This is only used while
	// rendering the example asset for the flavour.
	Background string

	// Styles are the actual styles that are used to render the log lines.
	Styles *log.Styles
}

Variant represents a single style within a theme.

Jump to

Keyboard shortcuts

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