News for hackers. Stuff that matters.
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'