Console Theme Switcher

Submitted scripts and programs
Forum rules
Your own work only.
User avatar
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

Console Theme Switcher

Unread post by DebianJoe » Mon Oct 28, 2013 5:22 am

Wux and I started a fun project today that translates some of our favorite Xcolors(Xresources) to Console escapes via a little script that I whipped up just so that I could quickly tweak and reapply themes.

Code: Select all

#!/bin/bash

# Switching FBTerm Color Themes from Wuxmedia and DebianJoe
# of the LinuxBBQ.

if [ $# -lt 1 ]; then
   echo "Run script as 'theme <name_of_theme>'"
   echo "available themes"
   echo "'ilight' = Baskerville's Ivory Light"
   echo "'insig' = Baskerville's Insignificato"
   echo "'mono' = Wuxmedia's Mono"
   echo "'cvc' = Baskerville's Count von Count"
   echo "'vblue' = Gutterslob's Visiblue"
   echo "'matrix' = !OK100's Matrix"
   echo "'fside' = Baskerville's FarSide"
else
case "$1" in
    "ilight")
	    # Console colors -Baskerville - IvoryLight-
	    echo -en "\e]P0FEF9EC" #background
	    echo -en "\e]P8C5C1B4" #darkgrey
	    echo -en "\e]P1E75C58" #darkred
	    echo -en "\e]P9B22B31" #red
	    echo -en "\e]P200A250" #darkgreen
	    echo -en "\e]PA007427" #green
	    echo -en "\e]P3A08A00" #brown
	    echo -en "\e]PB715F00" #yellow
	    echo -en "\e]P4208FFB" #darkblue
	    echo -en "\e]PC0065CA" #blue
	    echo -en "\e]P5D160C4" #darkmagenta
	    echo -en "\e]PDA03196" #magenta
	    echo -en "\e]P600A4C1" #darkcyan
	    echo -en "\e]PE007693" #cyan
	    echo -en "\e]P73E424D" #lightgrey
	    echo -en "\e]PF282C36" #white
	    clear #for background artifacting
	    ;;
    "insig")
	    # Console colors -Insignificato-
	    echo -en "\e]P0111111" #background
	    echo -en "\e]P85a5b5c" #darkgrey
	    echo -en "\e]P1755a5b" #darkred
	    echo -en "\e]P9a37679" #red
	    echo -en "\e]P268755a" #darkgreen
	    echo -en "\e]PA87a376" #green
	    echo -en "\e]P3756e5a" #brown
	    echo -en "\e]PBa39b76" #yellow
	    echo -en "\e]P45b6976" #darkblue
	    echo -en "\e]PC758ba3" #blue
	    echo -en "\e]P5755b76" #darkmagenta
	    echo -en "\e]PD9f76a3" #magenta
	    echo -en "\e]P65b7674" #darkcyan
	    echo -en "\e]PE75a3a1" #cyan
	    echo -en "\e]P7808080" #lightgrey
	    echo -en "\e]PFaeafb0" #white
	    clear #for background artifacting
	    ;;
    "mono")
	    ##Console Colours - Mono; Tweaked for console by WuxMedia
	    echo -en "\e]P0111111" #background
	    echo -en "\e]P8B0B0B0" #darkgrey
	    echo -en "\e]P15a5a5a" #darkred
	    echo -en "\e]P9636363" #red
	    echo -en "\e]P26B6B6B" #darkgreen
	    echo -en "\e]PAA5A5A5" #green
	    echo -en "\e]P3969696" #brown
	    echo -en "\e]PBE5E5E5" #yellow
	    echo -en "\e]P45a5a5a" #darkblue
	    echo -en "\e]PC6c6c6c" #blue
	    echo -en "\e]P5717171" #darkmagenta
	    echo -en "\e]PD757575" #magenta
	    echo -en "\e]P6777777" #darkcyan
	    echo -en "\e]PEC4C4C4" #cyan
	    echo -en "\e]P7FFFFFF" #lightgrey
	    echo -en "\e]PFDEDEDE" #white
	    clear #for background artifacting
	    ;;
    "cvc")
	    ##Console Colors - Baskerville - Count Von Count;
	    #tweaked for console by DJ: TODO higher contrast
	    echo -en "\e]P0303030" #background
	    echo -en "\e]P85E5E5E" #darkgrey
	    echo -en "\e]P1C10023" #darkred
	    echo -en "\e]P9FF8781" #red
	    echo -en "\e]P2A83334" #darkgreen
	    echo -en "\e]PAFFA095" #green
	    echo -en "\e]P3B51D2C" #brown
	    echo -en "\e]PBFF948B" #yellow
	    echo -en "\e]P48C4B46" #darkblue
	    echo -en "\e]PCFEB2AA" #blue
	    echo -en "\e]P57D534F" #darkmagenta
	    echo -en "\e]PDEBBBB5" #magenta
	    echo -en "\e]P69A413D" #darkcyan
	    echo -en "\e]PEFFAAA0" #cyan
	    echo -en "\e]P7C6C6C6" #lightgrey
	    echo -en "\e]PFFFFFFF" #white
	    clear #for background artifacting
	    ;;
    "vblue")
	    ## Console Colors - Gutterslob Visiblue
	    echo -en "\e]P0000000" #background
	    echo -en "\e]P8333399" #darkgrey
	    echo -en "\e]P16666CC" #darkred
	    echo -en "\e]P99999FF" #red
	    echo -en "\e]P20099CC" #darkgreen
	    echo -en "\e]PA00CCFF" #green
	    echo -en "\e]P33366CC" #brown
	    echo -en "\e]PB6699FF" #yellow
	    echo -en "\e]P4006699" #darkblue
	    echo -en "\e]PC0099CC" #blue
	    echo -en "\e]P50066FF" #darkmagenta
	    echo -en "\e]PD0099FF" #magenta
	    echo -en "\e]P6669999" #darkcyan
	    echo -en "\e]PE66CCCC" #cyan
	    echo -en "\e]P799CCCC" #lightgrey
	    echo -en "\e]PFCCFFFF" #white
	    clear #for background artifacting
	    ;;
    "matrix")
	    ## Console Colors - !OK-100 Matrix
	    echo -en "\e]P0000000" #background
	    echo -en "\e]P8000000" #darkgrey
	    echo -en "\e]P155FF55" #darkred
	    echo -en "\e]P955FF55" #red
	    echo -en "\e]P200CC00" #darkgreen
	    echo -en "\e]PA55FF55" #green
	    echo -en "\e]P300CC00" #brown
	    echo -en "\e]PB55FF55" #yellow
	    echo -en "\e]P4005500" #darkblue
	    echo -en "\e]PC005500" #blue
	    echo -en "\e]P555FF55" #darkmagenta
	    echo -en "\e]PD55FF55" #magenta
	    echo -en "\e]P600CC00" #darkcyan
	    echo -en "\e]PE55FF55" #cyan
	    echo -en "\e]P700CC00" #lightgrey
	    echo -en "\e]PF00CC00" #white
	    clear #for background artifacting
	    ;;
    "fside")
	    ## Console Colors - FarSide - Baskerville
	    echo -en "\e]P0303030" #background
	    echo -en "\e]P85E5E5E" #darkgrey
	    echo -en "\e]P1A43261" #darkred
	    echo -en "\e]P9FF9FC9" #red
	    echo -en "\e]P2006CA5" #darkgreen
	    echo -en "\e]PA3BD6FF" #green
	    echo -en "\e]P3007086" #brown
	    echo -en "\e]PB00DDF4" #yellow
	    echo -en "\e]P46751A6" #darkblue
	    echo -en "\e]PCD5B8FF" #blue
	    echo -en "\e]P5913E88" #darkmagenta
	    echo -en "\e]PDFFA7F6" #magenta
	    echo -en "\e]P60061B1" #darkcyan
	    echo -en "\e]PE93C9FF" #cyan
	    echo -en "\e]P7C6C6C6" #lightgrey
	    echo -en "\e]PFFFFFFF" #white
	    clear #for background artifacting
	    ;;
    *)
	    echo "No valid theme chosen"
	    echo "call the script without arguments"
	    echo "for a list of themes"
	    ;;
esac
fi
You can get it quickly by

Code: Select all

curl https://raw.github.com/DebianJoe/consolecolor/master/theme > Whatever_you_want_to_call_it.
and just chmod the script to be executable.

It's ran as "whatever_you_want_to_call_it <theme_name>" and if you don't specify a theme, it lists out the ones we've ported across so far. We would (I would) gladly accept improvements, modifications, or just themes that you'd like to see included.

Examples:
Image
Insignificato in an fbterm
Image
Visiblue in standard console
Image
Quickly shifted to Ivory Light.

Have fun, provide feedback, put in pull requests, send hate mail. ;)

Edit: Also, I'm going to be making changes to this pretty often, so the posted script will probably be out of date in the next 10 minutes. Should I move this to it's own repository so that we can version control everyone's additions?
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

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

Re: Console Theme Switcher

Unread post by machinebacon » Mon Oct 28, 2013 5:52 am

I would +1 a git
..gnutella..

User avatar
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

Re: Console Theme Switcher

Unread post by DebianJoe » Mon Oct 28, 2013 6:11 am

Ok, I edited the first post to allow people who just want to use the themes to curl the raw script's data.

If you wish to participate in adding/editing/updating/screaming/breaking/etc/

Code: Select all

git clone https://github.com/DebianJoe/consolecolor
All credit where credit is due, and if you don't like working with git, then just post whatever you want added here and I'm sure someone will add it and credit the theme artist and you for the porting in the README.
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: Console Theme Switcher

Unread post by rhowaldt » Mon Oct 28, 2013 9:17 am

*applause*
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

User avatar
GekkoP
Emacs Sancho Panza
Posts: 5878
Joined: Tue Sep 03, 2013 7:05 am

Re: Console Theme Switcher

Unread post by GekkoP » Mon Oct 28, 2013 9:46 am

Very nice one.
I might add a couple of themes, though two of my usual ones are already there.

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

Re: Console Theme Switcher

Unread post by wuxmedia » Mon Oct 28, 2013 10:02 am

sweet! well coded sir!
"Seek, and Ye shall find"
"Github | Chooons | Site"

User avatar
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

Re: Console Theme Switcher

Unread post by DebianJoe » Mon Oct 28, 2013 10:41 am

I added a few more themes to the master, and noticed that although we're getting all of the escapes in each one, there's a great variety in the ordering and commenting. I know that some people with OCD (*cough* RHOWALDT *cough*) will start gnawing at the desk if we don't come to an agreement on standards. I opened up an issue on the github "issues" page for this repo. Please provide feedback as to how you'd like to see it done, and then we'll try to make sure that all future additions maintain the standard. For the time being, I've adopted Wux's system for commenting and made the changes to the originally posted script.
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

User avatar
rhowaldt
Dog
Posts: 4565
Joined: Wed Oct 17, 2012 9:01 am
Contact:

Re: Console Theme Switcher

Unread post by rhowaldt » Mon Oct 28, 2013 12:12 pm

of course my OCD, aside from being annoying, is also very practical. it ensures that things are easy to read and follow (the previous was written bij OCD-me, who wanted to justify his existence)
as far as standards go, it might be good to adopt Wux's system. while on the one hand he usually breaks things so it makes you wonder what will happen to this system of his, on the other he deserves our trust.
:)
All statements are true in some sense, false in some sense, meaningless in some sense, true and false in some sense, true and meaningless in some sense, false and meaningless in some sense, and true and false and meaningless in some sense.

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

Re: Console Theme Switcher

Unread post by wuxmedia » Mon Oct 28, 2013 12:54 pm

^yeah, the themes are mostly written in order of the original script, which seems to have been floating around the net for ages. So I wouldn't really call it 'my system'
It also seems to be in the same order as 3/4 of the xresources i've found. So it's, mostly, easier to copypasta.
But,
Using 0:8: 1:9: 2:A: 3:B is indeed way more neater, reads better.
I would encourage using the same color comments, so that L-users like me don't get lost in the matix. 8)

damn - it's the classic engineer problem, adopt an inelegant 'standard' or make the 'standard' standard.
I would, as a hunch go for your way.
I'm getting pretty good at reading single digit HEX now 8)

Another thing is background doesn't always mean color0 in there shell.
I mean xresources can have back, and foreground attributes.
Where the FB seemingly cannot. So themer will often need to make edits...
"Seek, and Ye shall find"
"Github | Chooons | Site"

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

Re: Console Theme Switcher

Unread post by dkeg » Mon Oct 28, 2013 1:07 pm

that's a great idea. What I do ...
created a .colors directory with all kinds of xres color themes. In .Xresources have an include followed by items that more or less stay static. All I have to do is change the include file to point to a different .color file. Of course I have aliases to expedite,


Having a script is very cool though and a great project.

Work hard; Complain less

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

Re: Console Theme Switcher

Unread post by machinebacon » Mon Oct 28, 2013 1:08 pm

Question: how should we coordinate, to prevent double work? (so that there are no duplicates)
Proposal:
- if somebody starts to work on a theme, he/she should announce it
- if somebody wants to have a certain theme featured, he/she can ask for it

Okay or not?
..gnutella..

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

Re: Console Theme Switcher

Unread post by dkeg » Mon Oct 28, 2013 1:21 pm

^works. Maybe add this one. Matches NumixBrown. Famous gslob theme of course

Code: Select all

!!!! Gslob nature-suede !!!!

!*background:      [90]#170F0D
*background:       #170F0D
*foreground:        #746C48

*transparent:    0	
*shading:	        7 	
*fading:		30
*fadeColor:	#170F0D

*color0:           #392925
*color8:           #544B2E

*color1:           #98724C
*color9:           #AF652F

*color2:           #908F32
*color10:          #C3C13D

*color3:           #AA964C
*color11:          #C8B55B

*color4:           #7B854E
*color12:          #70A16C

*color5:           #6B5644
*color13:          #98724C

*color6:           #5C5142
*color14:          #778725

*color7:           #C8B55B
*color15:          #E4DC8C

Work hard; Complain less

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

Re: Console Theme Switcher

Unread post by machinebacon » Mon Oct 28, 2013 1:25 pm

Code: Select all

    "precision")
       # Console colors -Baconator - Precision-
       echo -en "\e]P0313131" #background
       echo -en "\e]P8AEA79F" #darkgrey
       echo -en "\e]P177216F" #darkred
       echo -en "\e]P9924D8C" #red
       echo -en "\e]P2772953" #darkgreen
       echo -en "\e]PA925475" #green
       echo -en "\e]P3DD4814" #brown
       echo -en "\e]PBE46D43" #yellow
       echo -en "\e]P45E2750" #darkblue
       echo -en "\e]PC7E5273" #blue
       echo -en "\e]P52C001E" #darkmagenta
       echo -en "\e]PD56334B" #magenta
       echo -en "\e]P69E7D96" #darkcyan
       echo -en "\e]PEBFA9B9" #cyan
       echo -en "\e]P7CECAC5" #lightgrey
       echo -en "\e]PFEFEDEC" #white
       clear #for background artifacting
       ;;
based on the Ubuntu color palette
..gnutella..

User avatar
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

Re: Console Theme Switcher

Unread post by DebianJoe » Mon Oct 28, 2013 1:56 pm

As long as you guys are cool with pushing straight though git, we can go that route as it's easier to manage. I like the idea of letting each other know that we're working on a port of a theme so that two people aren't doing it at the same time. If you want me to simply copy-paste and format something here, then just add a note that says something like
"JOE, add this one for me!!!!!!"

^^Bacon's formatting is what I've standardized on...makes sense, seems simple. Roll with it.

Edit: @dkeg, for .Xresources, that works fine. This will work for echoing a theme into a live CONSOLE session (not in X), so even though we could break it up into smaller scripts, it's a neat way to just shop for themes you like....could do it with X too....and I'll probably follow suit with .diffs for source based terminals in the future as well. ;)
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

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

Re: Console Theme Switcher

Unread post by machinebacon » Mon Oct 28, 2013 1:58 pm

Duly noted, thanks!
..gnutella..

User avatar
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

Re: Console Theme Switcher

Unread post by DebianJoe » Mon Oct 28, 2013 2:27 pm

Note: Merging Dkeg's and MB's additions to this thread in killx manually (M^x C^a -> C^Y)...so I have it covered up to this point.
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

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

Re: Console Theme Switcher

Unread post by machinebacon » Tue Oct 29, 2013 2:58 am

Code: Select all

    "cuppa")
       # Console colors - Baconator - Cuppa -
       echo -en "\e]P0170F0D" #background
       echo -en "\e]P8353535" #darkgrey
       echo -en "\e]P1443322" #darkred
       echo -en "\e]P9AA7755" #red
       echo -en "\e]P25A5A46" #darkgreen
       echo -en "\e]PAAAAA99" #green
       echo -en "\e]P3997766" #brown
       echo -en "\e]PBDDDDCC" #yellow
       echo -en "\e]P446515A" #darkblue
       echo -en "\e]PCBBBBBB" #blue
       echo -en "\e]P5442C22" #darkmagenta
       echo -en "\e]PDCCBBAA" #magenta
       echo -en "\e]P6BBBBBB" #darkcyan
       echo -en "\e]PEDDDDDD" #cyan
       echo -en "\e]P7C2B9B5" #lightgrey
       echo -en "\e]PFD9D9D9" #white
       clear #for background artifacting
       ;;
dropping it here temporarily ;) based on gekko's screenshot, high contrast with dark brown background and cream foreground, blue is brushed steel ;)
Attachments
cuppa.png
..gnutella..

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

Re: Console Theme Switcher

Unread post by machinebacon » Tue Oct 29, 2013 3:23 am

Code: Select all

 "scm")
       # Console colors - Baconator - Scotch Cut Mixture -
       echo -en "\e]P0050505" #background
       echo -en "\e]P85E5D68" #darkgrey
       echo -en "\e]P14E313F" #darkred
       echo -en "\e]P9C1889F" #red
       echo -en "\e]P25E657B" #darkgreen
       echo -en "\e]PA6B7B98" #green
       echo -en "\e]P3745B4A" #brown
       echo -en "\e]PB907B4D" #yellow
       echo -en "\e]P43A3A3A" #darkblue
       echo -en "\e]PC1A1A1A" #blue
       echo -en "\e]P53D2A33" #darkmagenta
       echo -en "\e]PD695974" #magenta
       echo -en "\e]P6435060" #darkcyan
       echo -en "\e]PE2F323E" #cyan
       echo -en "\e]P79D9592" #lightgrey
       echo -en "\e]PFDCD9BA" #white
       clear #for background artifacting
       ;;
Palette taken from a tin of Samuel Gawith's Scotch Cut Mixture, a blend with Burley, Cavendish, Virginias and Latakia. And no fucks were given that day.
Attachments
scm.png
..gnutella..

User avatar
DebianJoe
Frame Buffer
Posts: 1915
Joined: Mon Jul 01, 2013 5:41 am
Location: emacs.d

Re: Console Theme Switcher

Unread post by DebianJoe » Tue Oct 29, 2013 3:35 am

Starting the Port for Doomicide's Dark ocean, http://xcolors.net/dl/DOOMICIDE%20darkocean and Rooster's SOS http://xcolors.net/dl/Rooster%20-%20SOS. Anxiously awaiting a pull request from Bacon (gayest sounding, but totally serious comment of the day.) :D
|>>BBQ Roaster, Alpha Branch<< | >> clinky << | >> X11 must die << |
Thanks BASIC

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

Re: Console Theme Switcher

Unread post by machinebacon » Tue Oct 29, 2013 3:47 am

^ lol :D Yes, will come soon, got some serious work to do first :D
..gnutella..

Post Reply