{"id":34803705,"url":"https://github.com/tj-smith47/gothememe","last_synced_at":"2026-05-18T13:31:06.847Z","repository":{"id":330204998,"uuid":"1111572213","full_name":"tj-smith47/gothememe","owner":"tj-smith47","description":"Go based framework agnostic theming registry for web applications","archived":false,"fork":false,"pushed_at":"2025-12-23T21:06:30.000Z","size":52871,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-25T11:12:10.087Z","etag":null,"topics":["golang","theme-generator"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/tj-smith47/gothememe","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tj-smith47.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["tj-smith47"],"buy_me_a_coffee":"tjsmith47"}},"created_at":"2025-12-07T07:58:47.000Z","updated_at":"2025-12-23T21:05:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tj-smith47/gothememe","commit_stats":null,"previous_names":["tj-smith47/gothememe"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/tj-smith47/gothememe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj-smith47%2Fgothememe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj-smith47%2Fgothememe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj-smith47%2Fgothememe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj-smith47%2Fgothememe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tj-smith47","download_url":"https://codeload.github.com/tj-smith47/gothememe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tj-smith47%2Fgothememe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33179397,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-18T09:27:30.708Z","status":"ssl_error","status_checked_at":"2026-05-18T09:27:28.300Z","response_time":71,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","theme-generator"],"created_at":"2025-12-25T11:58:46.874Z","updated_at":"2026-05-18T13:31:06.842Z","avatar_url":"https://github.com/tj-smith47.png","language":"Go","funding_links":["https://github.com/sponsors/tj-smith47","https://buymeacoffee.com/tjsmith47","https://www.buymeacoffee.com/tjsmith47"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"centeR\"\u003e\n\tGo • Theme • Me\n\u003c/h1\u003e\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/tj-smith47/gothememe.svg)](https://pkg.go.dev/github.com/tj-smith47/gothememe)\n[![CI](https://github.com/tj-smith47/gothememe/actions/workflows/ci.yml/badge.svg)](https://github.com/tj-smith47/gothememe/actions/workflows/ci.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/tj-smith47/gothememe)](https://goreportcard.com/report/github.com/tj-smith47/gothememe)\n[![Coverage](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/tj-smith47/gothememe/badges/coverage.json)](https://github.com/tj-smith47/gothememe/actions)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\u003ca href=\"https://www.buymeacoffee.com/tjsmith47\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n\nA comprehensive Go theming package for web applications. The web counterpart to [bubbletint](https://github.com/lrstanley/bubbletint).\n\n## Features\n\n- **450+ Built-in Themes** - Dracula, Nord, Gruvbox, Tokyo Night, Catppuccin, and more\n- **Multiple Output Formats** - CSS variables, SCSS, JSON, DTCG design tokens\n- **Syntax Highlighting** - Compatible with Prism.js, Highlight.js, and Chroma\n- **WCAG Accessibility** - Built-in contrast ratio validation\n- **Framework Agnostic** - Works with any web framework (HTMX, React, Vue, Svelte, etc.)\n- **Custom Themes** - Fluent builder API for creating custom themes\n- **Type Safe** - Full Go type safety with comprehensive documentation\n\n## Installation\n\n```bash\ngo get github.com/tj-smith47/gothememe\n```\n\n## Quick Start\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/tj-smith47/gothememe\"\n)\n\nfunc main() {\n    // Initialize the default registry with all themes\n    gothememe.NewDefaultRegistry()\n\n    // Generate CSS for the current theme (Dracula by default)\n    css := gothememe.CSS(gothememe.DefaultCSSOptions())\n    fmt.Println(css)\n}\n```\n\n## Usage Patterns\n\n### Pattern 1: Global Registry (Simplest)\n\nFor applications with a single, application-wide theme:\n\n```go\ngothememe.NewDefaultRegistry()\ngothememe.SetThemeID(\"dracula\")\n\n// Generate CSS\ncss := gothememe.CSS(gothememe.DefaultCSSOptions())\n\n// Access theme colors directly\nbg := gothememe.Background()\ntext := gothememe.TextPrimary()\naccent := gothememe.Accent()\n```\n\n### Pattern 2: Custom Registry (Dynamic Switching)\n\nFor applications that need runtime theme switching:\n\n```go\nregistry := gothememe.NewRegistry(\n    gothememe.ThemeDracula,\n    gothememe.ThemeNord,\n)\n\n// Navigate through themes\nregistry.NextTheme()\nregistry.PreviousTheme()\nregistry.SetThemeID(\"nord\")\n\n// Generate CSS for current theme\ncss := gothememe.GenerateCSS(registry.GetCurrentTheme(), gothememe.DefaultCSSOptions())\n```\n\n### Pattern 3: Direct Theme Usage (Static)\n\nFor compile-time theme selection without a registry:\n\n```go\ncss := gothememe.GenerateCSS(gothememe.ThemeDracula, gothememe.DefaultCSSOptions())\n```\n\n## Output Formats\n\n### CSS Variables\n\n```go\nopts := gothememe.CSSOptions{\n    Prefix:      \"theme\",\n    IncludeRoot: true,\n}\ncss := gothememe.GenerateCSS(theme, opts)\n```\n\nOutput:\n```css\n:root {\n    --theme-background: #282a36;\n    --theme-text-primary: #f8f8f2;\n    --theme-accent: #bd93f9;\n    /* ... */\n}\n```\n\n### Multi-Theme CSS\n\nGenerate CSS for all themes using `data-theme` attribute:\n\n```go\ncss := gothememe.AllThemesCSS(gothememe.DefaultCSSOptions())\n```\n\nOutput:\n```css\n[data-theme=\"dracula\"] { --theme-background: #282a36; ... }\n[data-theme=\"nord\"] { --theme-background: #2e3440; ... }\n```\n\nSwitch themes in HTML:\n```html\n\u003chtml data-theme=\"dracula\"\u003e\n```\n\n### Design Tokens (DTCG)\n\nGenerate DTCG v1 compliant design tokens:\n\n```go\ntokens, _ := gothememe.GenerateDesignTokens(theme, gothememe.DefaultTokenOptions())\n```\n\n### Syntax Highlighting\n\nGenerate CSS for code syntax highlighting:\n\n```go\n// Prism.js compatible\nsyntaxCSS := gothememe.GenerateSyntaxCSS(theme, gothememe.SyntaxOptions{\n    Format:       gothememe.SyntaxPrism,\n    UseVariables: true,\n})\n\n// Highlight.js compatible\nsyntaxCSS := gothememe.GenerateSyntaxCSS(theme, gothememe.SyntaxOptions{\n    Format: gothememe.SyntaxHighlightJS,\n})\n```\n\n## Custom Themes\n\n### Using the Builder\n\n```go\ntheme := gothememe.NewThemeBuilder(\"my-theme\", \"My Custom Theme\").\n    WithBackground(gothememe.Hex(\"#1a1a2e\")).\n    WithTextPrimary(gothememe.Hex(\"#e4e4e4\")).\n    WithAccent(gothememe.Hex(\"#e94560\")).\n    WithGreen(gothememe.Hex(\"#22c55e\")).\n    WithRed(gothememe.Hex(\"#ef4444\")).\n    Build()\n```\n\n### From Minimal Palette\n\nGenerate a complete theme from just 3 colors:\n\n```go\ntheme := gothememe.GenerateThemeFromPalette(\"minimal\", \"Minimal Theme\", gothememe.Palette{\n    Background: gothememe.Hex(\"#1a1a2e\"),\n    Foreground: gothememe.Hex(\"#e4e4e4\"),\n    Accent:     gothememe.Hex(\"#e94560\"),\n})\n```\n\n### Deriving from Existing Theme\n\n```go\ntheme := gothememe.DeriveTheme(gothememe.ThemeDracula, \"dracula-custom\", \"Dracula Custom\", map[string]gothememe.Color{\n    \"accent\": gothememe.Hex(\"#ff0000\"),\n})\n```\n\n## Color Manipulation\n\n```go\ncolor := gothememe.Hex(\"#e94560\")\n\n// Modify colors\nlighter := color.Lighten(0.1)\ndarker := color.Darken(0.1)\ntransparent := color.WithAlpha(0.5)\nopposite := color.Complement()\nmixed := color.Mix(gothememe.Hex(\"#ffffff\"), 0.5)\n\n// Convert formats\nhex := color.Hex()           // \"#e94560\"\nrgb := color.CSSRGB()        // \"rgb(233, 69, 96)\"\nhsl := color.CSSHSL()        // \"hsl(350, 79%, 59%)\"\n```\n\n## Accessibility\n\nCheck WCAG contrast requirements:\n\n```go\nimport \"github.com/tj-smith47/gothememe/pkg/contrast\"\n\n// Calculate contrast ratio\nratio := contrast.RatioHex(\"#ffffff\", \"#000000\") // 21.0\n\n// Check compliance levels\nmeetsAA := contrast.MeetsAAHex(\"#f8f8f2\", \"#282a36\", false)   // true\nmeetsAAA := contrast.MeetsAAAHex(\"#f8f8f2\", \"#282a36\", false) // true\n\n// Get compliance level\nlevel := contrast.CheckHex(\"#f8f8f2\", \"#282a36\") // contrast.LevelAAA\n```\n\n## CLI Tools\n\n### syntaxgen\n\nGenerate syntax highlighting CSS for use with Hugo, Chroma, Prism.js, or Highlight.js:\n\n```bash\n# Generate Chroma CSS for Dracula Pro (default)\nsyntaxgen \u003e syntax.css\n\n# Generate for a specific theme and format\nsyntaxgen -theme nord -format prism -output nord-prism.css\n\n# List all available themes\nsyntaxgen -list\n\n# Use CSS variables instead of inline colors\nsyntaxgen -theme catppuccin_mocha -variables \u003e syntax.css\n```\n\n**Flags:**\n- `-theme` - Theme ID (default: `dracula_pro`)\n- `-format` - Output format: `chroma`, `prism`, `highlightjs` (default: `chroma`)\n- `-output` - Output file (default: stdout)\n- `-variables` - Use CSS variables instead of inline colors\n- `-minify` - Minify output\n- `-list` - List available themes\n\n### themegen\n\nRegenerate Go theme source files from iTerm2-Color-Schemes:\n\n```bash\nthemegen -source iterm2 -output themes\n```\n\n## Available Themes\n\nSee [DEFAULT_THEMES.md](DEFAULT_THEMES.md) for a complete list of themes with previews.\n\nPopular themes include:\n- Dracula, Dracula Plus\n- Nord\n- Gruvbox (Dark/Light)\n- Tokyo Night (variants)\n- Catppuccin (Frappe, Latte, Macchiato, Mocha)\n- One Dark\n- Solarized (Dark/Light)\n- And 100+ more...\n\n## Framework Integration\n\nGoThemeMe works with any web framework. See [docs/INTEGRATION.md](docs/INTEGRATION.md) for examples with:\n- Vanilla HTML/CSS\n- HTMX + templ\n- React\n- Vue\n- Svelte\n- Tailwind CSS\n\n## Contributing\n\nContributions are welcome! See [docs/CONTRIBUTING.md](docs/CONTRIBUTING.md) for guidelines.\n\n## Disclaimer\n\nGenerated entirely by Claude Opus 4.5 over many iterations 🤖\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n## Credits\n\n- Inspired by [bubbletint](https://github.com/lrstanley/bubbletint) by Liam Stanley\n- Theme colors sourced from [iTerm2-Color-Schemes](https://github.com/mbadolato/iTerm2-Color-Schemes)\n- Built with [go-colorful](https://github.com/lucasb-eyer/go-colorful)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftj-smith47%2Fgothememe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftj-smith47%2Fgothememe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftj-smith47%2Fgothememe/lists"}