Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I found it easier to tune the 16 color palette in each of my various terminal apps than to try and get application-side terminal codes just right.

In my ~/.Xdefaults for rxvt-unicode:

    ! yellow
    Rxvt*color3:rgb:F5/79/00
    ! magenta
    Rxvt*color5:rgb:AD/7F/A8
    ! cyan
    Rxvt*color6:rgb:88/8A/85
    ! white
    Rxvt*color7:rgb:BA/BD/B6
    ! ...
And in my custom theme .el:

    (if (display-graphic-p)
        (setq color-yellow "#f57900"
              color-bright-yellow "#fce94f"
              color-red "#ff6464"
              color-bright-red "#ef2929"
              ...
              color-cyan "#888a85")
      (setq color-black "black"
            color-white "white"
            ...
            color-bright-magenta "brightmagenta"))
I then use these to set various faces

     `(minibuffer-prompt
       ((t (:foreground ,color-blue))))
     `(highlight
       ((t (:background ,color-bright-yellow))))
     `(region
       ((t (:background ,color-bright-blue))))
     `(shadow
       ((t (:foreground ,color-bright-cyan))))
     `(secondary-selection
       ((t (:background ,color-bright-magenta))))
etc.

As a bonus, colored `ls` output etc. is nicer too. The raw 16 color palette is too saturated and often has bad contrast.



> (if (display-graphic-p)

This right here. Emacs actually supports graphical output (X11, Cocoa, Win32). Additional bonuses include: Esc is actually Esc; you can bind Ctrl+Shift or Cmd; you can use more than one font at a time; you can display a picture; change the shape of the cursor... It's like a time machine that takes you 20 years forward - into 1989.


There is, however, considerable upside in having all the same key bindings whether you're in local UI (maybe using tramp) or ssh to a remote server. Tramp has limitations and is a bit clunky so I use it rarely.

Clipboard integration and mouse cursor support are the two reasons I generally break out emacs-ui (my shell script for it), otherwise it's emacs-nox, generally.


It was saturated because older TTL displays did not allow for anything else!

The red wire was a lot of red, and only red, or nothing and when the intensity wire is added, 100 percent red happened. Wash, rinse, repeat


`ls` actually supports 24 bit color if you put the sequences in DIRCOLORS


Yep. I just tune the 16-color palette in Terminology (it's an INI file) to my preferred theme for the same styling in the console and terminal applications (vim).


Yah, I do pretty much the same thing. The default colours are far too dark for the dark background, so I just increase the luminance of all the colours.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: