Color relationships in Xdefaults

Forum rules
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
User avatar
a-109-107
Riesenpenis
Posts: 30
Joined: Thu May 21, 2015 9:04 am

Color relationships in Xdefaults

Unread post by a-109-107 » Wed Jul 01, 2015 7:06 pm

I'm an avid collector of Xresources/Xdefaults files, occasionally port other colorschemes (ex. vim) to this format. I hope I'm not completely clueless about them. In the ideal scenario you have 8 or 16 distinct colors that work (contrast-wise) with each other. This is quite evident in this usual table representation:
Image
colorscheme gotham, preview script, font Luculent

What I wasn't able to figure out from man pages or anything, if there exist canonical/recommended set of color pairs that a scheme should adhere to for readability in different programs. I would like to know if the colors are intended to work well all across the board, in pairs (col 0 works with col 1) or with siblings (col 0 works with col 7) or anything like that.

In other words, if I have N<16 different colors, how should I lay them out in a Xresources file to ensure maximum readability without customizing color usage in any program?

User avatar
dkeg
Configurator
Posts: 3782
Joined: Sun Nov 18, 2012 9:23 pm
Location: Mid-Atlantic Grill

Re: Color relationships in Xdefaults

Unread post by dkeg » Wed Jul 01, 2015 10:58 pm

Well now, that is really the goal of creating a good, meaning useable, scheme. I personally do not follow any external rule set. The more you do it, the more experience is gained on what *color # affects what when in use. Those pieces together will give you a great palette.

It's just so subjective.

I'm sure none of this helps at all, but it did pass the time while on the train

Work hard; Complain less

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: Color relationships in Xdefaults

Unread post by wuxmedia » Thu Jul 02, 2015 6:53 am

I find using variations on the brutal 'standard' colours usually work OK with each other.
But as the Dkegorator noted, get the colours on the screen, fire up your fav term apps and see what happens.
Even with that though I find htop needs a light black, for some reason declares 'color0 or 8' as the readouts. some apps default to that black as the background also, so that lighter black looks weird.
the other annoying one is a coloured dir listing, old ntfs files permissions seem to end up being yellow on green which is unreadable even with a normalish scheme.
so yeah - those are my morning thoughts...
"Seek, and Ye shall find"
"Github | Chooons | Site"

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Color relationships in Xdefaults

Unread post by machinebacon » Fri Jul 03, 2015 5:38 am

I agree with the colleagues above. The only really 'easy' way is to make variations on the default color scheme, the 'hard' way is to manually go through them and try with a set of CLI applications. I usually test with mc, calcurse, nano and emacs-nox. I think there are no design guidelines for terminal Xresources (there are some for toolkits, for example like the GNOME Human Interface Guidelines, where the Tango theme is something that should work across platforms and OS and where the color scheme of the desktop is found in the terminal colors).

So it seems that personal preference makes a good design (solarized seems to tick many boxes).
..gnutella..

User avatar
a-109-107
Riesenpenis
Posts: 30
Joined: Thu May 21, 2015 9:04 am

Re: Color relationships in Xdefaults

Unread post by a-109-107 » Fri Jul 03, 2015 10:41 am

Dear all, thank you for the thorough replies. Indeed seems like we have a consensus that there is no way but to do it by trial and error. The reason I was aksing in the first place is that I wrote a script (gvim-to-xcolors here) that generates Xdefaults color lists from gvim themes. Given the hit and miss quality of the results, I was hoping to find a governing rule that I could implement there.

machinebacon
Baconator
Posts: 10253
Joined: Thu Sep 16, 2010 11:03 am
Location: Pfälzerwald
Contact:

Re: Color relationships in Xdefaults

Unread post by machinebacon » Fri Jul 03, 2015 12:15 pm

It will always be hard to create an acceptable contrast with all xcolor combinations -- I guess the most important one for dialog-related TUIs are color4 in possible high contrast to *foreground and *color7. If you have any news or you could find some info, please keep us updated. At least I would be very interested in design guidelines, especially with regards to human factors and accessibility.
..gnutella..

User avatar
simgin
Meme Fodder
Posts: 1167
Joined: Sun Jan 06, 2013 12:07 am
Location: Bradford-on-Avon, UK

Re: Color relationships in Xdefaults

Unread post by simgin » Sun Jul 05, 2015 10:49 pm

^^ That is very cool mate. I have just started to use gvim as well, and loving it :)
And thanks for your link on github to this guy, I think other i3 users here will like it :D
http://charlesleifer.com/blog/using-pyt ... op-themes/
Sweet!

cheers
simon
Someone told me that I am delusional, I almost fell off my unicorn.

User avatar
a-109-107
Riesenpenis
Posts: 30
Joined: Thu May 21, 2015 9:04 am

Re: Color relationships in Xdefaults

Unread post by a-109-107 » Mon Jul 06, 2015 12:09 pm

simgin wrote:
Yes, Leifer's script is what I used earlier, but there's a maintained version called themer

Post Reply