Skip to content

Instantly share code, notes, and snippets.

@thonkinator
Last active May 17, 2023 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thonkinator/709f2b5f7bc8bdddef7e17f1e1c5e135 to your computer and use it in GitHub Desktop.
Save thonkinator/709f2b5f7bc8bdddef7e17f1e1c5e135 to your computer and use it in GitHub Desktop.
iTerm2 colors in hTerm (crosh/crostini)
const palette = [
"#202124", /* 0: black */ // set this to #000 if you want
"#c91b00", /* 1: red */
"#00c200", /* 2: green */
"#c7c400", /* 3: yellow */
"#0225c7", /* 4: blue */
"#c930c7", /* 5: magenta */
"#00c5c7", /* 6: cyan */
"#c7c7c7", /* 7: white */
"#676767", /* 8: brblack */
"#ff6d67", /* 9: brred */
"#5ff967", /* 10: brgreen */
"#fefb67", /* 11: bryellow */
"#6871ff", /* 12: brblue */
"#ff76ff", /* 13: brmagenta*/
"#5ffdff", /* 14: brcyan */
"#fffefe", /* 15: brwhite */
]
term_.setProfile("iTerm2");
term_.prefs_.set("environment", {"TERM": "xterm"});
term_.prefs_.set("color-palette-overrides", palette);
term_.prefs_.set("background-color", palette[0]);
term_.prefs_.set("foreground-color", palette[15]);
term_.prefs_.set("cursor-color", palette[7]);
term_.prefs_.set("font-smoothing", "subpixel-antialiased");
term_.prefs_.set("enable-bold", true);
term_.prefs_.set("enable-bold-as-bright", true);

Copy/paste the below file into the Javascript console (ctrl+shift+j) to set the theme. Thanks to j-bennet for the script which this is based on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment