Support random color scheme, pseudocode [ scheme = rand(settings.schemes) ] #12925

Open
opened 2026-01-31 03:29:08 +00:00 by claunia · 11 comments
Owner

Originally created by @tedli on GitHub (Mar 9, 2021).

Description of the new feature/enhancement

There is a site https://windowsterminalthemes.dev/, it shares many awesome color themes. I choose some of them, pasted in settings.schemes, then I may change the colorScheme daily depends on my feeling.

The Oh-My-Zsh has a similar feature, the random theme, a theme will be chosen randomly every time a new shell is opened.

Wish Windows Terminal could have something like that.

Proposed technical implementation details (optional)

Introduce a keyword like random, if the colorScheme field is set to random, then every time a new tag or window is opened, randomly choose a color schema from settings.schemes .

Originally created by @tedli on GitHub (Mar 9, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement <!-- A clear and concise description of what the problem is that the new feature would solve. Describe why and how a user would use this new functionality (if applicable). --> There is a site [https://windowsterminalthemes.dev/](https://windowsterminalthemes.dev/), it shares many awesome color themes. I choose some of them, pasted in settings.schemes, then I may change the colorScheme daily depends on my feeling. The `Oh-My-Zsh` has a similar feature, the random theme, a theme will be chosen randomly every time a new shell is opened. Wish Windows Terminal could have something like that. # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. --> Introduce a keyword like `random`, if the colorScheme field is set to random, then every time a new tag or window is opened, randomly choose a color schema from settings.schemes .
Author
Owner

@zadjii-msft commented on GitHub (Mar 9, 2021):

yes yes yes.

See guys? I told you I wasn't the only person who wanted this!

I'm immediately sticking this on the backlog. We'd probably want something slightly more obscure than just random, but I really love the idea. Thanks!

Oooooh or even, if you set scheme: ["foo", "bar", "baz"], we pick one at random from that list? That's a neat idea too.

@zadjii-msft commented on GitHub (Mar 9, 2021): yes yes yes. See guys? I told you I wasn't the only person who wanted this! I'm immediately sticking this on the backlog. We'd probably want something _slightly_ more obscure than just `random`, but I really love the idea. Thanks! Oooooh or even, if you set `scheme: ["foo", "bar", "baz"]`, we pick one at random from that list? That's a neat idea too.
Author
Owner

@electronic-dk commented on GitHub (Mar 10, 2021):

Slightly off-topic: many (if not most) of the themes included on this website have secondary colors that are barely visible (e.g. usually low contrast, command arguments suffer from it most of the time) to the point that those themes are either outright unusable or require some tinkering. I wonder if it's possible to somehow detect such situations and maybe suggest alterations to the colors.

@electronic-dk commented on GitHub (Mar 10, 2021): Slightly off-topic: many (if not most) of the themes included on this website have secondary colors that are barely visible (e.g. usually low contrast, command arguments suffer from it most of the time) to the point that those themes are either outright unusable or require some tinkering. I wonder if it's possible to somehow detect such situations and maybe suggest alterations to the colors.
Author
Owner

@hessedoneen commented on GitHub (Apr 7, 2021):

Hello! This seems kind of fun. Could I give it a try?

@hessedoneen commented on GitHub (Apr 7, 2021): Hello! This seems kind of fun. Could I give it a try?
Author
Owner

@zadjii-msft commented on GitHub (Apr 7, 2021):

Go for it!

For this one, I'd add a special string like _random_. If a profile's color scheme is set to that string, then when we apply the color scheme:
cdf2630204/src/cascadia/TerminalSettingsModel/TerminalSettings.cpp (L199-L205)
Don't look up the scheme by name, but instead use a random one.

I'd also watch out - there's another part of the setting load code that verifies that every profile's colorScheme does in fact exsist. We'd have to adapt that code to not check if _random_ exists.

@zadjii-msft commented on GitHub (Apr 7, 2021): Go for it! For this one, I'd add a special string like `_random_`. If a profile's color scheme is set to that string, then when we apply the color scheme: https://github.com/microsoft/terminal/blob/cdf2630204fdafc24237e5ebaf069c0b12a26aab/src/cascadia/TerminalSettingsModel/TerminalSettings.cpp#L199-L205 Don't look up the scheme by name, but instead use a random one. I'd also watch out - there's another part of the setting load code that verifies that every profile's `colorScheme` does in fact exsist. We'd have to adapt that code to not check if `_random_` exists.
Author
Owner

@rachel148 commented on GitHub (Sep 20, 2023):

Hi, this looks cool, can I try?

@rachel148 commented on GitHub (Sep 20, 2023): Hi, this looks cool, can I try?
Author
Owner

@zadjii-msft commented on GitHub (Sep 22, 2023):

Go for it! We had someone try once before in https://github.com/microsoft/terminal/pull/9845. I believe that was pretty close to right. IIRC they just got caught up on making sure to not raise a warning when the scheme is set to _random_

@zadjii-msft commented on GitHub (Sep 22, 2023): Go for it! We had someone try once before in https://github.com/microsoft/terminal/pull/9845. I believe that was pretty close to right. IIRC they just got caught up on making sure to not raise a warning when the scheme is set to `_random_`
Author
Owner

@udupa-chinnu commented on GitHub (Oct 17, 2023):

This is cool !! Can i try this....I believe this is still an open issue

@udupa-chinnu commented on GitHub (Oct 17, 2023): This is cool !! Can i try this....I believe this is still an open issue
Author
Owner

@KrishnaChamarthy commented on GitHub (Jun 13, 2025):

Hey! Its my first time trying open source contribution. Can I give this a try?

@KrishnaChamarthy commented on GitHub (Jun 13, 2025): Hey! Its my first time trying open source contribution. Can I give this a try?
Author
Owner

@archa8 commented on GitHub (Jun 23, 2025):

Hey this issue looks fun to try. Could you please assign me this? And I'd appreciate if you could help along

@archa8 commented on GitHub (Jun 23, 2025): Hey this issue looks fun to try. Could you please assign me this? And I'd appreciate if you could help along
Author
Owner

@shivam-dhir commented on GitHub (Jan 22, 2026):

Hi, I would love to work on this issue

@shivam-dhir commented on GitHub (Jan 22, 2026): Hi, I would love to work on this issue
Author
Owner

@By2Hash commented on GitHub (Jan 23, 2026):

Hola, quiero intentar hacer un cambio

@By2Hash commented on GitHub (Jan 23, 2026): Hola, quiero intentar hacer un cambio
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12925