worktreecolor

package
v1.45.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CuratedNames

func CuratedNames() []string

CuratedNames returns a copy of the curated colour names.

func IsCuratedValue

func IsCuratedValue(s string) bool

IsCuratedValue reports whether the value can be selected directly from the picker.

func IsValid

func IsValid(s string) bool

IsValid reports whether the value is a supported non-empty worktree colour.

func Normalize

func Normalize(s string) string

Normalize trims a stored colour string and treats "none" as empty.

func Resolve

func Resolve(s string) color.Color

Resolve converts a stored colour string (hex, 256 index, or supported name) to a color.Color. It returns nil for empty, "none", or invalid values.

Types

type CuratedColor

type CuratedColor struct {
	Name        string
	Description string
}

CuratedColor pairs a colour name with a human-readable description.

func CuratedColors

func CuratedColors() []CuratedColor

CuratedColors returns a copy of the curated colours shown in the picker.

Jump to

Keyboard shortcuts

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