catppuccingo

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 2 Imported by: 4

README

Logo
Catppuccin for Go

Catppuccin Variants

Usage

  1. go get github.com/catppuccin/go
  2. Add animport catppuccin "github.com/catppuccin/go" to your file
  3. Use the flavours as you wish.

🙋 FAQ (optional)

💝 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]uint32
	HSL [3]float32
}

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

func (Color) RGBA

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

RGBA implements color.Color

type Flavour added in v0.2.0

type Flavour 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
}

Flavour is an interface implemented by all Catppuccin variations.

var Frappe Flavour = frappe{}

Frappe flavour variant.

var Latte Flavour = latte{}

Latte flavour variant.

var Macchiato Flavour = macchiato{}

Macchiato flavour variant.

var Mocha Flavour = mocha{}

Mocha flavour variant.

type Theme

type Theme = Flavour

Theme is a type alias of Flavour to keep compatibility with previous versions.

func Variant added in v0.2.0

func Variant(flavour 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