New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What method htop uses to extract color theme of current terminal session? #1401
Comments
None. The color schemes are hard-coded at https://github.com/htop-dev/htop/blob/main/CRT.c#L117 ff. |
This is your terminal emulator configuration. It can substitute colors as it wishes. The apps running in it will not know. Run |
Okay, my ultimate goal is to draw ASCII art using ncurses with the current palette colors of the terminal emulator, so how to I tell nucrses what colors does the current terminal emulator session has? Current I found two methods,
So the question remains the same how does htop uses ncurses to set the text with same colors as the current terminal emulator session. |
Simply by printing its text using ncurses to use the appropriate palette colors. What the terminal emulator makes of this is none of our business and htop does not care about the final rendering … |
What if the user wishes to modify that colour scheme, through htop? I am not disputing the "htop adheres to the current theme" in use, more the what if a user wishes to customize it on a per-application basis. I'll file a separate issue for this, though, as it does not really pertain to the issue here. |
If a user wished to modify a theme, they can do so in Line 117 in ad3b90e
|
Within htop which source file is responsible to extract the current color theme of terminal session being used?
It would be great if you could redirect me to the file.
The text was updated successfully, but these errors were encountered: