Skip to content

feat: actually good + consistent universal terminal colors and cross platform too!#132

Open
haikalllp wants to merge 3 commits into
InioX:mainfrom
haikalllp:feat/universalTerminalColors
Open

feat: actually good + consistent universal terminal colors and cross platform too!#132
haikalllp wants to merge 3 commits into
InioX:mainfrom
haikalllp:feat/universalTerminalColors

Conversation

@haikalllp
Copy link
Copy Markdown
Contributor

@haikalllp haikalllp commented Apr 16, 2026

Adds universal and cross-platform terminal color palettes using terminal sequences that actually works and some optional theme (Kitty, WezTerm, Windows Terminal).

New posthook scripts:

  • Added harmonizer.py, a Python script that harmonizes a base 16-color terminal palette to the wallpaper accent using HCT color space.
  • Added generate-term-colors.py, generates the color pallete for all terminals using terminal sequences and also theme file for Kitty, WezTerm, and Windows Terminal.
  • Added term-colors.json the template for Matugen to output the base material you colors.
  • Added windows_term_post.ps1 to inject the generated color scheme into Windows Terminal's settings automatically.

Some clarifications (Please read!!)

Why make theme files for Kitty, WezTerm and Windows Terminal?
The terminal sequences already works on all platforms and on all terminals, but I made actual theme for some because:

  • Kitty: Kitty has some issues with terminal sequences especially when using light colored scheme.
  • WezTerm and Windows Terminal:
    • Both of these are a very well known terminals for Windows, and the issue with Windows is that terminal sequences ONLY works for powershell, so if user is using cmd, wsl, git bash it simply wont work. Hence why I made actual theme for them so the colors works on any shell.

And Finally SHOWCASE!!

Linux:

UnixUniversalTerminal.mp4

Windows:

WindowsTerminals.mp4

Some limitations with windows, it doesn't auto reload due to nature of powershell.

Mac:
Screenshot 2026-05-04 at 7 14 20 PM

@haikalllp
Copy link
Copy Markdown
Contributor Author

ykw I'm thinking again, I think I can implement something that is more re-useable like harmonizer.py or something..

@haikalllp haikalllp marked this pull request as draft April 17, 2026 06:24
@TahirDevT
Copy link
Copy Markdown

TahirDevT commented Apr 17, 2026

image I wanted to try this out in kitty, and these are the colors I got. I don't know if this was supposed to happen, but the colors look are a bit off and lost meaning. It feels like the colors from 8-15 should be colors 1-7 and the colors 1-7 should be colors 8-15. Overall these generated colors feel a bit questionable.

@haikalllp
Copy link
Copy Markdown
Contributor Author

haikalllp commented Apr 17, 2026

No its intended, 1-7 is the normal standard colors for accent, and 8-15 are bright bold colors, also you can see how its producing consistent colors of blue, purple, pink no random tertiary of green or yellow. Its intended, the purpose of the harmonization is to follow consistent base16 color palettes while applying accent of the Material You colors.
With this it will give a more consistent color palettes that is actually readable and looks good on either dark or light.

But i get what you mean by "Lost its meaning", again the main goal is consistency and readability across ANY wallpapers and mode dark/light. Without this method it could look good on some wallpapers but looks like absolute trash on a different wallpaper, and again might look good on dark but very hard to read on light.

@TahirDevT
Copy link
Copy Markdown

I see, thanks for the clarification!

@haikalllp
Copy link
Copy Markdown
Contributor Author

I see, thanks for the clarification!

@TahirDevT I do plan to remap the colors tho, as I'm still not satisfied with it just yet😅

@haikalllp haikalllp force-pushed the feat/universalTerminalColors branch from bf6c5d7 to cb0c57b Compare April 28, 2026 19:07
@haikalllp haikalllp marked this pull request as ready for review April 28, 2026 19:21
@haikalllp
Copy link
Copy Markdown
Contributor Author

haikalllp commented Apr 28, 2026

Added some fixes, now uses smart chroma scaling, so when running matugen with -t scheme like monochrome, neutral, and vibrant it actually produces proper colors.
Monochrome example:
image

Also added optional --strength flag so now you can change the strength of the harmonizer:

python ~/.config/matugen/scripts/generate-term-colors.py ~/.cache/matugen/term-colors.json --strength 0.95

Higher strength = colors generated more united and closer to accent
Lower strength = colors generated having more variety but might look off

@haikalllp haikalllp force-pushed the feat/universalTerminalColors branch from acdd1f7 to 5831cbb Compare May 15, 2026 07:19
@haikalllp haikalllp force-pushed the feat/universalTerminalColors branch 2 times, most recently from ab178fb to 1dd6748 Compare May 15, 2026 14:31
@haikalllp haikalllp force-pushed the feat/universalTerminalColors branch from 1dd6748 to 81d5293 Compare May 16, 2026 07:48
@haikalllp
Copy link
Copy Markdown
Contributor Author

hmmm I think i'm gonna find some work around to make this work with purely bash scripts

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