styles

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Copyright 2026 Teradata

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	CheckIcon         string = "✓"
	ErrorIcon         string = "×"
	WarningIcon       string = "⚠"
	InfoIcon          string = "ⓘ"
	HintIcon          string = "∵"
	SpinnerIcon       string = "..."
	ArrowRightIcon    string = "→"
	CenterSpinnerIcon string = "⋯"
	LoadingIcon       string = "⟳"
	DocumentIcon      string = "🖼"
	ModelIcon         string = "◇"

	// Tool call icons
	ToolPending string = "●"
	ToolSuccess string = "✓"
	ToolError   string = "×"

	BorderThin  string = "│"
	BorderThick string = "▌"

	// Todo icons
	TodoCompletedIcon string = "✓"
	TodoPendingIcon   string = "•"

	// Sidebar icons
	PatternIcon string = "◆"
)

Variables

View Source
var SelectionIgnoreIcons = []string{

	BorderThin,
	BorderThick,
}

Functions

func Alpha

func Alpha(c color.Color, alpha uint8) color.Color

Alpha returns a color with transparency

func ApplyBoldForegroundGrad

func ApplyBoldForegroundGrad(input string, color1, color2 color.Color) string

ApplyBoldForegroundGrad renders a given string with a horizontal gradient foreground.

func ApplyForegroundGrad

func ApplyForegroundGrad(input string, color1, color2 color.Color) string

ApplyForegroundGrad renders a given string with a horizontal gradient foreground.

func Darken

func Darken(c color.Color, percent float64) color.Color

Darken makes a color darker by percentage (0-100)

func ForegroundGrad

func ForegroundGrad(input string, bold bool, color1, color2 color.Color) []string

func GetChromaTheme

func GetChromaTheme() chroma.StyleEntries

func GetMarkdownRenderer

func GetMarkdownRenderer(width int) *glamour.TermRenderer

returns a glamour TermRenderer configured with the current theme

func GetPlainMarkdownRenderer

func GetPlainMarkdownRenderer(width int) *glamour.TermRenderer

returns a glamour TermRenderer with no colors (plain text with structure)

func Lighten

func Lighten(c color.Color, percent float64) color.Color

Lighten makes a color lighter by percentage (0-100)

func ParseHex

func ParseHex(hex string) color.Color

ParseHex converts hex string to color

func PlainMarkdownStyle

func PlainMarkdownStyle() ansi.StyleConfig

PlainMarkdownStyle returns a glamour style config with no colors

func SetDefaultManager

func SetDefaultManager(m *Manager)

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func DefaultManager

func DefaultManager() *Manager

func NewManager

func NewManager() *Manager

func (*Manager) Current

func (m *Manager) Current() *Theme

func (*Manager) List

func (m *Manager) List() []string

func (*Manager) Register

func (m *Manager) Register(theme *Theme)

func (*Manager) SetTheme

func (m *Manager) SetTheme(name string) error

type Styles

type Styles struct {
	Base         lipgloss.Style
	SelectedBase lipgloss.Style

	Title        lipgloss.Style
	Subtitle     lipgloss.Style
	Text         lipgloss.Style
	TextSelected lipgloss.Style
	Muted        lipgloss.Style
	Subtle       lipgloss.Style

	Success lipgloss.Style
	Error   lipgloss.Style
	Warning lipgloss.Style
	Info    lipgloss.Style

	// Markdown & Chroma
	Markdown ansi.StyleConfig

	// Inputs
	TextInput textinput.Styles
	TextArea  textarea.Styles

	// Help
	Help help.Styles

	// Diff
	Diff diffview.Style

	// FilePicker
	FilePicker filepicker.Styles
}

type Theme

type Theme struct {
	Name   string
	IsDark bool

	Primary   color.Color
	Secondary color.Color
	Tertiary  color.Color
	Accent    color.Color

	BgBase        color.Color
	BgBaseLighter color.Color
	BgSubtle      color.Color
	BgOverlay     color.Color

	FgBase      color.Color
	FgMuted     color.Color
	FgHalfMuted color.Color
	FgSubtle    color.Color
	FgSelected  color.Color

	Border      color.Color
	BorderFocus color.Color

	Success color.Color
	Error   color.Color
	Warning color.Color
	Info    color.Color

	// Colors
	// White
	White color.Color

	// Blues
	BlueLight color.Color
	BlueDark  color.Color
	Blue      color.Color

	// Yellows
	Yellow color.Color
	Citron color.Color

	// Greens
	Green      color.Color
	GreenDark  color.Color
	GreenLight color.Color

	// Reds
	Red      color.Color
	RedDark  color.Color
	RedLight color.Color
	Cherry   color.Color

	// Text selection.
	TextSelection lipgloss.Style

	// LSP and MCP status indicators.
	ItemOfflineIcon lipgloss.Style
	ItemBusyIcon    lipgloss.Style
	ItemErrorIcon   lipgloss.Style
	ItemOnlineIcon  lipgloss.Style

	// Editor: Yolo Mode.
	YoloIconFocused lipgloss.Style
	YoloIconBlurred lipgloss.Style
	YoloDotsFocused lipgloss.Style
	YoloDotsBlurred lipgloss.Style

	// oAuth Chooser.
	AuthBorderSelected   lipgloss.Style
	AuthTextSelected     lipgloss.Style
	AuthBorderUnselected lipgloss.Style
	AuthTextUnselected   lipgloss.Style
	// contains filtered or unexported fields
}

func CurrentTheme

func CurrentTheme() *Theme

func NewCharmtoneTheme

func NewCharmtoneTheme() *Theme

func (*Theme) S

func (t *Theme) S() *Styles

Jump to

Keyboard shortcuts

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