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

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

#!/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

#!/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

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

Offline

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

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

Re: ANSI colorschemes scripts

#!/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"

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

${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: █ ▓ ▒ ░ ▄ ▀ ▐ ▌ ●  ═ ║ ╔ ╦ ╗ ╚ ╩ ╝ ■ ▬ ▲ ▼ ◄ ► 

Offline

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

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

Re: ANSI colorschemes scripts

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

Offline

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

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

Re: ANSI colorschemes scripts

${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

#!/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

                          

Offline

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

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

Re: ANSI colorschemes scripts

#!/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

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.

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

#!/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)

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=""

Offline

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

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

Re: ANSI colorschemes scripts

#!/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"

"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,207

Re: ANSI colorschemes scripts

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


"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,419

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

#!/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"

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,419

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


"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,419

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

#!/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"

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.
Server: bleh

Debian Logo