Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

Finding current terminal color scheme [SOLVED]

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
mikegpitt
Advocate
Advocate
User avatar
Posts: 3224
Joined: Sat May 22, 2004 6:49 pm

Finding current terminal color scheme [SOLVED]

  • Quote

Post by mikegpitt » Wed Aug 10, 2016 2:59 pm

Is there a way to output the current color scheme of your terminal? I know you can override this in your .Xdefaults by adding the color1 - color15 definitions, but I am having problems finding the defaults.

My situation: I have been using aterm for about a decade and really like the default color scheme. I'm planning to switch to urxvt, but some of the default colors are slightly different. If possible I'd like to dump the colors from aterm and set them in my .Xdefaults for urxvt.


EDIT: The aterm colors may also be the system default, as the colors look the same when on the virtual terminal. I believe the system colors are set in /etc/DIR_COLORS, but I'm unsure of their hex values and how they would map to each of the color1 - color15 variables.
Last edited by mikegpitt on Thu Aug 11, 2016 12:27 am, edited 1 time in total.
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Wed Aug 10, 2016 5:14 pm

If xrdb -query doesn't get what you want, you'll have to look at the sourcecode for aterm because especially if you're not using a DE, the "defaults" will be hardcoded.
Intel Core i7 2700K/Radeon Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
mikegpitt
Advocate
Advocate
User avatar
Posts: 3224
Joined: Sat May 22, 2004 6:49 pm

  • Quote

Post by mikegpitt » Wed Aug 10, 2016 10:31 pm

Thanks for the reply! I looked at the aterm source and found the colors. They are also listed on the man page :oops:

But, this is why I'm confused. The colors in my aterm are not the defaults. Apparently, aterm is taking some of my custom xterm color scheme, but not all of it. xterm and aterm definitely look different, but not completely different.

I think the color scheme I'm really looking for is the one gentoo uses for the virtual terminals. Where can a retrieve a list of these colors?
Top
mikegpitt
Advocate
Advocate
User avatar
Posts: 3224
Joined: Sat May 22, 2004 6:49 pm

  • Quote

Post by mikegpitt » Thu Aug 11, 2016 12:27 am

I'm going to mark this one solved. I didn't really answer my original question, but I seem to have what I need. This is the color scheme I'm using:

Code: Select all

URxvt*color0: #000000
URxvt*color1: #b21818
URxvt*color2: #18b218
URxvt*color3: #b26818
URxvt*color4: #1818b2
URxvt*color5: #b218b2
URxvt*color6: #18b2b2
URxvt*color7: #b2b2b2
URxvt*color8: #686868
URxvt*color9: #FF5454
URxvt*color10: #54FF54
URxvt*color11: #FFFF54
URxvt*color12: #5454FF
URxvt*color13: #FF54FF
URxvt*color14: #54FFFF
URxvt*color15: #FFFFFF
I also needed to add this to my .vimrc:

Code: Select all

set bg=dark
Unsure why I never needed the vim setting before. It must have something to do with aterm. But, with the above I have my color scheme replicated nicely for urxvt.
Top
cboldt
Veteran
Veteran
User avatar
Posts: 1046
Joined: Wed Aug 24, 2005 2:54 pm

  • Quote

Post by cboldt » Thu Aug 11, 2016 10:39 am

Glad you found the colors. From the syntax you showed, the settings go in ~/.Xdefaults

I don't know if case makes a difference, but all the urxvt settings in my .Xdefaults files are "URxvt* ..." Many of the color settings deal with particular items in the terminal, such as cursor color, pointer color, underline color, bold color, italics color, scroll color, and several others. See the RESOURCES section of the urxvt man page.

The DIR_COLORS file affect the output of the `ls` command, and as far as I know, only the `ls` command.

Edit to add some remarks. I see you knew about .Xdefaults (or .Xresource now, I guess. I learned something new this morning). The urxvt man page has the default colors listed under COLOURS AND GRAPHICS. You'll notice the colors given there are color names, not hex RGB values. The correspondence between color name and value are in /usr/share/X11/rgb.txt (the location or your rgb.txt file may differ), with the color values being in decimal, not hex.

I think, as you found out, defaults won't be reported by `xrdb -query` or by viewing of the .Xdefaults/.Xresources file. But also as you found out, the defaults are documented in the respecive man pages, and of course somewhere in the source code.
Top
mikegpitt
Advocate
Advocate
User avatar
Posts: 3224
Joined: Sat May 22, 2004 6:49 pm

  • Quote

Post by mikegpitt » Fri Aug 12, 2016 7:21 pm

Thanks for the additional comments! I haven't had a chance to review further after I sort of got it where I want. Some of the colors are still a bit off in vim. It's fine, but a little different. It's still an unknown where aterm was pulling in these 'magic' colors. The only reason it matters, is because I've been looking at the same color pallet for the last 10+ years. I don't want to change :wink:
Top
mikegpitt
Advocate
Advocate
User avatar
Posts: 3224
Joined: Sat May 22, 2004 6:49 pm

  • Quote

Post by mikegpitt » Thu Aug 18, 2016 7:19 pm

Adding some additional info here for anyone who may find it helpful. I was still having problems with my vim colorscheme looking different than previous. I tried the 256 color urxvt option, but this didn't help. It turns out I was going in the wrong direction. Aterm appears to only use 8 colors. So I added this to my .vimrc and my colors were back to normal.

Code: Select all

set t_Co=8
Maybe I should upgrade my color scheme to something more modern... but this was the answer to my question.
Top
Post Reply

7 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic