theme

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map struct {
	Keys []string
	Data map[string]string
	// contains filtered or unexported fields
}

func (*Map) Get

func (m *Map) Get(key string) string

func (*Map) UnmarshalJSON

func (m *Map) UnmarshalJSON(data []byte) error

type Rule

type Rule struct {
	Name                string `json:"name"`
	Scope               string `json:"scope"`
	FontStyle           string `json:"font_style"`
	Foreground          string `json:"foreground"`
	Background          string `json:"background"`
	SelectionForeground string `json:"selection_foreground"`
	// contains filtered or unexported fields
}

func (*Rule) GetBackground

func (r *Rule) GetBackground() string

GetBackground evaluates variables and colors in rule and returns final value

func (*Rule) GetFontStyle

func (r *Rule) GetFontStyle() string

GetFontStyle evaluates variables and colors in rule and returns final value

func (*Rule) GetForeground

func (r *Rule) GetForeground() string

GetForeground evaluates variables and colors in rule and returns final value

func (*Rule) GetSelectionForeground

func (r *Rule) GetSelectionForeground() string

GetSelectionForeground evaluates variables and colors in rule and returns final value

type Theme

type Theme struct {
	Name      string            `json:"name"`
	Author    string            `json:"author"`
	Variables map[string]string `json:"variables"`
	Globals   Map               `json:"globals"`
	Rules     []*Rule           `json:"rules"`
}

func Read

func Read(file string) (*Theme, error)

Read reads and parses JSON-encoded .sublime-color-scheme file

Jump to

Keyboard shortcuts

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