Rendering with Chrome in the terminal

Rendering a website with a workable UI, on the command line

Let me introduce you to the Carbonyl web browser!

There isn’t much you can draw in a terminal, you’re guaranteed to be able to render monospace characters in a fixed grid, and that’s it. Escape sequences exist to perform actions like moving the cursor, changing the text color, or mouse tracking. Some came from the days of physical terminals like the DEC VT100, others came from the xterm project. Assuming a popular terminal emulator, we can:

Move the cursor Write Unicode characters Set a character’s background and foreground color Use a 6x6x6 RGB palette, or 24 bits RGB if COLORTERM is set the truecolor One of the unicode characters we can render is the lower half block element U+2584: ▄. Knowing that cells generally have an aspect ratio of 1:2, we can render perfectly square pixels by setting the background color to the top pixel color, and the foregound color to the bottom pixel color.