Skip to content
Advertisement

How does the neofetch ascii logo determine which color to use?

I am making custom ascii text-images for a cli app, and was curious how these custom colors are designed.

Any ideas?

Thank you,

Advertisement

Answer

If you look at neofetch script on it github page, and search for any distro to see the ascii logo, you will see some codes between some letters, this codes are interpreted by the terminal as a character code indicating “hey start red now..”, you can see how it is simple on they wiki page on the colors section, is pretty like printing colored text code with echo, but they use an “info” method to print and a “color” method to pass the number of the color it want to use. They are both helpers method on the script.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement