类型 Theme

API 文档由 Go 源码生成,内容为英文。

type Theme struct {
	Background          Color
	Foreground          Color
	Card                Color
	CardForeground      Color
	CardElevated        Color
	Popover             Color
	PopoverForeground   Color
	Muted               Color
	MutedForeground     Color
	Border              Color
	Hover               Color
	Input               Color
	Primary             Color
	PrimaryForeground   Color
	Secondary           Color
	SecondaryForeground Color
	Accent              Color
	AccentForeground    Color
	Ring                Color
	Success             Color
	Danger              Color
	DangerForeground    Color
	Chart               [5]Color
	Metrics             Metrics
	// Transition is the default state-change motion for controls. A zero
	// value disables animation for hand-built themes.
	Transition Motion
}

Theme contains semantic design tokens rather than runtime CSS.

构造函数

DarkTheme#

func DarkTheme() Theme

DarkTheme returns the Vega Neutral + Blue preset in dark appearance. Colors are precomputed from preset b1Z5baiCO's OKLCH tokens so native applications do not link a runtime color parser.

LightTheme#

func LightTheme() Theme

LightTheme returns the Vega Neutral + Blue preset in light appearance.