theme

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = Colors{
	BgDark:        "#161622",
	BgDarker:      "#11111a",
	Text:          "#FFFFFF",
	TextDark:      "#676985",
	Color1:        "#c29fec",
	Color2:        "#ddbec0",
	Color3:        "#89b4fa",
	Color4:        "#e06c75",
	Color5:        "#98c379",
	Color6:        "#fab387",
	Color7:        "#f1c1e4",
	MarkdownStyle: glamour.DraculaStyleConfig,
}

Default is the default colorscheme

Functions

This section is empty.

Types

type Colors

type Colors struct {
	MarkdownStyle ansi.StyleConfig `json:"-"` // Just generate this at runtime
	Color2        lipgloss.Color   `json:"color2"`
	BgDarker      lipgloss.Color   `json:"bg_darker"`
	Text          lipgloss.Color   `json:"text"`
	TextDark      lipgloss.Color   `json:"text_dark"`
	Color1        lipgloss.Color   `json:"color1"`
	FilePath      string           `json:"-"`
	Color3        lipgloss.Color   `json:"color3"`
	Color4        lipgloss.Color   `json:"color4"`
	Color5        lipgloss.Color   `json:"color5"`
	Color6        lipgloss.Color   `json:"color6"`
	Color7        lipgloss.Color   `json:"color7"`
	BgDark        lipgloss.Color   `json:"bg_dark"`
}

Colors is a struct that contains all the colors for the application

func New

func New(path string) (*Colors, error)

New will create a new colorscheme and try to load it

func (*Colors) Convert

func (c *Colors) Convert(pywalFilePath string) error

Convert takes the information from a pywal file and converts it to a colorscheme

func (*Colors) Load

func (c *Colors) Load() error

Load will load the colorscheme from a JSON file

func (Colors) PrettyPrint

func (c Colors) PrettyPrint() string

PrettyPrint displays the colorscheme in the terminal

func (Colors) Save

func (c Colors) Save() error

Save saves the colorscheme to a JSON file

Jump to

Keyboard shortcuts

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