How do I set up a framebuffer terminal emulator and get more than 8 or 16 colors without running a display server?

What I am trying to do:

I am trying to build a lightweight computer powered by a Pi Zero 2 W, to be operated entirely from the command line with tmux and plug-ins, outputting to a permanently attached display connected by HDMI.

I would like to have more than 16 colors so that I can use nice color schemes in tux, nvim, and other text-based programs. I would also like to see Unicode characters like emojis. And in a pinch, it would be cool to be able to run lightweight graphical programs without a display server – I’m thinking viewing PDFs, for example.

Why I am attempting to run a terminal emulator without a display server:

I understand that the Linux kernel supports only 8 or 16 colors, so to do what I want, I understand that I’ll need to run a terminal emulator through a display interface.

Because I want to run as lean as possible, I don’t want to load Xorg or Wayland to do this – I understand that working directly on a framebuffer is a viable lightweight alternative.

Unfortunately, I do not yet understand enough about Linux initialization, tty, or addressing the framebuffer to set this all up correctly. It is also possible that my understanding thus far is incorrect.

Where I am stuck:

I have installed fbterm (framebuffer terminal emulator), but I can see only 8 colors (again, on the display connected by HDMI).

I have attempted to configure /usr/lib/systemd/system/getty@service to launch fbterm directly at login, but I do not know how to do that correctly, or even if that will accomplish my intended result.

tput colors through tmux in fbterm returns 256 but running this simple test script displays only 8 unique colors [https://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163\].

Over ssh I can see 256 colors, and colors set by tmux plugins appear correct. My issue is that I intend to operate this machine primarily through its own physically attached display.

If anyone here is knowledgeable about doing things on the framebuffer, I would love some advice or even just corrections on any misunderstandings I may have.

Exactly, the linux console can only display 16 colors.
As far a I know fbterm also only supports 16 colors and the development is abondened
To achieve your goal (256 colors, view PDFs and emoijs), without wayland or xserver, you would need to use

  • vc4-kms-v3d driver
  • use a wayland terminal like foot, but without using wayland (yes, this is possible) and build foot by your own, with the use of some special flags
  • create a systemd service to replace getty with foot

I will test this on my RPi 3B before I post a step-by-step guide