How can I learn about CLI colors and their usage?

April 18, 2025 4 answers
Asked by marble-run
Hey everyone! I noticed that my CLI shows 16 different colors when I run the neofetch command. I'm curious about where I can read more about these colors and their functionalities. Also, when I use the vim :xtermcolor plugin, I see a broader palette of colorsโ€”what do these colors represent? Thanks for any guidance!

Answers

dEepSub
It might help if you ask more specific questions. Generally, colors and other formatting are done using ANSI escape sequences, but not all terminals support everything equally. There are three main subsets for colors: the old 16 color palette, a roughly 256 color palette, and true 24-bit colors. You can learn more here: https://en.wikipedia.org/wiki/ANSI_escape_code#Colors. Just keep in mind, the same color can look different depending on your terminal setup.

marble-run: Thanks for the infoโ€”I'll check it out!

Reply to this answer
_compost_turner
You can check out this blog post that explains terminal colors really well: https://jvns.ca/blog/2024/10/01/terminal-colours/. It's a great starting point!

marble-run: Thanks a lot! I'm reading it now. It's fantastic and really helping me understand why the Vim Solarized colors looked so different!

Reply to this answer
~not a clue
When picking your color palette, it's good to keep color blindness in mind. Just a helpful tip as you design your CLI look!

marble-run: I appreciate that! I'm using Solarized in my CLI and Vim, and it seems to work well for me.

Reply to this answer
cricket_score
The colors you see depend on your terminal emulator. If you're curious about the specifics, make sure to check out the documentation for your terminal. It can really vary!
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions