Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

go.withmatt.com/themes

Package Overview
Dependencies
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

go.withmatt.com/themes

Go Modules
Version
v0.0.0-20260525104105-c707f918d8a7
Version published
Created
Source

go-themes

Terminal color schemes from iTerm2-Color-Schemes packaged as Go structs. Includes 450+ themes like Dracula, Nord, Gruvbox, Monokai, etc.

Themes are generated at build time and compiled into your binary, so there's no runtime parsing overhead. Colors are provided as hex strings that work directly with Lipgloss and most TUI libraries.

Installation

go get go.withmatt.com/themes

Usage

theme, err := themes.GetTheme("Dracula")
if err != nil {
    log.Fatal(err)
}

fmt.Println(theme.Foreground)  // #f8f8f2
fmt.Println(theme.Background)  // #282a36

With Lipgloss:

theme, _ := themes.GetTheme("Nord")

style := lipgloss.NewStyle().
    Foreground(lipgloss.Color(theme.Foreground)).
    Background(lipgloss.Color(theme.Background))

fmt.Println(style.Render("Hello, Nord!"))

List all themes:

for _, name := range themes.ListThemes() {
    fmt.Println(name)
}

API

// Get a theme by name (case-insensitive)
func GetTheme(name string) (*Theme, error)

// List all theme names
func ListThemes() []string

// Get all themes as a map
func GetAllThemes() map[string]*Theme

The Theme struct contains Foreground, Background, Cursor, and all 16 ANSI colors (Black, Red, Green, Yellow, Blue, Magenta, Cyan, White, and their Bright* variants). All colors are lowercase hex strings like #282a36.

Updating

To regenerate themes from the latest upstream:

go generate ./...

This clones iTerm2-Color-Schemes, parses the JSON files, and generates generated_themes.go.

License

MIT License. Color schemes are from iTerm2-Color-Schemes by @mbadolato, also MIT licensed.

FAQs

Package last updated on 25 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts