View on GitHub

Highlighting-colors

Download this project as a .zip file Download this project as a tar.gz file

Here is simple ~/.Xresources file that could be found in some urxvt-configuring forum topics or in someone dotfiles git-repo.

! black
*color0:  #2E3436
*color8:  #555753
! red
*color1:  #a40000
*color9:  #EF2929
! green
*color2:  #4E9A06
*color10: #8AE234
! yellow
*color3:  #C4A000
*color11: #FCE94F
! blue
*color4:  #3465A4
*color12: #729FCF
! purple
*color5:  #75507B
*color13: #AD7FA8
! orange (replaces cyan)
*color6:  #ce5c00
*color14: #fcaf3e
! white
*color7:  #babdb9
*color15: #EEEEEC

It is just nothing but strings, it could be fine and could be disgusting. Who knows?

So question is: how to convert this meager text to something colorfull? highlighting-colors's aim is convert any text file with #rrggbb colors to html file with set background and foreground colors (if they're mentioned in theme).

Let's save it to ~/tmp/Xresources and run highlighting-colors:

$> highlighting-colors ~/tmp/Xresources

Now open generated html:

$> firefox ~/tmp/Xresources.html

Voila!