BTColor: A small script to beautify the GNU / Linux Terminal

BTColor: A small script to beautify the GNU / Linux Terminal

BTColor: A small script to beautify the GNU / Linux Terminal

Today again, as from time to time, we will present a small tool or application, useful for all those customization lovers of his highly appreciated GNU / Linux Operating Systems, especially of the terminals. So today, we will talk about "BTColor".

"BTColor", is nothing more than, a small bash shell script, which I have created to beautify the terminal of my respin called staff Miracles GNU / Linux, especially for those days of celebration of the #DesktopFriday Linuxers.

Pywal: An interesting tool to customize our Terminals

Pywal: An interesting tool to customize our Terminals

Before getting into the subject of this little boy script created called "BTColor", it is good to remember that in case you want to expand your knowledge about customizing your GNU / Linux Distros, you can explore after finishing this publication, some other previous publications related to the subject, such as, pywal, which is:

"Pywal is a tool that generates a color palette from the dominant colors in an image. Then apply the colors to the entire system and on the fly in all your favorite shows. There are currently 5 supported color generation backends, each of which provides a different color palette for each image. You will likely find an attractive color scheme. Pywal also supports predefined themes and has more than 250 built-in themes. You can also create your own theme files to share with others." Pywal: An interesting tool to customize our Terminals

Related article:
Pywal: An interesting tool to customize our Terminals

Related article:
Komorebi: How to customize our Desks with animated backgrounds?
Related article:
Conkys: How to customize our Conkys to not use Neofetch?
Related article:
GNU / Linux Desktop Days: Wallpapers Websites to Celebrate
Related article:
XFCE: How to customize Linux Mouse Desktop Environment?

BTColor: Banners Terminal Color

What is the BTColor Script?

As I said at the beginning of the post, "BTColor" it is not more than:

"A small and useful bash shell script that I have created to beautify a terminal with text banners and images in black and white or full color, which can be very useful especially for those days of celebration of the #FridayDeDesk Linuxeros."

How does the BTColor script work?

Basically the script "BTColor" What it does is color un ASCII banner for text or image, which has previously been created by hand or automatically through specialized websites for them, such as:

While, in order to color the ASCII banners, makes use of the technology or knowledge clearly explained on these 2 websites:

How is the code of the BTColor Script?

The code is relatively small and very easy to understand, and therefore, to modify. And the same is the following:

#!/usr/bin/env bash

# https://manytools.org/hacker-tools/ascii-banner/ -> Banners ASCII
# https://www.ascii-art-generator.org/es.html -> Creador de arte ASCII online
# https://misc.flogisoft.com/bash/tip_colors_and_formatting -> bash:tip_colors_and_formatting
# https://robotmoon.com/256-colors/#foreground-colors -> xterm 256 colors

initializeANSI()
{

esc=""

# a="${esc}[0m" # brillo por defecto
# b="${esc}[1m" # brillo alto
# c="${esc}[2m" # brillo bajo

# d="${esc}[4m" # subrayar banner
# e="${esc}[5m" # parpadear banner
# f="${esc}[7m" # invertir colores del banner (foreground and background)
# g="${esc}[8m" # ocultar banner

# h="${esc}[40m" # color del fondo banner: negro
# i="${esc}[41m" # color del fondo banner: rojo
# j="${esc}[42m" # color del fondo banner: verde
# k="${esc}[43m" # color del fondo banner: amarillo
# l="${esc}[44m" # color del fondo banner: blue
# m="${esc}[45m" # color del fondo banner: magenta
# n="${esc}[46m" # color del fondo banner: cyan
# o="${esc}[47m" # color del fondo banner: gris claro
p="${esc}[49m" # color del fondo banner: color por defecto
# k="${esc}[100m" # color del fondo banner: gris obscuro
# r="${esc}[101m" # color del fondo banner: rojo claro
# s="${esc}[102m" # color del fondo banner: verde claro
# t="${esc}[103m" # color del fondo banner: amarillo claro
# u="${esc}[104m" # color del fondo banner: azul claro
# v="${esc}[105m" # color del fondo banner: magenta claro
# w="${esc}[106m" # color del fondo banner: cyan claro
# x="${esc}[107m" # color del fondo banner: blanco

colorfont001="${esc}[38;5;226m" # Amarillo
colorfont002="${esc}[38;5;20m" # Azul
colorfont003="${esc}[38;5;1m" # Rojo
colorfont004="${esc}[38;5;15m" # Blanco

reset="${esc}[0m"

}

initializeANSI

cat << EOF

${p}${colorfont004}

${colorfont003} ******* ** ** **
${colorfont003} /**////** /** /** //
${colorfont003} /** /** ***** ****** /** ***** /** ** ******* ** ** ** **
${colorfont001} /** /** **///** **//// ****** **///**/** /**//**///**/** /**//** **
${colorfont001} /** /**/*******//***** **///**/*******/** /** /** /**/** /** //***
${colorfont003} /** ** /**//// /////**/** /**/**//// /** /** /** /**/** /** **/**
${colorfont003} /******* //****** ****** //******//******/********/** *** /**//****** ** //**
${colorfont003} /////// ////// ////// ////// ////// //////// // /// // ////// // //

${colorfont001} .,;;;;;;;;;;;;;;;;;;;;;;;,,.
${colorfont001} :k00OOOOOOOOOOOOOOOOOOOOOOOO00x,
${colorfont001} :X0:. ...... .cKK;
${colorfont001} dWd. ,d,'o; .kWl
${colorfont001} dWd. .kO:d0; .kWl
${colorfont002} .dWd. .,o00:':' .kWl
${colorfont002} .dWd. .:ldOOo:. .kWl
${colorfont004} .dWd. 'cxOkdl,..lkko' .kWl
${colorfont004} .dWd. .,lkOxc' .cOKKl. .kWl
${colorfont002} .dWd. ,o0NKo. .. .kWl
${colorfont002} .dWd. .:lxkkxl,. .kWl
${colorfont003} .dWd. .:okOdl;. .kWl
${colorfont003} .dWd. 'lxkOo' .kWl
${colorfont003} .dWd. .;x0d' .kWl
${colorfont003} oWx. ,o: .ONc
${colorfont003} ,OXx:;;,,,,,,,,,;;;,,;;;;,,,;:kXk.
${colorfont003} .cxOOOOOOOOOOOOOOOOOOOOOOOOOkd:.

${reset}

EOF

Download, installation, use and screenshots

Actually, no need to download and install anything, since, all the code is up there. It would be rather to copy and paste in its entirety into a text file and call it, perhaps, something like: miracles_lpi_btcolor.sh. Since, so I have done, on my usual MX Linux Respin called Miracles that I always use.

Then, it would only be necessary to execute it with a simple command command towards the path of the file where it was recorded, which in my case was the following:

«bash /opt/milagros/scripts/milagros_lpi_btcolor.sh»

And with that, we would see the Text Banner what does it say "FromLinux" colored with the colors of the Spanish flag and the Image Banner with the logo of "FromLinux" with the colors of the Venezuela's flag.

BTColor: Screenshot

For the rest, it would only be necessary to try inserting new ones Text and Image Banners, created manually or automatically, assigning them the respective colors that are inserted into it, since, for now, it only brings 4 by default, Yellow, Blue, Red and White for pixels (characters) of the Banner.

Generic image for article conclusions

Conclusion

We hope this "useful little post" about «BTColor», a useful little bash shell script that allows to beautify a terminal with text and image banners en black and white or full color, especially for those days of celebration of the #DesktopFriday Linuxeros; is of great interest and utility, for the entire «Comunidad de Software Libre y Código Abierto» and of great contribution to the diffusion of the wonderful, gigantic and growing ecosystem of applications of «GNU/Linux».

For now, if you liked this publicación, Do not stop share it with others, on your favorite websites, channels, groups or communities of social networks or messaging systems, preferably free, open and / or more secure as TelegramSignalMastodon or another of Fediverse, preferably.

And remember to visit our home page at «FromLinux» to explore more news, as well as join our official channel of Telegram from DesdeLinuxWhile, for more information, you can visit any Online library Be OpenLibra y jedit, to access and read digital books (PDFs) on this topic or others.


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

Be the first to comment

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.