From cda0cd5878b8f8dba703775dd1fd26364eb6269b Mon Sep 17 00:00:00 2001 From: ediblerope Date: Mon, 13 Apr 2026 20:07:15 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20matugen=20template=20syntax=20=E2=80=94?= =?UTF-8?q?=20use=20.hex=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Templates were using .color which doesn't exist in matugen 4.x. The correct accessor is .hex. Also use the official matugen-themes Ghostty template as reference for proper color mapping. Co-Authored-By: Claude Opus 4.6 --- templates/ghostty-colors | 43 ++++++++++++++++++++------------------- templates/gtk4-colors.css | 30 +++++++++++++-------------- 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/templates/ghostty-colors b/templates/ghostty-colors index 08ab7e2..a868c67 100644 --- a/templates/ghostty-colors +++ b/templates/ghostty-colors @@ -1,21 +1,22 @@ -palette = 0={{colors.base16.base00.default.color}} -palette = 1={{colors.base16.base08.default.color}} -palette = 2={{colors.base16.base0b.default.color}} -palette = 3={{colors.base16.base0a.default.color}} -palette = 4={{colors.base16.base0d.default.color}} -palette = 5={{colors.base16.base0e.default.color}} -palette = 6={{colors.base16.base0c.default.color}} -palette = 7={{colors.base16.base05.default.color}} -palette = 8={{colors.base16.base03.default.color}} -palette = 9={{colors.base16.base08.default.color}} -palette = 10={{colors.base16.base0b.default.color}} -palette = 11={{colors.base16.base0a.default.color}} -palette = 12={{colors.base16.base0d.default.color}} -palette = 13={{colors.base16.base0e.default.color}} -palette = 14={{colors.base16.base0c.default.color}} -palette = 15={{colors.base16.base07.default.color}} -background = {{colors.primary.surface.default.color}} -foreground = {{colors.primary.on_surface.default.color}} -cursor-color = {{colors.primary.primary.default.color}} -selection-background = {{colors.primary.primary_container.default.color}} -selection-foreground = {{colors.primary.on_primary_container.default.color}} +background = {{colors.background.default.hex}} +foreground = {{colors.on_surface.default.hex}} +cursor-color = {{colors.primary.default.hex}} +cursor-text = {{colors.on_primary.default.hex}} +selection-background = {{colors.secondary_container.default.hex}} +selection-foreground = {{colors.on_secondary_container.default.hex}} +palette = 0={{colors.surface_container_high.default.hex}} +palette = 1={{colors.error.default.hex}} +palette = 2={{colors.primary.default.hex}} +palette = 3={{colors.tertiary.default.hex}} +palette = 4={{colors.secondary.default.hex}} +palette = 5={{colors.primary_fixed.default.hex}} +palette = 6={{colors.secondary_fixed.default.hex}} +palette = 7={{colors.on_surface_variant.default.hex}} +palette = 8={{colors.outline.default.hex}} +palette = 9={{colors.error_container.default.hex}} +palette = 10={{colors.primary_container.default.hex}} +palette = 11={{colors.tertiary_container.default.hex}} +palette = 12={{colors.secondary_container.default.hex}} +palette = 13={{colors.inverse_primary.default.hex}} +palette = 14={{colors.outline_variant.default.hex}} +palette = 15={{colors.on_surface.default.hex}} diff --git a/templates/gtk4-colors.css b/templates/gtk4-colors.css index 6dc4f01..d741887 100644 --- a/templates/gtk4-colors.css +++ b/templates/gtk4-colors.css @@ -1,15 +1,15 @@ -@define-color accent_color {{colors.primary.primary.default.color}}; -@define-color accent_bg_color {{colors.primary.primary_container.default.color}}; -@define-color accent_fg_color {{colors.primary.on_primary_container.default.color}}; -@define-color window_bg_color {{colors.primary.surface.default.color}}; -@define-color window_fg_color {{colors.primary.on_surface.default.color}}; -@define-color view_bg_color {{colors.primary.surface_container_low.default.color}}; -@define-color view_fg_color {{colors.primary.on_surface.default.color}}; -@define-color headerbar_bg_color {{colors.primary.surface_container.default.color}}; -@define-color headerbar_fg_color {{colors.primary.on_surface.default.color}}; -@define-color card_bg_color {{colors.primary.surface_container_high.default.color}}; -@define-color card_fg_color {{colors.primary.on_surface.default.color}}; -@define-color sidebar_bg_color {{colors.primary.surface_container.default.color}}; -@define-color sidebar_fg_color {{colors.primary.on_surface.default.color}}; -@define-color popover_bg_color {{colors.primary.surface_container.default.color}}; -@define-color popover_fg_color {{colors.primary.on_surface.default.color}}; +@define-color accent_color {{colors.primary.default.hex}}; +@define-color accent_bg_color {{colors.primary_container.default.hex}}; +@define-color accent_fg_color {{colors.on_primary_container.default.hex}}; +@define-color window_bg_color {{colors.surface.default.hex}}; +@define-color window_fg_color {{colors.on_surface.default.hex}}; +@define-color view_bg_color {{colors.surface_container_low.default.hex}}; +@define-color view_fg_color {{colors.on_surface.default.hex}}; +@define-color headerbar_bg_color {{colors.surface_container.default.hex}}; +@define-color headerbar_fg_color {{colors.on_surface.default.hex}}; +@define-color card_bg_color {{colors.surface_container_high.default.hex}}; +@define-color card_fg_color {{colors.on_surface.default.hex}}; +@define-color sidebar_bg_color {{colors.surface_container.default.hex}}; +@define-color sidebar_fg_color {{colors.on_surface.default.hex}}; +@define-color popover_bg_color {{colors.surface_container.default.hex}}; +@define-color popover_fg_color {{colors.on_surface.default.hex}};