package theme import "sort" // The gruvbox palettes, in the author's original names. Dark uses the bright // variants and light the faded ones, which is what keeps each readable against // its own background. const ( darkBg0 = "#282828" darkFg1 = "#ebdbb2" darkGray = "#928374" darkRed = "#fb4934" darkGrn = "#b8bb26" darkYel = "#fabd2f" darkBlu = "#83a598" darkAqua = "#8ec07c" darkOrng = "#fe8019" lightBg0 = "#fbf1c7" lightFg1 = "#3c3836" lightFg4 = "#7c6f64" lightRed = "#9d0006" lightGrn = "#79740e" lightYel = "#b57614" lightBlu = "#076678" lightAqua = "#427b58" lightOrng = "#af3a03" ) // GruvboxDark is the default scheme. It assumes a dark terminal background: // themes colour foregrounds only, so the terminal supplies the canvas. var GruvboxDark = Theme{ Name: "gruvbox-dark", Primary: darkBlu, OnPrimary: darkBg0, Text: darkFg1, Muted: darkGray, Accent: darkOrng, Firing: darkRed, Resolved: darkGrn, Error: darkRed, SevCritical: darkRed, SevError: darkOrng, SevWarning: darkYel, SevInfo: darkAqua, } // GruvboxLight is the same scheme against a light terminal background. var GruvboxLight = Theme{ Name: "gruvbox-light", Primary: lightBlu, OnPrimary: lightBg0, Text: lightFg1, Muted: lightFg4, Accent: lightOrng, Firing: lightRed, Resolved: lightGrn, Error: lightRed, SevCritical: lightRed, SevError: lightOrng, SevWarning: lightYel, SevInfo: lightAqua, } // Default is the theme used when the config names none. var Default = GruvboxDark var builtins = map[string]Theme{ GruvboxDark.Name: GruvboxDark, GruvboxLight.Name: GruvboxLight, } // BuiltinNames lists the compiled-in themes, sorted, for error messages and // documentation. func BuiltinNames() []string { names := make([]string, 0, len(builtins)) for name := range builtins { names = append(names, name) } sort.Strings(names) return names }