Back to course

Termux Themes and Colors Customization

Termux Masterclass: From Zero to Linux Power User on Android

39. Termux Themes and Colors Customization

While Termux is fundamentally a command-line interface, you can customize its appearance (colors, fonts, background) to enhance comfort and readability.

1. Using Termux:Styling (Addon)

The easiest way to change Termux's aesthetics is by installing the separate official addon, Termux:Styling (available on F-Droid).

  • After installing Termux:Styling, open the Termux app.
  • Swipe right from the left edge to open the sidebar.
  • Click the 'STYLE' option.
  • This allows you to select preset color schemes and change the font used in the terminal.

2. Manual Color Control (ANSI Codes)

If you prefer manual control or want to customize specific elements (like the PS1 prompt), you can use ANSI escape sequences.

Example Colors:

  • \e[31m: Red foreground
  • \e[32m: Green foreground
  • \e[0m: Reset colors

Example in Bash:

bash $ echo -e "\e[32mThis text is green.\e[0m"

This method is crucial if you want your shell scripts or custom aliases to display colored output, providing visual distinction for warnings or successes.