theme

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Names

func Names() []string

Names ...

Types

type Theme

type Theme struct {
	Source          []color.FgBgTuple               `yaml:"source"`
	Timestamp       color.FgBgTuple                 `yaml:"timestamp"`
	Application     color.FgBgTuple                 `yaml:"application"`
	Context         color.FgBgTuple                 `yaml:"context"`
	Entity          color.FgBgTuple                 `yaml:"entity"`
	ActionDelimiter color.FgBgTuple                 `yaml:"action_delimiter"`
	Action          color.FgBgTuple                 `yaml:"action"`
	LineDelimiter   color.FgBgTuple                 `yaml:"line_delimiter"`
	Line            color.FgBgTuple                 `yaml:"line"`
	Level           map[level.Level]color.FgBgTuple `yaml:"level"`
	Message         map[level.Level]color.FgBgTuple `yaml:"message"`
}

Theme ...

func GenerateTheme

func GenerateTheme(colorName string) (*Theme, error)

GenerateTheme ...

func (*Theme) AsHexPair

func (theme *Theme) AsHexPair(consistentColors bool, src source.Source) color.FgBgTuple

AsHexPair returns a color for a source. When consistentColors is true, sources will get the same color across invocations of the application. Otherwise, the color selection randomized for each run.

func (*Theme) AsPrettyJSONStyle

func (theme *Theme) AsPrettyJSONStyle() *pretty.Style

AsPrettyJSONStyle ...

Jump to

Keyboard shortcuts

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