Color Schemes............. #15429

Closed
opened 2026-01-31 04:38:24 +00:00 by claunia · 4 comments
Owner

Originally created by @pb5050 on GitHub (Oct 3, 2021).

i imported a massive amount of color schemes from colortool and or other palces and the settings file becomes massively long.

is there a way we could make "color schemes" a separate file?

im not to familiar with coding is there a way i could create a json file with array for color schemes and somehow reference it in the settings file so its not so cluttered"?

Originally created by @pb5050 on GitHub (Oct 3, 2021). i imported a massive amount of color schemes from colortool and or other palces and the settings file becomes massively long. is there a way we could make "color schemes" a separate file? im not to familiar with coding is there a way i could create a json file with array for color schemes and somehow reference it in the settings file so its not so cluttered"?
Author
Owner

@zadjii-msft commented on GitHub (Oct 4, 2021):

A clever way to work around this would be to pretend that they're a "fragment extension". The docs are much more elaborate here. But you could do something like:

  1. Make a folder in %localappdata%\Microsoft\Windows Terminal\Fragments. For this example, we'll use TestFragment as our directory name.
  2. in that TestFragment, make a new .json file. It can be named anything (as long as it's extension is .json). We'll call it schemes.json.
  3. In schemes.json, add all your schemes. For example:
{
"schemes": [
  {
    "name": "Banana Blueberry",
    "black": "#17141f",
    "red": "#ff6b7f",
    "green": "#00bd9c",
    "yellow": "#e6c62f",
    "blue": "#22e8df",
    "purple": "#dc396a",
    "cyan": "#56b6c2",
    "white": "#f1f1f1",
    "brightBlack": "#495162",
    "brightRed": "#fe9ea1",
    "brightGreen": "#98c379",
    "brightYellow": "#f9e46b",
    "brightBlue": "#91fff4",
    "brightPurple": "#da70d6",
    "brightCyan": "#bcf3ff",
    "brightWhite": "#ffffff",
    "background": "#191323",
    "foreground": "#cccccc",
    "cursorColor": "#e07d13",
    "selectionBackground": "#220525"
  }

]
}

Restart the Terminal, and you'll see that all the schemes from that file are available in the Terminal, without needing to be in the settings.json file itself.

@zadjii-msft commented on GitHub (Oct 4, 2021): A clever way to work around this would be to pretend that they're a "fragment extension". The docs are much more elaborate [here](https://docs.microsoft.com/en-us/windows/terminal/json-fragment-extensions). But you could do something like: 1. Make a folder in `%localappdata%\Microsoft\Windows Terminal\Fragments`. For this example, we'll use `TestFragment` as our directory name. 2. in that `TestFragment`, make a new `.json` file. It can be named anything (as long as it's extension is `.json`). We'll call it `schemes.json`. 3. In `schemes.json`, add all your schemes. For example: ```json { "schemes": [ { "name": "Banana Blueberry", "black": "#17141f", "red": "#ff6b7f", "green": "#00bd9c", "yellow": "#e6c62f", "blue": "#22e8df", "purple": "#dc396a", "cyan": "#56b6c2", "white": "#f1f1f1", "brightBlack": "#495162", "brightRed": "#fe9ea1", "brightGreen": "#98c379", "brightYellow": "#f9e46b", "brightBlue": "#91fff4", "brightPurple": "#da70d6", "brightCyan": "#bcf3ff", "brightWhite": "#ffffff", "background": "#191323", "foreground": "#cccccc", "cursorColor": "#e07d13", "selectionBackground": "#220525" } ] } ``` Restart the Terminal, and you'll see that all the schemes from that file are available in the Terminal, without needing to be in the `settings.json` file itself.
Author
Owner

@pb5050 commented on GitHub (Nov 9, 2021):

i was trying to do this again but i have No "Fragments" directory

the only thing i could find was
C:\Users\Janss\AppData\Local\Packages\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\LocalState
that had all my settings backup json files and the main settings . json file......

hmm i have it installed from the app store. but i did a search for folders names "Fragments" and found nothing.

@pb5050 commented on GitHub (Nov 9, 2021): i was trying to do this again but i have No "Fragments" directory the only thing i could find was C:\Users\Janss\AppData\Local\Packages\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\LocalState that had all my settings backup json files and the main settings . json file...... hmm i have it installed from the app store. but i did a search for folders names "Fragments" and found nothing.
Author
Owner

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

i was trying to do this again but i have No "Fragments" directory

That makes sense, we don't make one by default. Hence why I asked in the first step to create the Fragments/ directory 😄

@zadjii-msft commented on GitHub (Nov 9, 2021): > i was trying to do this again but i have No "Fragments" directory That makes sense, we don't make one by default. Hence why I asked [in the first step](https://github.com/microsoft/terminal/issues/11406#issuecomment-933479870) to _create the `Fragments/` directory_ 😄
Author
Owner

@pb5050 commented on GitHub (Dec 19, 2021):

love you. what elese will this work with>!?!?!

@pb5050 commented on GitHub (Dec 19, 2021): love you. what elese will this work with>!?!?!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15429