Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Color issues with text mode in terminal  (Read 1928 times)

flbr

  • Bay Watcher
    • View Profile
Color issues with text mode in terminal
« on: November 03, 2020, 04:57:45 pm »

(I'm not sure if this is the most appropriate place to ask this, so let me know if I should move this somewhere else)

When I run df in text mode it uses the colors for my terminal (set by pywal), and not colors from the init file. Is there a way to change this? For some background I'm running Manjaro i3.

Any help would be very much appreciated!
Logged
flbr was
hit by the what the fuck-truck
It was very effective!

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Color issues with text mode in terminal
« Reply #1 on: November 04, 2020, 07:23:14 am »

(I'm not sure if this is the most appropriate place to ask this, so let me know if I should move this somewhere else)

When I run df in text mode it uses the colors for my terminal (set by pywal), and not colors from the init file. Is there a way to change this? For some background I'm running Manjaro i3.
I'm pretty sure that behavior is "normal" - if you want to modify your terminal's palette to match the RGB values in init.txt, you'll need to do it yourself (using whatever technique "pywal" uses).
« Last Edit: November 04, 2020, 07:37:53 am by Quietust »
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Maximum Spin

  • Bay Watcher
  • [OPPOSED_TO_LIFE] [GOES_TO_ELEVEN]
    • View Profile
Re: Color issues with text mode in terminal
« Reply #2 on: November 04, 2020, 12:00:09 pm »

I would strongly suspect that the game is just giving out the standard SGR escape sequences to set the colours, so no actual RGB colour data (or even like an xterm-256 value) is actually being given to your terminal in the first place, meaning that there's no way for the terminal to know what specific colours the game means.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Color issues with text mode in terminal
« Reply #3 on: November 04, 2020, 12:20:47 pm »

I would strongly suspect that the game is just giving out the standard SGR escape sequences to set the colours, so no actual RGB colour data (or even like an xterm-256 value) is actually being given to your terminal in the first place, meaning that there's no way for the terminal to know what specific colours the game means.
Looking at the source code for libgraphics (included in the "g_src" subdirectory of the Linux version), the TEXT mode uses libncurses[w] for all output, which might work differently depending on your terminal emulator.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

flbr

  • Bay Watcher
    • View Profile
Re: Color issues with text mode in terminal
« Reply #4 on: November 04, 2020, 11:28:43 pm »

Hmm, okay, thank you for your help! I'll probably figure out how to deal with pywal, but as that isn't related to df, I'll leave this here
Logged
flbr was
hit by the what the fuck-truck
It was very effective!

HungThir

  • Bay Watcher
    • View Profile
Re: Color issues with text mode in terminal
« Reply #5 on: November 06, 2020, 12:26:56 am »

I would try it in a real xterm, and see what it does.  If xterm also uses the default terminal colours, and not the df colours, then I would conclude that df doesn't support custom colours in text mode.  But if xterm uses the df colours, then I would conclude that the problem is something with pywal...
Logged