SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#26 2011-06-12 22:42:39

FlyHigh
#! Member
Registered: 2011-05-07
Posts: 51

Re: ANSI colorschemes scripts

muzieca wrote:

>>>FlyHigh
I'm using terminator + Terminus font in the screenshot below, but the lines problem are not occurred.
vOTB5MQ
Would you please tell us, the font and the terminal emulator that you are using on your screenshot?
I hope there is a way out for your problem. smile

Its working now, the problem was with the font.
I was using tamsyn, but am now using terminus, and it works fine.
Thanks

Offline

Be excellent to each other!

#27 2011-06-13 04:26:58

muzieca
#! Die Hard
From: /home
Registered: 2010-08-28
Posts: 1,152

Re: ANSI colorschemes scripts

Yeah, the almighty Terminus is never disappointing. big_smile


Life is really simple, but we insist on making it complicated. --Confucius--

Offline

#28 2011-06-14 07:59:37

muzieca
#! Die Hard
From: /home
Registered: 2010-08-28
Posts: 1,152

Re: ANSI colorschemes scripts

Another one, Hope you like it. smile
vOTIxMg

#!/bin/sh

# ANSI Color -- use these variables to easily have different color
#    and format output. Make sure to output the reset sequence after 
#    colors (f = foreground, b = background), and use the 'off'
#    feature for anything you turn on.

initializeANSI()
{
  esc=""

  blackf="${esc}[30m";   redf="${esc}[31m";    greenf="${esc}[32m"
  yellowf="${esc}[33m"   bluef="${esc}[34m";   purplef="${esc}[35m"
  cyanf="${esc}[36m";    whitef="${esc}[37m"
  
  blackb="${esc}[40m";   redb="${esc}[41m";    greenb="${esc}[42m"
  yellowb="${esc}[43m"   blueb="${esc}[44m";   purpleb="${esc}[45m"
  cyanb="${esc}[46m";    whiteb="${esc}[47m"

  boldon="${esc}[1m";    boldoff="${esc}[22m"
  italicson="${esc}[3m"; italicsoff="${esc}[23m"
  ulon="${esc}[4m";      uloff="${esc}[24m"
  invon="${esc}[7m";     invoff="${esc}[27m"

  reset="${esc}[0m"
}

# note in this first use that switching colors doesn't require a reset
# first - the new color overrides the old one.

initializeANSI

cat << EOF

 ${redf}▀ █${reset} ${boldon}${redf}█ ▀${reset}   ${greenf}▀ █${reset} ${boldon}${greenf}█ ▀${reset}   ${yellowf}▀ █${reset} ${boldon}${yellowf}█ ▀${reset}   ${bluef}▀ █${reset} ${boldon}${bluef}█ ▀${reset}   ${purplef}▀ █${reset} ${boldon}${purplef}█ ▀${reset}   ${cyanf}▀ █${reset} ${boldon}${cyanf}█ ▀${reset} 
 ${redf}██${reset}  ${boldon}${redf} ██${reset}   ${greenf}██${reset}   ${boldon}${greenf}██${reset}   ${yellowf}██${reset}   ${boldon}${yellowf}██${reset}   ${bluef}██${reset}   ${boldon}${bluef}██${reset}   ${purplef}██${reset}   ${boldon}${purplef}██${reset}   ${cyanf}██${reset}   ${boldon}${cyanf}██${reset}  
 ${redf}▄ █${reset}${boldon}${redf} █ ▄ ${reset}  ${greenf}▄ █ ${reset}${boldon}${greenf}█ ▄${reset}   ${yellowf}▄ █ ${reset}${boldon}${yellowf}█ ▄${reset}   ${bluef}▄ █ ${reset}${boldon}${bluef}█ ▄${reset}   ${purplef}▄ █ ${reset}${boldon}${purplef}█ ▄${reset}   ${cyanf}▄ █ ${reset}${boldon}${cyanf}█ ▄${reset}  

EOF

Life is really simple, but we insist on making it complicated. --Confucius--

Offline

#29 2011-06-15 14:50:03

pfh
#! CrunchBanger
Registered: 2011-03-09
Posts: 189

Re: ANSI colorschemes scripts

Let us try to keep this thread alive. big_smile

vOTJyaQ

#!/bin/sh

# ANSI Color -- use these variables to easily have different color
#    and format output. Make sure to output the reset sequence after 
#    colors (f = foreground, b = background), and use the 'off'
#    feature for anything you turn on.

initializeANSI()
{
  esc=""

  blackf="${esc}[30m";   redf="${esc}[31m";    greenf="${esc}[32m"
  yellowf="${esc}[33m"   bluef="${esc}[34m";   purplef="${esc}[35m"
  cyanf="${esc}[36m";    whitef="${esc}[37m"
  
  blackb="${esc}[40m";   redb="${esc}[41m";    greenb="${esc}[42m"
  yellowb="${esc}[43m"   blueb="${esc}[44m";   purpleb="${esc}[45m"
  cyanb="${esc}[46m";    whiteb="${esc}[47m"

  boldon="${esc}[1m";    boldoff="${esc}[22m"
  italicson="${esc}[3m"; italicsoff="${esc}[23m"
  ulon="${esc}[4m";      uloff="${esc}[24m"
  invon="${esc}[7m";     invoff="${esc}[27m"

  reset="${esc}[0m"
}

# note in this first use that switching colors doesn't require a reset
# first - the new color overrides the old one.

initializeANSI

cat << EOF

 ${redf}▒▒▒▒${reset} ${boldon}${redf}▒▒${reset}   ${greenf}▒▒▒▒${reset} ${boldon}${greenf}▒▒${reset}   ${yellowf}▒▒▒▒${reset} ${boldon}${yellowf}▒▒${reset}   ${bluef}▒▒▒▒${reset} ${boldon}${bluef}▒▒${reset}   ${purplef}▒▒▒▒${reset} ${boldon}${purplef}▒▒${reset}   ${cyanf}▒▒▒▒${reset} ${boldon}${cyanf}▒▒${reset} 
 ${redf}▒▒ ■${reset} ${boldon}${redf}▒▒${reset}   ${greenf}▒▒ ■${reset} ${boldon}${greenf}▒▒${reset}   ${yellowf}▒▒ ■${reset} ${boldon}${yellowf}▒▒${reset}   ${bluef}▒▒ ■${reset} ${boldon}${bluef}▒▒${reset}   ${purplef}▒▒ ■${reset} ${boldon}${purplef}▒▒${reset}   ${cyanf}▒▒ ■${reset} ${boldon}${cyanf}▒▒${reset}  
 ${redf}▒▒ ${reset}${boldon}${redf}▒▒▒▒${reset}   ${greenf}▒▒ ${reset}${boldon}${greenf}▒▒▒▒${reset}   ${yellowf}▒▒ ${reset}${boldon}${yellowf}▒▒▒▒${reset}   ${bluef}▒▒ ${reset}${boldon}${bluef}▒▒▒▒${reset}   ${purplef}▒▒ ${reset}${boldon}${purplef}▒▒▒▒${reset}   ${cyanf}▒▒ ${reset}${boldon}${cyanf}▒▒▒▒${reset}  

EOF

And inspired by Muzieca's last contribution
vOTJybA

#!/bin/sh

# ANSI Color -- use these variables to easily have different color
#    and format output. Make sure to output the reset sequence after 
#    colors (f = foreground, b = background), and use the 'off'
#    feature for anything you turn on.

initializeANSI()
{
  esc=""

  blackf="${esc}[30m";   redf="${esc}[31m";    greenf="${esc}[32m"
  yellowf="${esc}[33m"   bluef="${esc}[34m";   purplef="${esc}[35m"
  cyanf="${esc}[36m";    whitef="${esc}[37m"
  
  blackb="${esc}[40m";   redb="${esc}[41m";    greenb="${esc}[42m"
  yellowb="${esc}[43m"   blueb="${esc}[44m";   purpleb="${esc}[45m"
  cyanb="${esc}[46m";    whiteb="${esc}[47m"

  boldon="${esc}[1m";    boldoff="${esc}[22m"
  italicson="${esc}[3m"; italicsoff="${esc}[23m"
  ulon="${esc}[4m";      uloff="${esc}[24m"
  invon="${esc}[7m";     invoff="${esc}[27m"

  reset="${esc}[0m"
}

# note in this first use that switching colors doesn't require a reset
# first - the new color overrides the old one.

clear
initializeANSI

cat << EOF

 ${white}╔══════════════════════════════════════════════════════════════════╗
 ${white}║ ${redf}  ▄█ █▄${reset}    ${greenf}  ▄█ █▄${reset}    ${yellowf}  ▄█ █▄${reset}    ${bluef}  ▄█ █▄${reset}    ${purplef}  ▄█ █▄${reset}    ${cyanf}  ▄█ █▄${reset}   ${white}║
 ${white}║ ${boldon}${redf}▄█◄► ◄►█▄${reset}  ${boldon}${greenf}▄█◄► ◄►█▄${reset}  ${boldon}${yellowf}▄█◄► ◄►█▄${reset}  ${boldon}${bluef}▄█◄► ◄►█▄${reset}  ${boldon}${purplef}▄█◄► ◄►█▄${reset}  ${boldon}${cyanf}▄█◄► ◄►█▄${reset} ${white}║
 ${white}║ ${boldon}${redf}▀█    █▀${reset}  ${boldon}${greenf}▀█    █▀${reset}  ${boldon}${yellowf}▀█    █▀${reset}  ${boldon}${bluef}▀█    █▀${reset}  ${boldon}${purplef}▀█    █▀${reset}  ${boldon}${cyanf}▀█    █▀${reset} ${white}║
 ${white}║ ${redf}  ▀█ █▀${reset}    ${greenf}  ▀█ █▀${reset}    ${yellowf}  ▀█ █▀${reset}    ${bluef}  ▀█ █▀${reset}    ${purplef}  ▀█ █▀${reset}    ${cyanf}  ▀█ █▀${reset}   ${white}║
 ${white}╚══════════════════════════════════════════════════════════════════╝

EOF

Offline

#30 2011-06-15 15:46:40

muzieca
#! Die Hard
From: /home
Registered: 2010-08-28
Posts: 1,152

Re: ANSI colorschemes scripts

^Whoa, cool stuff man, i really love them! Nice!!!!!


Life is really simple, but we insist on making it complicated. --Confucius--

Offline

#31 2011-06-15 22:18:15

pfh
#! CrunchBanger
Registered: 2011-03-09
Posts: 189

Re: ANSI colorschemes scripts

muzieca wrote:

^Whoa, cool stuff man, i really love them! Nice!!!!!

Thanks man.

Offline

#32 2011-06-19 14:53:46

Him
#! Junkie
From: Here
Registered: 2010-03-31
Posts: 306
Website

Re: ANSI colorschemes scripts

Hi all. I didn't make this scheme, but it's been requested, so here you go. The true maker was crshd.

#!/bin/bash

  for f in {0..6}; do
    echo -en "\033[$((f+41))m\033[$((f+30))m██▓▒░"
  done
  echo -en "\033[37m██"

  echo -e "\n"

  for f in {0..6}; do
    echo -en "\033[$((f+41))m\033[1;$((f+30))m██▓▒░"
  done
  echo -en "\033[1;37m██"

  echo -e "\033[0m"

vOTR2cw

Last edited by Him (2011-06-19 15:12:55)


A world without what makes us, us. One without you or me.
A world with no differences, this is the world I see.

Offline

#33 2011-06-23 18:47:10

pfh
#! CrunchBanger
Registered: 2011-03-09
Posts: 189

Re: ANSI colorschemes scripts

@Him cool man. Thanks for the contribution. Appreciate.

Now.  May the force be with you
The initial part of the scripts is the same as those previously posted, so I am posting only what's between 'cat << EOF' and 'EOF'.

vOTc1dw

Darth Vader's TIE fighter

${invon}
${redf}   ▄█     █▄    ${greenf}   ▄▄     ▄▄    ${yellowf}   ▄▄     ▄▄    ${bluef}   ▄▄     ▄▄    ${purplef}   ▄▄     ▄▄    ${cyanf}   ▄█     █▄   
${redf} ▄█▀  ▄▄▄  ▀█▄  ${greenf} ▄█▀  ▄▄▄  ▀█▄  ${yellowf} ▄█▀  ▄▄▄  ▀█▄  ${bluef} ▄█▀  ▄▄▄  ▀█▄  ${purplef} ▄█▀  ▄▄▄  ▀█▄  ${cyanf} ▄█▀  ▄▄▄  ▀█▄ 
${redf} ██▄▄██▀██▄▄██  ${greenf} ██▄▄██▀██▄▄██  ${yellowf} ██▄▄██▀██▄▄██  ${bluef} ██▄▄██▀██▄▄██  ${purplef} ██▄▄██▀██▄▄██  ${cyanf} ██▄▄██▀██▄▄██ 
${redf} ██▀▀█████▀▀██  ${greenf} ██▀▀█████▀▀██  ${yellowf} ██▀▀█████▀▀██  ${bluef} ██▀▀█████▀▀██  ${purplef} ██▀▀█████▀▀██  ${cyanf} ██▀▀█████▀▀██ 
${redf} ▀█▄  ▀▀▀  ▄█▀  ${greenf} ▀█▄  ▀▀▀  ▄█▀  ${yellowf} ▀█▄  ▀▀▀  ▄█▀  ${bluef} ▀█▄  ▀▀▀  ▄█▀  ${purplef} ▀█▄  ▀▀▀  ▄█▀  ${cyanf} ▀█▄  ▀▀▀  ▄█▀ 
${redf}   ▀█     █▀    ${greenf}   ▀▀     ▀▀    ${yellowf}   ▀▀     ▀▀    ${bluef}   ▀▀     ▀▀    ${purplef}   ▀▀     ▀▀    ${cyanf}   ▀█     █▀   
${boldon}${invon}
${redf}   ▄█     █▄    ${greenf}   ▄▄     ▄▄    ${yellowf}   ▄▄     ▄▄    ${bluef}   ▄▄     ▄▄    ${purplef}   ▄▄     ▄▄    ${cyanf}   ▄█     █▄   
${redf} ▄█▀  ▄▄▄  ▀█▄  ${greenf} ▄█▀  ▄▄▄  ▀█▄  ${yellowf} ▄█▀  ▄▄▄  ▀█▄  ${bluef} ▄█▀  ▄▄▄  ▀█▄  ${purplef} ▄█▀  ▄▄▄  ▀█▄  ${cyanf} ▄█▀  ▄▄▄  ▀█▄ 
${redf} ██▄▄██▀██▄▄██  ${greenf} ██▄▄██▀██▄▄██  ${yellowf} ██▄▄██▀██▄▄██  ${bluef} ██▄▄██▀██▄▄██  ${purplef} ██▄▄██▀██▄▄██  ${cyanf} ██▄▄██▀██▄▄██ 
${redf} ██▀▀█████▀▀██  ${greenf} ██▀▀█████▀▀██  ${yellowf} ██▀▀█████▀▀██  ${bluef} ██▀▀█████▀▀██  ${purplef} ██▀▀█████▀▀██  ${cyanf} ██▀▀█████▀▀██ 
${redf} ▀█▄  ▀▀▀  ▄█▀  ${greenf} ▀█▄  ▀▀▀  ▄█▀  ${yellowf} ▀█▄  ▀▀▀  ▄█▀  ${bluef} ▀█▄  ▀▀▀  ▄█▀  ${purplef} ▀█▄  ▀▀▀  ▄█▀  ${cyanf} ▀█▄  ▀▀▀  ▄█▀ 
${redf}   ▀█     █▀    ${greenf}   ▀▀     ▀▀    ${yellowf}   ▀▀     ▀▀    ${bluef}   ▀▀     ▀▀    ${purplef}   ▀▀     ▀▀    ${cyanf}   ▀█     █▀   
${reset}
 ****************************** Building blocks: █ ▓ ▒ ░ ▄ ▀ ▐ ▌ ●  ═ ║ ╔ ╦ ╗ ╚ ╩ ╝ ■ ▬ ▲ ▼ ◄ ► 

Darth Vader

 ${redf}   ▄████▄     ${greenf}   ▄████▄     ${yellowf}   ▄████▄     ${bluef}   ▄████▄     ${purplef}   ▄████▄     ${cyanf}   ▄████▄   
 ${redf}  ██▀▀▀▀██    ${greenf}  ██▀▀▀▀██    ${yellowf}  ██▀▀▀▀██    ${bluef}  ██▀▀▀▀██    ${purplef}  ██▀▀▀▀██    ${cyanf}  ██▀▀▀▀██
 ${redf}  █      █    ${greenf}  █      █    ${yellowf}  █      █    ${bluef}  █      █    ${purplef}  █      █    ${cyanf}  █      █   
 ${redf} █  ▄▀▀▄  █   ${greenf} █  ▄▀▀▄  █   ${yellowf} █  ▄▀▀▄  █   ${bluef} █  ▄▀▀▄  █   ${purplef} █  ▄▀▀▄  █   ${cyanf} █  ▄▀▀▄  █ 
 ${redf}█ ▄█▬▄▄▬█▄ █  ${greenf}█ ▄█▬▄▄▬█▄ █  ${yellowf}█ ▄█▬▄▄▬█▄ █  ${bluef}█ ▄█▬▄▄▬█▄ █  ${purplef}█ ▄█▬▄▄▬█▄ █  ${cyanf}█ ▄█▬▄▄▬█▄ █
 
 ${boldon}
 ${redf}   ▄████▄     ${greenf}   ▄████▄     ${yellowf}   ▄████▄     ${bluef}   ▄████▄     ${purplef}   ▄████▄     ${cyanf}   ▄████▄   
 ${redf}  ██▀▀▀▀██    ${greenf}  ██▀▀▀▀██    ${yellowf}  ██▀▀▀▀██    ${bluef}  ██▀▀▀▀██    ${purplef}  ██▀▀▀▀██    ${cyanf}  ██▀▀▀▀██
 ${redf}  █      █    ${greenf}  █      █    ${yellowf}  █      █    ${bluef}  █      █    ${purplef}  █      █    ${cyanf}  █      █   
 ${redf} █  ▄▀▀▄  █   ${greenf} █  ▄▀▀▄  █   ${yellowf} █  ▄▀▀▄  █   ${bluef} █  ▄▀▀▄  █   ${purplef} █  ▄▀▀▄  █   ${cyanf} █  ▄▀▀▄  █ 
 ${redf}█ ▄█▬▄▄▬█▄ █  ${greenf}█ ▄█▬▄▄▬█▄ █  ${yellowf}█ ▄█▬▄▄▬█▄ █  ${bluef}█ ▄█▬▄▄▬█▄ █  ${purplef}█ ▄█▬▄▄▬█▄ █  ${cyanf}█ ▄█▬▄▄▬█▄ █
 ${reset}
 ****************** Building blocks: █ ▓ ▒ ░ ▄ ▀ ▐ ▌ ●  ═ ║ ╔ ╦ ╗ ╚ ╩ ╝ ■ ▬ ▲ ▼ ◄ ► 

TIE fighter

 ${redf} █         █   ${greenf}█         █   ${yellowf}█         █   ${bluef}█         █   ${purplef}█         █   ${cyanf}█         █
 ${redf} █   ▄▄▄   █   ${greenf}█   ▄▄▄   █   ${yellowf}█   ▄▄▄   █   ${bluef}█   ▄▄▄   █   ${purplef}█   ▄▄▄   █   ${cyanf}█   ▄▄▄   █
 ${redf} █▄▄██▀██▄▄█   ${greenf}█▄▄██▀██▄▄█   ${yellowf}█▄▄██▀██▄▄█   ${bluef}█▄▄██▀██▄▄█   ${purplef}█▄▄██▀██▄▄█   ${cyanf}█▄▄██▀██▄▄█
 ${redf} █▀▀█████▀▀█   ${greenf}█▀▀█████▀▀█   ${yellowf}█▀▀█████▀▀█   ${bluef}█▀▀█████▀▀█   ${purplef}█▀▀█████▀▀█   ${cyanf}█▀▀█████▀▀█
 ${redf} █   ▀▀▀   █   ${greenf}█   ▀▀▀   █   ${yellowf}█   ▀▀▀   █   ${bluef}█   ▀▀▀   █   ${purplef}█   ▀▀▀   █   ${cyanf}█   ▀▀▀   █
 ${redf} █         █   ${greenf}█         █   ${yellowf}█         █   ${bluef}█         █   ${purplef}█         █   ${cyanf}█         █
 ${boldon}
 ${redf} █         █   ${greenf}█         █   ${yellowf}█         █   ${bluef}█         █   ${purplef}█         █   ${cyanf}█         █
 ${redf} █   ▄▄▄   █   ${greenf}█   ▄▄▄   █   ${yellowf}█   ▄▄▄   █   ${bluef}█   ▄▄▄   █   ${purplef}█   ▄▄▄   █   ${cyanf}█   ▄▄▄   █
 ${redf} █▄▄██▀██▄▄█   ${greenf}█▄▄██▀██▄▄█   ${yellowf}█▄▄██▀██▄▄█   ${bluef}█▄▄██▀██▄▄█   ${purplef}█▄▄██▀██▄▄█   ${cyanf}█▄▄██▀██▄▄█
 ${redf} █▀▀█████▀▀█   ${greenf}█▀▀█████▀▀█   ${yellowf}█▀▀█████▀▀█   ${bluef}█▀▀█████▀▀█   ${purplef}█▀▀█████▀▀█   ${cyanf}█▀▀█████▀▀█
 ${redf} █   ▀▀▀   █   ${greenf}█   ▀▀▀   █   ${yellowf}█   ▀▀▀   █   ${bluef}█   ▀▀▀   █   ${purplef}█   ▀▀▀   █   ${cyanf}█   ▀▀▀   █
 ${redf} █         █   ${greenf}█         █   ${yellowf}█         █   ${bluef}█         █   ${purplef}█         █   ${cyanf}█         █
 ${reset}
 ****************** Building blocks: █ ▓ ▒ ░ ▄ ▀ ▐ ▌ ●  ═ ║ ╔ ╦ ╗ ╚ ╩ ╝ ■ ▬ ▲ ▼ ◄ ► 

Jango Fett

 ${redf}   ▄█████▄ ${greenf}   ▄█████▄ ${yellowf}   ▄█████▄ ${bluef}   ▄█████▄ ${purplef}   ▄█████▄ ${cyanf}   ▄█████▄
 ${redf}   █▄▄ ▄▄█ ${greenf}   █▄▄ ▄▄█ ${yellowf}   █▄▄ ▄▄█ ${bluef}   █▄▄ ▄▄█ ${purplef}   █▄▄ ▄▄█ ${cyanf}   █▄▄ ▄▄█  
 ${redf}   ███ ███ ${greenf}   ███ ███ ${yellowf}   ███ ███ ${bluef}   ███ ███ ${purplef}   ███ ███ ${cyanf}   ███ ███  
 ${redf}   ▀██ ██▀ ${greenf}   ▀██ ██▀ ${yellowf}   ▀██ ██▀ ${bluef}   ▀██ ██▀ ${purplef}   ▀██ ██▀ ${cyanf}   ▀██ ██▀  
 ${redf}     ▀ ▀   ${greenf}     ▀ ▀   ${yellowf}     ▀ ▀   ${bluef}     ▀ ▀   ${purplef}     ▀ ▀   ${cyanf}     ▀ ▀   
 ${boldon}
 ${redf}   ▄█████▄ ${greenf}   ▄█████▄ ${yellowf}   ▄█████▄ ${bluef}   ▄█████▄ ${purplef}   ▄█████▄ ${cyanf}   ▄█████▄
 ${redf}   █▄▄ ▄▄█ ${greenf}   █▄▄ ▄▄█ ${yellowf}   █▄▄ ▄▄█ ${bluef}   █▄▄ ▄▄█ ${purplef}   █▄▄ ▄▄█ ${cyanf}   █▄▄ ▄▄█  
 ${redf}   ███ ███ ${greenf}   ███ ███ ${yellowf}   ███ ███ ${bluef}   ███ ███ ${purplef}   ███ ███ ${cyanf}   ███ ███  
 ${redf}   ▀██ ██▀ ${greenf}   ▀██ ██▀ ${yellowf}   ▀██ ██▀ ${bluef}   ▀██ ██▀ ${purplef}   ▀██ ██▀ ${cyanf}   ▀██ ██▀  
 ${redf}     ▀ ▀   ${greenf}     ▀ ▀   ${yellowf}     ▀ ▀   ${bluef}     ▀ ▀   ${purplef}     ▀ ▀   ${cyanf}     ▀ ▀   
${reset}
   Building blocks: █ ▓ ▒ ░ ▄ ▀ ▐ ▌ ●  ═ ║ ╔ ╦ ╗ ╚ ╩ ╝ ■ ▬ ▲ ▼ ◄ ► 

Offline

#34 2011-06-26 15:52:05

yuh_learn
#! CrunchBanger
Registered: 2009-09-02
Posts: 118

Re: ANSI colorschemes scripts

Suppose I could color it...
tOThtNA

${whitef}▓▓▓▓▓▓▓▓▓█████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒                 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒
▓▓▓▓▓▓▓▓█████████▒ ▓███████▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒         ▓█▒       ▒▒▒▒▒▒▒▒▒▒▒▒▒
▓▓▓▓▓▓█████▒▓▒███▓▓ ▓███████████▓▓▓▓▓▓▓▓▒▒▒▒▒▒     ▓▒▓   ▒▒█▒           ▒▒▒▒▒▒▒▒
▓▓▓▒▓████▓▓  ▓██████████████████████▓▓▓▓▒▒▒▓▒    ▒▒██▒                      ▒▒▒▒
▓▓▓▓ ▓███▒ ▒▓██████████▓▓▓██████████▓▓▓▓▒▒▒▒█▒   ▓█▓▒          ▒▒▒          ▒▒▒▒
▓▓▓▓▓▓███▓███████████████████▓█▓███▓▒▓▓▓▒▒▒▒▒▒   ▒                   ▒ ▒   ▒▓▒▒▒
▓▓▓▓ ▓ ▓▓▓███████████████████▒▓▒██▓   ▓▓▒▒▒▒█▒█▒▒▒                   ▓▒▓  ▒███▒▒
▓▓▓▓  ▓  ▓███████████████████▓▓▒██▓▓  █▓▒▒▒▒██▒██▒                   ▒▒▓  ▒▒██ ▒
▓▓██▓   ▓▓▓▓████████▓▓▓▓▓███▓▓▒██▓▓▓  ▓▓▒▒  ▒███▒▒▒▒        ▒▒▒▒▒   ▒▒▓  ▒▒▒██▒▒
▓▓█▒    ▒▓▓▓▒▓█████▓▓▓█▓▓▒   ▒ ▒▓▓    ▓▓▒▒ ▓████▓▒▒▒▓▒     ▒▒▒ ▒▒▓███▓█▓▒▒████▒▒
▓▓▓ ▒ ▓   ▓▓▓▓█████▓▓▓▓  ▒▒ ▓▓ ▓▓▓▓   ▓▓▒▒▒█▓█▒███▒▒▒▒     ▒▒▒▒██▓▓█▒▒█▒▒▒▒███▒▒
▓▓▓▓▓▒▒▓███████████████████▓    ▓▒   ▓▓▓▒▒▒▒▒▓▓▒                   ▒████▒▓███▒▒▒
▓▓▓▒ ▓█▓██████████████████▓    ▒▓    ▓▓▓▒▒▒▓█▒ ▒                  ▒████▓▒████▒▒▒
▓▓▓▓▓▓▒ ▓████▓▒▓▓▒▓██████       ▒     ▓▓▒▒▒▒▒▒▓█▒    ▒▓▒▒▓▒      ███████▓█████▒▒
▓▓▓▓▓▓   ████▓▓▓▓▓▓▓████▓           ▓▓▓▓▒▒▒▒▒▒███    ▒▒▒▒▒▒▒    ▒███████████▒▒▒▒
▓▓▓▓▓▓▓  ▓██        ▓████▒        ▒▓▓▓▓▓▒▒▒▒▒▒▒██▒  ████████▒    ▓████████▓▒▒▒▒▒
▓▓▓▓▓▓▓▓  ▓██▓   ▓▓█████▓        ▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒██▒  ▒███▒▒     ▒████████▒▒▒▒▒▒▒
▓▓▓▓▓▓▓▓▓  ▒██████████▓         ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒██▓          ▒█████████▒▒▒▒▒▒▒▒
▓▓▓▓▓▓▓▓▓▓▓  ▒▓▓▓▓▒             ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▒██▓▒▒▒▒▓█████████████▒▒▒▒▒▒▒▒${reset}

Offline

#35 2011-06-28 07:33:23

yuh_learn
#! CrunchBanger
Registered: 2009-09-02
Posts: 118

Re: ANSI colorschemes scripts

Another one.
tOTloYw

${whitef}                                            ░▓█▒░░                   ░░░▒▒▓▓▓▒  
       ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░     ▓▓▒░░                   ░░░▒▒▓▓▓▓  
      ░▓███████████████████████████████▓░    ▓▓▒░░░                 ░░░▒▒▒▓▓▓▓  
     ▓▓█▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█░  ▓▓▓█▒░░░▒▒▒▒░         ░░░ ░▒▒▒▓▓▓▓▓░ 
   ▓▒▓▓█▓▒▒▒▒▓▒▒▒▓▓░▓▒▒░▒▒▒░▒▒▒▓▒▒▒▒▒▒▓█░  ▓▓▓█▓▒▓▒▒▒▓▓▓▓▓░░▒▒▓▓▓▓▒▒▒▒▒▒▒▓▓█▓▓▓ 
  ▒    ░▒▒▓▓▓▓▓▓▓▓░ ░░░ ░▒▒░▓▒▓▓▓▓▓▓▓▓▓█░   ▓██▒▓▒▓▒▓▓▓█▓▓▒░▓▓▓▓▓██▓▓▓▓▒░▓█▓▓▓▒ 
 ▒▒░▒▒░▒▓▒▓▓▓▓▓▓▓▓▓░▓▓▓░▒▒▒░▓▓▓▓▓▓▓▓▓▓▓█░   ▒▓▓▓▒░░░▒░▒▒▓▓░ ▓▓▓▒░▒▓▒▓▓▒▒░▓▓██▓  
▒    ░▓█▓▓▓▓▓▓▓▓▓▓░ ░░░ ░▒▒▓▓▓▓▓▓▓▓▓▓▓▓█░   ░▓▓▓▒▒░▒▒▒▒▒▓▒ ░▓▓▓▒▒▒▒▒░░▒▒▓▓▓▓▓▒  
█▒▒▓▒░ ▒▓▓▒▓▓▓▓▓▓▓▓░▓▓▓░▓▒▒ ▓▓▓▓▓▓▓▓▓▓▓█░    ▓▓█▓▒▒▒▒▒▒▓▒░ ▒▓▓▓▓▓▒▒▒▒▒▓▓▓▓▓▒▒   
█░  ░▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒▒▒▒▒▓▒▓▓▓▓▓▓█░     ▒▒▓▓▓▒▒▒▒▒▒  ░▓▓▓▒▒▒▒▓▓▓▓▓▓█▓▒    
█  ░   ████████████████████████████████▓▒▒     ▒█▓▒░░░░▓▓▒▒▓▓▓▒░░░░░▒▓▓▓▓▒      
█▓░▓▓▓▓▓▓▒▒▓▒▒▒▒▒▒▒▓▒▒▓▒▒▓▒▓▒▒▒▒▒▓▒▓▓▓▓▒ ▒▒    ▒█▓▒▒▒░░▒▓█████▒░░▒▒▒▒▓▓▓█▒      
██▒░▒▓█▓▒▒░▒░▒▒▒░▒░▒░▒▒▒░▒░▒▒▒▒▒▒▓▒▒▓▓▓▒ ░▓▓░░▒▓▓█▓▒▓▓▓▓▓▓██▓▓▓▓▓▓▓▒▓▓▓██▓▒     
███▒  ▒▓▒▓▒░▒▒░▓ ▒▒ ▒▒ ▒  ▒  ▒ ▒▒ ▓▒░▓▓█░  ▒██████▓▓█▓▓▓▓▓▓▓▓██▓▓█▓▓▓▓██████▓▓▒ 
████▓ ▒▓▒▒▒░░▒░░▒░▒░ ▒░░▒ ▒░ ▒▒ ▓░▒▓▒▒██▓░  ▒████████▓▓▓▓▓███▓▓▓▓██████▓████████
█████▓▓▓▒▒░░░░▒░░░░░▒░▒▒░░░░▒░▒▒▒▒▒▒▓▓███▓░  ░▓████████▓▓▓▓▓▓▓▓███████▓▓████████
██████▓▓▒▒ ▒░░▒░░▒░░▒░▒░░▒▒░▓▒▒▒▒▒▒░▒▓▒▓▓▒     ▓███████▓▓▓▓▓▓▓▓▓█████▓░▓████████
███████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒░        ░▓██▓▓█████████████▓▒░▒█████████${reset}
-----8<-------------------------------------------------------------------------

Offline

#36 2011-07-02 14:38:00

ivo
#! Junkie
From: the six feet under the ground
Registered: 2011-05-06
Posts: 334

Re: ANSI colorschemes scripts

other  tongue

tOWJzMA

#!/bin/sh
#  
# 
# ANSI Color -- use these variables to easily have different color
#    and format output. Make sure to output the reset sequence after 
#    colors (f = foreground, b = background), and use the 'off'
#    feature for anything you turn on.
#    

initializeANSI()
{
  esc=""

  blackf="${esc}[30m";   redf="${esc}[31m";    greenf="${esc}[32m"
  yellowf="${esc}[33m"   bluef="${esc}[34m";   purplef="${esc}[35m"
  cyanf="${esc}[36m";    whitef="${esc}[37m"
  
  blackb="${esc}[40m";   redb="${esc}[41m";    greenb="${esc}[42m"
  yellowb="${esc}[43m"   blueb="${esc}[44m";   purpleb="${esc}[45m"
  cyanb="${esc}[46m";    whiteb="${esc}[47m"

  boldon="${esc}[1m";    boldoff="${esc}[22m"
  italicson="${esc}[3m"; italicsoff="${esc}[23m"
  ulon="${esc}[4m";      uloff="${esc}[24m"
  invon="${esc}[7m";     invoff="${esc}[27m"

  reset="${esc}[0m"
}

# note in this first use that switching colors doesn't require a reset
# first - the new color overrides the old one.

initializeANSI

cat << EOF 

${boldon}${redf}█   █ ${reset} ${boldon}${greenf}█   █ ${reset} ${boldon}${yellowf}█   █ ${reset} ${boldon}${bluef}█   █ ${reset} ${boldon}${purplef}█   █ ${reset} ${boldon}${cyanf}█   █ ${reset} 
${boldon}${redf} ■ ■  ${reset} ${boldon}${greenf} ■ ■  ${reset} ${boldon}${yellowf} ■ ■  ${reset} ${boldon}${bluef} ■ ■  ${reset} ${boldon}${purplef} ■ ■  ${reset} ${boldon}${cyanf} ■ ■  ${reset}
${boldon}${redf} =■=  ${reset} ${boldon}${greenf} =■=  ${reset} ${boldon}${yellowf} =■=  ${reset} ${boldon}${bluef} =■=  ${reset} ${boldon}${purplef} =■=  ${reset} ${boldon}${cyanf} =■=  ${reset}
 
${redf}█=@=█ ${reset} ${greenf}█=@=█ ${reset} ${yellowf}█=@=█ ${reset} ${bluef}█=@=█ ${reset} ${purplef}█=@=█ ${reset} ${cyanf}█=@=█ ${reset}
${redf} ■ ■  ${reset} ${greenf} ■ ■  ${reset} ${yellowf} ■ ■  ${reset} ${bluef} ■ ■  ${reset} ${purplef} ■ ■  ${reset} ${cyanf} ■ ■  ${reset}
${redf} =■=  ${reset} ${greenf} =■=  ${reset} ${yellowf} =■=  ${reset} ${bluef} =■=  ${reset} ${purplef} =■=  ${reset} ${cyanf} =■=  ${reset} 

EOF

                          

I love GnuEmacs, GnuScreen, ratpoison, and conkeror.

My site || My Github

Offline

#37 2011-07-03 09:53:49

gutterslob
#! Resident Bum
Registered: 2009-11-03
Posts: 3,116

Re: ANSI colorschemes scripts

Yeah, I know it's pretty crap compared to the other offerings on this awesome thread. Will try harder when I find more time.

vOWM0Mg.png

#!/bin/sh

initializeANSI()
{
  esc=""

  blackf="${esc}[30m";   redf="${esc}[31m";    greenf="${esc}[32m"
  yellowf="${esc}[33m"   bluef="${esc}[34m";   purplef="${esc}[35m"
  cyanf="${esc}[36m";    whitef="${esc}[37m"
  
  blackb="${esc}[40m";   redb="${esc}[41m";    greenb="${esc}[42m"
  yellowb="${esc}[43m"   blueb="${esc}[44m";   purpleb="${esc}[45m"
  cyanb="${esc}[46m";    whiteb="${esc}[47m"

  boldon="${esc}[1m";    boldoff="${esc}[22m"
  italicson="${esc}[3m"; italicsoff="${esc}[23m"
  ulon="${esc}[4m";      uloff="${esc}[24m"
  invon="${esc}[7m";     invoff="${esc}[27m"

  reset="${esc}[0m"
}

initializeANSI

cat << EOF

              ${reset}${blackf}|               |               |               |               |${reset}
   ${redf}█     █${reset}    ${blackf}|${reset}    ${greenf}█     █${reset}    ${blackf}|${reset}    ${yellowf}█     █${reset}    ${blackf}|${reset}    ${bluef}█     █${reset}    ${blackf}|${reset}    ${purplef}█     █${reset}    ${blackf}|${reset}    ${cyanf}█     █${reset}
   ${redf}███████${reset}    ${blackf}|${reset}    ${greenf}███████${reset}    ${blackf}|${reset}    ${yellowf}███████${reset}    ${blackf}|${reset}    ${bluef}███████${reset}    ${blackf}|${reset}    ${purplef}███████${reset}    ${blackf}|${reset}    ${cyanf}███████${reset}
 ${redf}███${boldon}${redb}██${reset}${redf}█${boldon}${redb}██${reset}${redf}███${reset}  ${blackf}|${reset}  ${greenf}███${boldon}${greenb}██${reset}${greenf}█${boldon}${greenb}██${reset}${greenf}███${reset}  ${blackf}|${reset}  ${yellowf}███${boldon}${yellowb}██${reset}${yellowf}█${boldon}${yellowb}██${reset}${yellowf}███${reset}  ${blackf}|${reset}  ${bluef}███${boldon}${blueb}██${reset}${bluef}█${boldon}${blueb}██${reset}${bluef}███${reset}  ${blackf}|${reset}  ${purplef}███${boldon}${purpleb}██${reset}${purplef}█${boldon}${purpleb}██${reset}${purplef}███${reset}  ${blackf}|${reset}  ${cyanf}███${boldon}${cyanb}██${reset}${cyanf}█${boldon}${cyanb}██${reset}${cyanf}███${reset}
  ${redf}████${boldon}${redb}█${reset}${redf}████${reset}   ${blackf}|${reset}   ${greenf}████${boldon}${greenb}█${reset}${greenf}████${reset}   ${blackf}|${reset}   ${yellowf}████${boldon}${yellowb}█${reset}${yellowf}████${reset}   ${blackf}|${reset}   ${bluef}████${boldon}${blueb}█${reset}${bluef}████${reset}   ${blackf}|${reset}   ${purplef}████${boldon}${purpleb}█${reset}${purplef}████${reset}   ${blackf}|${reset}   ${cyanf}████${boldon}${cyanb}█${reset}${cyanf}████${reset}
  ${redf}█ █ ${boldon}█${reset} ${redf}█ █${reset}   ${blackf}|${reset}   ${greenf}█ █ ${boldon}█${reset} ${greenf}█ █${reset}   ${blackf}|${reset}   ${yellowf}█ █ ${boldon}█${reset} ${yellowf}█ █${reset}   ${blackf}|${reset}   ${bluef}█ █ ${boldon}█${reset} ${bluef}█ █${reset}   ${blackf}|${reset}   ${purplef}█ █ ${boldon}█${reset} ${purplef}█ █${reset}   ${blackf}|${reset}   ${cyanf}█ █ ${boldon}█${reset} ${cyanf}█ █${reset}
    ${redf}█   █${reset}     ${blackf}|${reset}     ${greenf}█   █${reset}     ${blackf}|${reset}     ${yellowf}█   █${reset}     ${blackf}|${reset}     ${bluef}█   █${reset}     ${blackf}|${reset}     ${purplef}█   █${reset}     ${blackf}|${reset}     ${cyanf}█   █${reset}
              ${blackf}|               |               |               |               |${reset}
EOF

@pfh
Sorry it took so long to contribute, but it's been a vary hectic month for me.


Point & Squirt

Offline

#38 2011-07-03 11:20:06

ivo
#! Junkie
From: the six feet under the ground
Registered: 2011-05-06
Posts: 334

Re: ANSI colorschemes scripts

@gutterslob

wow nice,very Cool man.


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.

My site || My Github

Offline

#39 2011-07-03 21:15:31

pfh
#! CrunchBanger
Registered: 2011-03-09
Posts: 189

Re: ANSI colorschemes scripts

Pretty nice contributions. Thank you all and keep up with the colorscheme spirit.

Offline

#40 2011-07-30 20:35:56

ivo
#! Junkie
From: the six feet under the ground
Registered: 2011-05-06
Posts: 334

Re: ANSI colorschemes scripts

Another script to update this thread,


vZWJvdw

#!/bin/sh
#  
# Autor: Ivo
# ANSI Color -- use these variables to easily have different color
#    and format output. Make sure to output the reset sequence after 
#    colors (f = foreground, b = background), and use the 'off'
#    feature for anything you turn on.
#    

initializeANSI()
{
  esc=""

  blackf="${esc}[30m";   redf="${esc}[31m";    greenf="${esc}[32m"
  yellowf="${esc}[33m"   bluef="${esc}[34m";   purplef="${esc}[35m"
  cyanf="${esc}[36m";    whitef="${esc}[37m"   whitef="${esc}[37m"
  
  blackb="${esc}[40m";   redb="${esc}[41m";    greenb="${esc}[42m"
  yellowb="${esc}[43m"   blueb="${esc}[44m";   purpleb="${esc}[45m"
  cyanb="${esc}[46m";    whiteb="${esc}[47m"

  boldon="${esc}[1m";    boldoff="${esc}[22m"
  italicson="${esc}[3m"; italicsoff="${esc}[23m"
  ulon="${esc}[4m";      uloff="${esc}[24m"
  invon="${esc}[7m";     invoff="${esc}[27m"

  reset="${esc}[0m"
}

# note in this first use that switching colors doesn't require a reset
# first - the new color overrides the old one.

initializeANSI

cat << EOF  
  
${boldon}${redf}   ██████  ${reset} ${boldon}${greenf}██████   ${reset}${boldon}${yellowf}  ██████${reset} ${boldon}${bluef}██████  ${reset} ${boldon}${purplef}  ██████${reset} ${boldon}${cyanf}  ███████${reset}
${boldon}${redf}   ████████${reset} ${boldon}${greenf}██    ██ ${reset}${boldon}${yellowf}██      ${reset} ${boldon}${bluef}██    ██${reset} ${boldon}${purplef}██████  ${reset} ${boldon}${cyanf}█████████${reset}
${redf}   ██  ████${reset} ${greenf}██  ████ ${reset}${yellowf}████    ${reset} ${bluef}████  ██${reset} ${purplef}████    ${reset} ${cyanf}█████    ${reset}
${redf}   ██    ██${reset} ${greenf}██████   ${reset}${yellowf}████████${reset} ${bluef}██████  ${reset} ${purplef}████████${reset} ${cyanf}██       ${reset} 
 
EOF

Last edited by ivo (2012-06-14 13:03:41)


I love GnuEmacs, GnuScreen, ratpoison, and conkeror.

My site || My Github

Offline

#41 2011-07-31 14:05:35

Doomicide
#! Junkie
From: the Nightosphere
Registered: 2011-06-24
Posts: 472
Website

Re: ANSI colorschemes scripts

I get:

 [33m  ▄███████▄[0m   [31m  ▄██████▄[0m    [32m  ▄██████▄[0m    [34m  ▄██████▄[0m    [35m  ▄██████▄[0m    [36m  ▄██████▄[0m
 [33m▄█████████▀▀[0m  [31m▄[37m█▀█[31m██[37m█▀█[31m██▄[0m  [32m▄[37m█▀█[32m██[37m█▀█[32m██▄[0m  [34m▄[37m█▀█[34m██[37m█▀█[34m██▄[0m  [35m▄[37m█▀█[35m██[37m█▀█[35m██▄[0m  [36m▄[37m█▀█[36m██[37m█▀█[36m██▄[0m
 [33m███████▀[0m      [31m█[37m▄▄█[31m██[37m▄▄█[31m███[0m  [32m█[37m▄▄█[32m██[37m▄▄█[32m███[0m  [34m█[37m▄▄█[34m██[37m▄▄█[34m███[0m  [35m█[37m▄▄█[35m██[37m▄▄█[35m███[0m  [36m█[37m▄▄█[36m██[37m▄▄█[36m███[0m
 [33m███████▄[0m      [31m████████████[0m  [32m████████████[0m  [34m████████████[0m  [35m████████████[0m  [36m████████████[0m
 [33m▀█████████▄▄[0m  [31m██▀██▀▀██▀██[0m  [32m██▀██▀▀██▀██[0m  [34m██▀██▀▀██▀██[0m  [35m██▀██▀▀██▀██[0m  [36m██▀██▀▀██▀██[0m
 [33m  ▀███████▀[0m   [31m▀   ▀  ▀   ▀[0m  [32m▀   ▀  ▀   ▀[0m  [34m▀   ▀  ▀   ▀[0m  [35m▀   ▀  ▀   ▀[0m  [36m▀   ▀  ▀   ▀[0m
 
 [1m[33m  ▄███████▄   [31m  ▄██████▄    [32m  ▄██████▄    [34m  ▄██████▄    [35m  ▄██████▄    [36m  ▄██████▄[0m
 [1m[33m▄█████████▀▀  [31m▄[37m█▀█[31m██[37m█▀█[31m██▄  [32m▄[37m█▀█[32m██[37m█▀█[32m██▄  [34m▄[37m█▀█[34m██[37m█▀█[34m██▄  [35m▄[37m█▀█[35m██[37m█▀█[35m██▄  [36m▄[37m█▀█[36m██[37m█▀█[36m██▄[0m
 [1m[33m███████▀      [31m█[37m▄▄█[31m██[37m▄▄█[31m███  [32m█[37m▄▄█[32m██[37m▄▄█[32m███  [34m█[37m▄▄█[34m██[37m▄▄█[34m███  [35m█[37m▄▄█[35m██[37m▄▄█[35m███  [36m█[37m▄▄█[36m██[37m▄▄█[36m███[0m
 [1m[33m███████▄      [31m████████████  [32m████████████  [34m████████████  [35m████████████  [36m████████████[0m
 [1m[33m▀█████████▄▄  [31m██▀██▀▀██▀██  [32m██▀██▀▀██▀██  [34m██▀██▀▀██▀██  [35m██▀██▀▀██▀██  [36m██▀██▀▀██▀██[0m
 [1m[33m  ▀███████▀   [31m▀   ▀  ▀   ▀  [32m▀   ▀  ▀   ▀  [34m▀   ▀  ▀   ▀  [35m▀   ▀  ▀   ▀  [36m▀   ▀  ▀   ▀[0m

even though

initializeANSI()
{
 esc=""

“From each according to his faculties; to each according to his needs”
Look at the code. Look at the silly code!

Offline

#42 2011-08-02 12:54:42

SuNjACk
#! Die Hard
Registered: 2010-05-23
Posts: 545

Re: ANSI colorschemes scripts

vOXE1Yw


#!/bin/zsh

xdef="$HOME/.Xdefaults"

colors=( $( sed -re '/^!/d; /^$/d; /^#/d; s/(\*color)([0-9]):/\10\2:/g;' $xdef | grep 'color[01][0-9]:' | sort | sed  's/^.*: *//g' ) )

echo -e "\e[1;37m 
 Black    Red      Green    Yellow   Blue     Magenta   Cyan    White   
──────────────────────────────────────────────────────────────────────\e[0m"
for i in {0..7}; echo -en "\e[$((30+$i))m $colors[i+1] \e[0m"
echo
for i in {8..15}; echo -en "\e[1;$((22+$i))m $colors[i+1] \e[0m"
echo -e "\n"

It should dump the colors from ~/.Xdefaults
But it's made for zsh, maybe for bash it's need some adjustments

Hope you like it


"I'd rather run Linux on a 6.5KHz machine through an ARM emulator than run Vista"

Offline

#43 2011-08-02 13:25:29

gutterslob
#! Resident Bum
Registered: 2009-11-03
Posts: 3,116

Re: ANSI colorschemes scripts

@ivo
Excellent stuff, man!!
I really like how you chose the lighter (bold) values for the top half, letting the darker values give a pseudo-shadow effect. Thanks for sharing. smile

@sunny
Love it!! Simple, yet clever!!
Hope you don't mind, I modded it a bit. Just tweaked the headers (Black, Red...etc) to make em shorter and more centralised ..... and also changed echo -e "\e[1;37m to echo -e "\e[37m to make it use color7 instead of color15. .... Like this;
vOXE1cw.png

Thanks for sharing, mate. smile

Edit: Just tested and it works in both bash and zsh shells, btw.

Last edited by gutterslob (2011-08-02 13:32:25)


Point & Squirt

Offline

#44 2011-08-02 14:06:37

SuNjACk
#! Die Hard
Registered: 2010-05-23
Posts: 545

Re: ANSI colorschemes scripts

gutterslob wrote:

@sunny
Love it!! Simple, yet clever!!
Hope you don't mind, I modded it a bit. Just tweaked the headers (Black, Red...etc) to make em shorter and more centralised ..... and also changed echo -e "\e[1;37m to echo -e "\e[37m to make it use color7 instead of color15. .... Like this;
vOXE1cw.png

Thanks for sharing, mate. smile

Edit: Just tested and it works in both bash and zsh shells, btw.

Great to ear it smile


"I'd rather run Linux on a 6.5KHz machine through an ARM emulator than run Vista"

Offline

#45 2011-08-02 14:08:12

anonymous
The Mystery Member
From: Arch Linux Forums
Registered: 2008-11-29
Posts: 9,418

Re: ANSI colorschemes scripts

The script doesn't work for me, I get:

~/bin $ colors4

 Black    Red      Green    Yellow   Blue     Magenta   Cyan    White   
──────────────────────────────────────────────────────────────────────
/home/kevin/bin/colors4: line 10: syntax error near unexpected token `echo'
/home/kevin/bin/colors4: line 10: `for i in {0..7}; echo -en "\e[$((30+$i))m $colors[i+1] \e[0m"'

Any ideas?

Offline

#46 2011-08-02 14:17:02

SuNjACk
#! Die Hard
Registered: 2010-05-23
Posts: 545

Re: ANSI colorschemes scripts

try this

#!/bin/bash

xdef="$HOME/.Xdefaults"

colors=( $( sed -re '/^!/d; /^$/d; /^#/d; s/(\*color)([0-9]):/\10\2:/g;' $xdef | grep 'color[01][0-9]:' | sort | sed  's/^.*: *//g' ) )

echo -e "\e[1;37m 
 Black    Red      Green    Yellow   Blue     Magenta   Cyan    White   
──────────────────────────────────────────────────────────────────────\e[0m"
for i in {0..7}; do echo -en "\e[$((30+$i))m ${colors[i]} \e[0m"; done
echo
for i in {8..15}; do echo -en "\e[1;$((22+$i))m ${colors[i]} \e[0m"; done
echo -e "\n"

EDIT: Fixed the ${colors[i]}

Last edited by SuNjACk (2011-08-02 14:20:18)


"I'd rather run Linux on a 6.5KHz machine through an ARM emulator than run Vista"

Offline

#47 2011-08-02 14:22:48

anonymous
The Mystery Member
From: Arch Linux Forums
Registered: 2008-11-29
Posts: 9,418

Re: ANSI colorschemes scripts

I have to ask: do I need to have my colors in a certain order? The script puts the codes with the wrong color heading. And it actually misses one color.

Offline

#48 2011-08-02 14:24:57

SuNjACk
#! Die Hard
Registered: 2010-05-23
Posts: 545

Re: ANSI colorschemes scripts

anonymous wrote:

I have to ask: do I need to have my colors in a certain order? The script puts the codes with the wrong color heading. And it actually misses one color.

Read again my post, I fixed

in zsh the arrays starts from 1, in bash from 0

I forgot to remove the +1 in ${color[i]}


"I'd rather run Linux on a 6.5KHz machine through an ARM emulator than run Vista"

Offline

#49 2011-08-02 14:28:48

anonymous
The Mystery Member
From: Arch Linux Forums
Registered: 2008-11-29
Posts: 9,418

Re: ANSI colorschemes scripts

Thanks, it works great now!

Offline

Help fund CrunchBang, donate to the project!

#50 2011-08-10 20:42:38

bollovan
New Member
Registered: 2011-08-10
Posts: 2

Re: ANSI colorschemes scripts

SuNjACk wrote:

vOXE1Yw


#!/bin/zsh

xdef="$HOME/.Xdefaults"

colors=( $( sed -re '/^!/d; /^$/d; /^#/d; s/(\*color)([0-9]):/\10\2:/g;' $xdef | grep 'color[01][0-9]:' | sort | sed  's/^.*: *//g' ) )

echo -e "\e[1;37m 
 Black    Red      Green    Yellow   Blue     Magenta   Cyan    White   
──────────────────────────────────────────────────────────────────────\e[0m"
for i in {0..7}; echo -en "\e[$((30+$i))m $colors[i+1] \e[0m"
echo
for i in {8..15}; echo -en "\e[1;$((22+$i))m $colors[i+1] \e[0m"
echo -e "\n"

It should dump the colors from ~/.Xdefaults
But it's made for zsh, maybe for bash it's need some adjustments

Hope you like it

Hey there.Just saying that many people save their colorschemes in ~/colours for example(my case), and then just use #include "/home/user/colours/colorscheme" in their Xdefaults.So because color0-15 are X resources,you can use xrdb -query to get all the resources,and it doesn't depend on what file you are using(you can use ~/.xconfig and put xrdb ~/.xconfig in .xinitrc instead of ~/.Xdefaults.
Just pointing that out,other than that,good job with the script !

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo