News for hackers. Stuff that matters.
Re:4bit - Terminal Color Scheme Designer by ciembor on Tuesday August 21, 2012 @06:46AM (#4412112)
Hi all. I think I did something cool and I want to share it with you. Who loves Linux knows, that customizing things sometimes takes too much time. Customizing terminal color schemes is one of these things. I present you the 4bit - Terminal Color Scheme Designer, which allows you to create your own theme and generate .Xresources / .Xdefaults config in just few minutes:). Thanks for voting, digging, tweeting, liking or whatever - I really appreciate it! Enjoy. :)
Re:4bit - Terminal Color Scheme Designer by decklin on Tuesday August 21, 2012 @11:01AM (#4412964)
I'd like to be able to drag the two thumbs on each "Lightness" slider past each other, to invert the usual relationship. (Just splitting them into two sliders each would be fine.) Otherwise, this is really great.
Re:4bit - Terminal Color Scheme Designer by ericclemmons on Tuesday August 21, 2012 @07:34AM (#4412211)
Great work! I just sent this off to my team so we can all enjoy a much friendlier color scheme :)

I wonder if most engineers find the terminal unpleasant to look at, or is it mostly the "artsy" engineers that are bothered by it...

Re:4bit - Terminal Color Scheme Designer by mattgreenrocks on Tuesday August 21, 2012 @10:00AM (#4412709)
Most editor/terminal color schemes are terrible, full stop. Color splashed everywhere without a thought.

Solarized is one of the few that looks decent, but I don't agree with the deep blue.

Re:4bit - Terminal Color Scheme Designer by BoppreH on Tuesday August 21, 2012 @09:02AM (#4412471)
I have a virtual machine with no X11 and wanted to use the Solarized color scheme in my CLI programs, so I replaced the default 16 colors this way:

  (.bashrc)

  if [ "$TERM" = "linux" ]; then
      echo -en "\e]P0002b36"
      echo -en "\e]P1073642"
      echo -en "\e]P2586e75"
      echo -en "\e]P3657b83"
      echo -en "\e]P4839496"
      echo -en "\e]P593a1a1"
      echo -en "\e]P6eee8d5"
      echo -en "\e]P7fdf6e3"
      echo -en "\e]P8b58900"
      echo -en "\e]P9cb4b16"
      echo -en "\e]PAdc322f"
      echo -en "\e]PBd33682"
      echo -en "\e]PC6c71c4"
      echo -en "\e]PD268bd2"
      echo -en "\e]PE2aa198"
      echo -en "\e]PF859900"
      clear
  fi
I'm still shuffling them around, but it has worked pretty well. The nicest thing is that all my programs now support the color scheme.
Re:4bit - Terminal Color Scheme Designer by xfs on Tuesday August 21, 2012 @01:47PM (#4413794)
This is just changing the palette of fbcon. Kernel parameters vt.default_{red,grn,blu}= do the same thing. I used to add this tango color scheme in grub:

    GRUB_CMDLINE_LINUX="vt.default_red=0,204,78,196,52,117,6,170,85,239,138,252,114,173,52,211 vt.default_grn=0,0,154,160,101,80,152,170,87,41,226,233,159,127,226,215 vt.default_blu=0,0,6,0,164,123,154,170,83,41,52,79,207,168,226,207"
Recently I found I could avoid polluting /proc/cmdline by changing the palette later in booting by setting it via sysfs in /etc/default/console-setup (or equivalent ones of your distros):

    echo 0,204,78,196,52,117,6,170,85,239,138,252,114,173,52,211 >/sys/module/vt/parameters/default_red
    echo 0,0,154,160,101,80,152,170,87,41,226,233,159,127,226,215 >/sys/module/vt/parameters/default_grn
    echo 0,0,6,0,164,123,154,170,83,41,52,79,207,168,226,207 >/sys/module/vt/parameters/default_blu
    echo -n '\033]R'
Re:4bit - Terminal Color Scheme Designer by dhimes on Tuesday August 21, 2012 @02:39PM (#4414076)
So, this is a really embarrassing question: is there a reliable guide for how to use these? I've been googling, (and DDGing and Ecosia-ing), but everything seems to be out of date. I don't have, for instance, a .Xresources file. At least not one that 'locate' can find.

Or do these commands go in .bashrc? or .vimrc? Thanks.

Re:4bit - Terminal Color Scheme Designer by pyre on Tuesday August 21, 2012 @03:51PM (#4414426)
You just create a ~/.Xresources file and when you log into X11, the session should source that file.

You can also force-load it (into your current X11 session) with:

  xrdb -merge ~/.Xresources
or

  xrdb -load ~/.Xresources
It's also possible to put it in the ~/.Xdefaults file, though I'm not sure what the difference is.
Re:4bit - Terminal Color Scheme Designer by ciembor on Tuesday August 21, 2012 @04:44PM (#4414695)
.Xdefaults do the same thing, but it looks this file is deprecated. I may recomend the Arch Linux Wiki: https://wiki.archlinux.org/index.php/X_resources .
Re:4bit - Terminal Color Scheme Designer by dhimes on Tuesday August 21, 2012 @05:15PM (#4414819)
Thank you both.
Re:4bit - Terminal Color Scheme Designer by kibwen on Tuesday August 21, 2012 @08:57AM (#4412451)
Here's the source for that colors.sh script shown emulated in the demo:

http://code.google.com/p/iterm2/source/browse/trunk/tests/co...

Oddly, the author didn't include it in the 4bit Github repo. Run the script for yourself to compare against your current color scheme.

Re:4bit - Terminal Color Scheme Designer by ciembor on Tuesday August 21, 2012 @09:08AM (#4412503)
Good point! I was inspired by this topic on Arch Linux forum - https://bbs.archlinux.org/viewtopic.php?id=51818&p=1. There are more similar scripts.
Re:4bit - Terminal Color Scheme Designer by nathan_f77 on Tuesday August 21, 2012 @08:04AM (#4412289)
That's a pretty cool site! On a related note: I wrote a little bash color reference script, which is a useful reference whenever you want to add a bit of color to your scripts: http://madebynathan.com/2011/08/15/bash-color-index/
Re:4bit - Terminal Color Scheme Designer by andreasvc on Tuesday August 21, 2012 @07:50AM (#4412247)
While you're at it, consider switching to a 256-color terminal.
Re:4bit - Terminal Color Scheme Designer by mindslight on Tuesday August 21, 2012 @12:21PM (#4413388)
Changing the base 16 colors of a 256-color terminal is still useful. I started overhauling my colors a few weeks ago, and decided that the best approach is to colorize most things using the 16-color palette and adjusting that to look nice, rather than eg setting LS_COLORS to spit out high colors. This gets me immediate results for programs/hosts I haven't customized, and less degradation if I happen to be using a less capable terminal.
Re:4bit - Terminal Color Scheme Designer by andreasvc on Tuesday August 21, 2012 @12:57PM (#4413548)
Indeed, they are complementary. The basic 16 colors can be configured globally by the terminal which is convenient. 256 colors has to be supported by the particular application but I mostly care about the vim scheme anyway. I have a scheme which uses multiple shades of gray so as not be as distracting as the typical syntax highlighting `salad.'
Re:4bit - Terminal Color Scheme Designer by sp4rki on Tuesday August 21, 2012 @08:22AM (#4412340)
Makes me kind of sad that I got used to the Solarized color scheme already (I use it in VIM, iTerm, Visual Studio etc... ), so I have no use for customizing my color schemes any further. I'd love to use this :(
Re:4bit - Terminal Color Scheme Designer by __alexs on Tuesday August 21, 2012 @08:37AM (#4412387)
I don't get why people like Solarized. It's way too low contrast in every dimension for my particular flavour of colour blindness. Maybe it's just a particularly pessimal colour scheme for me :(

(Also the designer appears to have based one of the key colour choices on his memories of almost drowning to death as a child. http://www.metafilter.com/102504/Solarized#3636286)

Re:4bit - Terminal Color Scheme Designer by sp4rki on Tuesday August 21, 2012 @09:12AM (#4412517)
Oh but I'm not color blind :)

Also solarized comes with various different "contrast versions" have you tried them all? By the way, what's your choice in color scheme being color blind and all?

Re:4bit - Terminal Color Scheme Designer by __alexs on Tuesday August 21, 2012 @09:36AM (#4412601)
I use the Gnome Tango colour scheme http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines where possible.

I find it has good contrast between colours in general. In particular I can actually read the blue it uses on a black background. Most of the colours have good contrast with each other even at extremely low saturation too.

For my vision there are some small tweaks I sometimes make to it but it is generally the most agreeable match to my abnormality I've found in a preset so far.

Re:4bit - Terminal Color Scheme Designer by ciembor on Tuesday August 21, 2012 @08:49AM (#4412418)
Personaly I'm in love with Monokai: https://twitter.com/#!/ciembor/media/slideshow?url=pic.twitt.... But I think even the most beloved themes bores after some time:).
Re:4bit - Terminal Color Scheme Designer by sp4rki on Tuesday August 21, 2012 @09:10AM (#4412510)
Ohhh boy you brought back memories of Textmate for me! I used to use Monokai also. Great color scheme! Loved it until I found a need to have a bit less contrast in my code. For some reason I got so used to the contrast that I only saw stuff in the pink/fushia and my mind completely ignored the rest.
Re:4bit - Terminal Color Scheme Designer by tzaman on Tuesday August 21, 2012 @09:35AM (#4412593)
Nice, although I prefer "solarized" http://ethanschoonover.com/solarized blinks theme with zsh
Re:4bit - Terminal Color Scheme Designer by ciembor on Tuesday August 21, 2012 @05:52PM (#4414996)
Attention please! There was a bug:D. Magenta was inverted with cyan. It's corrected now. Sorry for any problems.
Re:4bit - Terminal Color Scheme Designer by hhimanshu on Wednesday August 22, 2012 @12:46AM (#4416081)
I did what is mentioned, but nothing happens

Go to http://ciembor.github.com/4bit. Design your terminal look. Click .Xresources button and save it to ~/.Xresources. Run xrdb ~/.Xresources. Get back to work (or to the first step).

Re:4bit - Terminal Color Scheme Designer by ciembor on Wednesday August 22, 2012 @08:14AM (#4416945)
Someone on polish wykop.pl told me, that this way works only with terminals based on libXt (for example xterm, aterm, eterm, urxvt). Someone else want to contribute and write export to other terminals, that would be very nice:). If you want to use these colors right now, you may just copy hex codes into your terminal's configuration.
Re:4bit - Terminal Color Scheme Designer by wickedchicken on Tuesday August 21, 2012 @12:12PM (#4413334)
Re:4bit - Terminal Color Scheme Designer by tominated on Tuesday August 21, 2012 @09:47AM (#4412654)
Pretty awesome. One thing that puzzles me is that the preview is showing a fish prompt, but it only outputs an Xresources file.
Re:4bit - Terminal Color Scheme Designer by richo on Tuesday August 21, 2012 @07:05AM (#4412153)
This is brilliant. Awesome work dude.
Re:4bit - Terminal Color Scheme Designer by ciembor on Tuesday August 21, 2012 @07:12AM (#4412167)
Thanks! I spent the last three days coding this, and now I only hope it will stand out anywhere:).
Re:4bit - Terminal Color Scheme Designer by krat0sprakhar on Tuesday August 21, 2012 @07:32AM (#4412208)
Thanks for sharing this! This looks awesome.
Re:4bit - Terminal Color Scheme Designer by donniezazen on Tuesday August 21, 2012 @05:14PM (#4414815)
Very cool.
Re:4bit - Terminal Color Scheme Designer by rjzzleep on Tuesday August 21, 2012 @08:25AM (#4412347)
genius