You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not an issue with theme.sh, but a mere “how to” question as I did not succeed in finding any documentation.
Hello everyone. For quite some days I am trying to re-define the 16 base colors, set via e.g. my terminal emulator, via the command line (only) inside the currently active shell/session. Unfortunately, after lots of searching, reading, trying, and failing, I still did not succeed with this simple(?) task.
Yesterday I stumbled upon theme.sh and read through the source code, especially the apply_theme() function should be interesting with regards to my question, but I’m still a bit lost due to the many substitutions going on there.
Hence, may I ask you to please provide one, two, or three easy examples on how to re-define one of the 16 base colors?
I did succeed in changing the default foreground color via e.g. printf "\e[38;2;${r};${g};${b}m%s\e\\" "…" where ${r}${g}${b} are RGB values calculated from a hex color definition like #ffffff or #000000 et cetera.
How would I re-define e.g. the color black, i.e. \e[30 or bold/bright black (grey), i.e. \e[1;30 or \e[90 for my current shell/session? Thank you so much for hopefully explaining a little bit the approaches of and goings-on in your script.
I am on macOS, and I was testing my color re-definition approaches in iTerm, Terminal, and also tmux — it seems there’s differences for many terminal emulators. Also there seems to be a difference between the direction the bracket is facing in \e[ and \e] and for this I found even less documentation online.
The text was updated successfully, but these errors were encountered:
This is not an issue with
theme.sh
, but a mere “how to” question as I did not succeed in finding any documentation.Hello everyone. For quite some days I am trying to re-define the 16 base colors, set via e.g. my terminal emulator, via the command line (only) inside the currently active shell/session. Unfortunately, after lots of searching, reading, trying, and failing, I still did not succeed with this simple(?) task.
Yesterday I stumbled upon
theme.sh
and read through the source code, especially theapply_theme()
function should be interesting with regards to my question, but I’m still a bit lost due to the many substitutions going on there.Hence, may I ask you to please provide one, two, or three easy examples on how to re-define one of the 16 base colors?
I did succeed in changing the default foreground color via e.g.
printf "\e[38;2;${r};${g};${b}m%s\e\\" "…"
where${r}
${g}
${b}
are RGB values calculated from a hex color definition like#ffffff
or#000000
et cetera.How would I re-define e.g. the color black, i.e.
\e[30
or bold/bright black (grey), i.e.\e[1;30
or\e[90
for my current shell/session? Thank you so much for hopefully explaining a little bit the approaches of and goings-on in your script.I am on macOS, and I was testing my color re-definition approaches in iTerm, Terminal, and also tmux — it seems there’s differences for many terminal emulators. Also there seems to be a difference between the direction the bracket is facing in
\e[
and\e]
and for this I found even less documentation online.The text was updated successfully, but these errors were encountered: