A place for my photos, videos and thoughts.

Improving the Shell Experience
Improving the Shell Experience
jordy
jordy
March 30, 2026

Table of Contents

  1. An informative prompt with a colorful theme

  2. Starship and Catppuccin

  3. Pain Points

    • Terminal.app doesn't support hex colors
    • Terminal.app has app-level color preferences that take precedence

An Informative Prompt with a Colorful Theme

My Terminal.app ("Terminal") prompt has looked like The Matrix for years now since I changed its text color to green back when it was in style. With my newfound interest in a Terminal-centric workflow, it is high time that I give my prompt some attention and liven it up with colors and some helpful context.

After a few hours of messing around, I've landed on a solid set-up that I will walkthrough in this post as well as address some of the hiccups I encountered along the way.

OS: Monterey v12.7.6

Starship and Catppuccin

The PS1, PS2, ... shell variables can be used for defining the string that gets displayed for the prompt (PS = prompt string). It is also possible to add colors to the prompt string using color sequences. For example, in ZSH, the prompt can be made yellow by doing this:

PS1="%F{yellow}MyPrompt $ "

I tried exploring this route but quickly realized it was unviable for two reasons: (1) Finding useful prompt strings was a crapshoot. I found myself trying out PS1s shared in reddit comments. I thought devs would be sharing PS1s regularly but I was wrong. And (2), the formatting of the prompt strings was a headache to learn. Adding some colors and a few contextual information quickly made the prompt string lengthy and complex, riddled with escape sequences.

After some research on Google, Reddit and Youtube, I chose to go with Starship over Powerlevel10k and Oh My Zsh!, mostly due to its being shell agnostic. And for the color theme, I decided on the popular, well-documented Catppuccin.

Once Starship was installed using brew as per their instructions (including downloading a Nerd Font), and the example configuration file provided by Catppuccin was copied over, my window immediately looked more pleasant yet sophisticated. The example config file also included configuration for showing project information on the right hand side of the prompt, like git status and language icons. However, the colors seemed slightly off, with the Matrix green still dominating the screen.

Pain Points

Terminal.app doesn't support hex colors

The example Starship config file from Catppuccin specifies the colors with hex color values, like so:

[palettes.catppuccin_mocha]
rosewater = "#f5e0dc"
flamingo = "#f2cdcd"
pink = "#f5c2e7"

These colors most likely make their way into ZSH's prompt string. However, since the Terminal.app on my machine doesn't support True Colors, i.e. only allows colors to be specified using 8-bit ANSI codes, all the colors in the config file were being ignored, and defaulting to the green.

Using kdeldycke's python script, I was able to convert the 6-digit hex colors to roughly equivalent 8-bit ANSI codes. Having done this, the green colors in the prompt were replaced by the proper Catppuccin colors. However, the green was still being used for stdin and stdout. Continue on to the next section to see how this was fixed.

Terminal.app has app-level color preferences that take precedence

The green text color that continued to show for stdin and stdout was directly controlled by Terminal.app's preferences. The graphical program, Terminal, has preferences of its own, among which are the eight standard colors, along with colors for background, text, bold text, selection, and cursor. The standard eight colors are black, red, green, yellow, blue, magenta, cyan, and white. Each of these colors can be mapped to be any color; they are, simply, eight color labels.

By looking at the Catppuccin Style Guide, I was able to ascertain what Catppuccin colors the app colors in the preferences should map to. Other than Magenta and Cyan, all of them should map back to the same name. See below:

Terminal.app | Catppuccin 
-------------------------
Magenta      | pink
Cyan         | teal
Background   | base
Text         | text
Selection    | overlay2
Cursor       | rosewater

Once the Terminal colors were set to their corresponding Catppuccin colors inside the Terminal app's preferences (I copy pasted their hex colors into the color slider), the theme change was finally complete.

Final look:




Continue to other posts below or go to the All Posts page.