catppuccingo

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2025 License: MIT Imports: 2 Imported by: 20

README ΒΆ

Logo
Catppuccin for Go

Catppuccin Variants

Usage

  1. Run go get github.com/catppuccin/go.
  2. Add import catppuccin "github.com/catppuccin/go" to your file.
  3. Refer to the pkg.go.dev documentation and _examples/main.go for usage.

Contributing

This repository uses Whiskers to generate the Go flavor files.

Ensure whiskers and go are in your $PATH, and run:

go generate ./...

πŸ’ Thanks to

Β 

Copyright Β© 2021-present Catppuccin Org

Documentation ΒΆ

Index ΒΆ

Constants ΒΆ

This section is empty.

Variables ΒΆ

This section is empty.

Functions ΒΆ

This section is empty.

Types ΒΆ

type Color ΒΆ

type Color struct {
	Hex string
	RGB [3]uint8
	HSL [3]float32
}

Color is a color in Hex, RGB, and HSL.

func (Color) RGBA ΒΆ

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

RGBA implements color.Color

type Flavor ΒΆ added in v0.3.0

type Flavor interface {
	Rosewater() Color
	Flamingo() Color
	Pink() Color
	Mauve() Color
	Red() Color
	Maroon() Color
	Peach() Color
	Yellow() Color
	Green() Color
	Teal() Color
	Sky() Color
	Sapphire() Color
	Blue() Color
	Lavender() Color
	Text() Color
	Subtext1() Color
	Subtext0() Color
	Overlay2() Color
	Overlay1() Color
	Overlay0() Color
	Surface2() Color
	Surface1() Color
	Surface0() Color
	Crust() Color
	Mantle() Color
	Base() Color
	Name() string
}

Flavor is an interface implemented by all Catppuccin variations.

var Frappe Flavor = frappe{}

FrappΓ© flavor variant

var Latte Flavor = latte{}

Latte flavor variant

var Macchiato Flavor = macchiato{}

Macchiato flavor variant

var Mocha Flavor = mocha{}

Mocha flavor variant

type Flavour ΒΆ added in v0.2.0

type Flavour = Flavor

Theme and Flavour are type aliases of Flavor to keep compatibility with previous versions.

type Theme ΒΆ

type Theme = Flavour

Theme and Flavour are type aliases of Flavor to keep compatibility with previous versions.

func Variant ΒΆ added in v0.2.0

func Variant(flavor string) Theme

Variant returns the Theme variant by name.

Jump to

Keyboard shortcuts

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