Skip to content

Conversation

@rawnly
Copy link
Owner

@rawnly rawnly commented Oct 25, 2025

No description provided.

@rawnly rawnly added this to the v5 milestone Oct 25, 2025
@rawnly rawnly requested a review from Copilot October 25, 2025 23:39
@rawnly rawnly self-assigned this Oct 25, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces color extraction functionality from images to generate terminal themes. The implementation extracts dominant colors from wallpapers and converts them into platform-specific theme configurations supporting Ghostty, Kitty, iTerm, and Wezterm.

  • Adds base16 color scheme extraction from images using dominant color analysis
  • Implements theme generators for multiple terminal platforms
  • Introduces a new extract command to generate themes from the current wallpaper

Reviewed Changes

Copilot reviewed 12 out of 16 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
pkg/base16/extractor.go Implements color extraction and base16 scheme generation from images
pkg/theme-generator/platform.go Defines supported terminal platforms with type-safe enum pattern
pkg/theme-generator/builder.go Contains templates and logic for generating platform-specific themes
pkg/theme-generator/builder_test.go Adds test coverage for theme generation functionality
cmd/extract/root.go Implements CLI command for extracting colors from wallpapers
lib/template.go Adds iTerm RGB color formatting helper function
cmd/root.go Registers the new extract command and removes debug statements
unsplash/auth.go Fixes format string vulnerability in error handling
go.mod Updates Go version and adds required dependencies
tests/parser_test.go Renames test function to follow Go naming conventions
showcase.sh Adds demo script for the new functionality
iterm.itermcolors Example output file for iTerm theme

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

const (
PlatformGhostty Platform = "ghostty"
PlatformKitty Platform = "kitty"
PlatfromIterm Platform = "iterm"
Copy link

Copilot AI Oct 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'Platfrom' to 'Platform' in constant name.

Copilot uses AI. Check for mistakes.
func PlatformValues() []string {
return []string{
string(PlatformGhostty),
string(PlatfromIterm),
Copy link

Copilot AI Oct 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'Platfrom' to 'Platform' in constant reference.

Copilot uses AI. Check for mistakes.

func (p *Platform) Set(v string) error {
switch v {
case string(PlatformGhostty), string(PlatfromIterm), string(PlatformKitty), string(PlatformWezterm):
Copy link

Copilot AI Oct 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'Platfrom' to 'Platform' in constant reference.

Copilot uses AI. Check for mistakes.
Comment on lines +88 to +95
"{base03}", # 8
"{base08}", # 9
"{base0B}", # 10
"{base0A}", # 11
"{base0D}", # 12
"{base0E}", # 13
"{base0C}", # 14
"{base0F}", # 15
Copy link

Copilot AI Oct 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Template placeholders use {baseXX} syntax instead of {{ .BaseXX }} which won't be replaced by Go's template engine. This will result in literal strings like {base03} in the output instead of actual color values.

Suggested change
"{base03}", # 8
"{base08}", # 9
"{base0B}", # 10
"{base0A}", # 11
"{base0D}", # 12
"{base0E}", # 13
"{base0C}", # 14
"{base0F}", # 15
"{{ .Base03 }}", # 8
"{{ .Base08 }}", # 9
"{{ .Base0B }}", # 10
"{{ .Base0A }}", # 11
"{{ .Base0D }}", # 12
"{{ .Base0E }}", # 13
"{{ .Base0C }}", # 14
"{{ .Base0F }}", # 15

Copilot uses AI. Check for mistakes.

templates := map[Platform]string{
PlatformGhostty: ghosttyTemplate,
PlatfromIterm: itermTemplate,
Copy link

Copilot AI Oct 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'Platfrom' to 'Platform' in constant reference.

Suggested change
PlatfromIterm: itermTemplate,
PlatformIterm: itermTemplate,

Copilot uses AI. Check for mistakes.
@rawnly rawnly force-pushed the feature/color-extraction branch from e1bd91e to fc33ce3 Compare October 25, 2025 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants