Show HN: A GFM+GF-MathJax/Latex HTML formatting adventure

Rainbow text diagrams invade GitHub — half the crowd cheers, half cries “why”

TLDR: A developer hacked GitHub’s text pages to show colored ASCII art using math formatting tricks and terminal color codes. Commenters are split between praising the clever workaround and calling it chaotic, inaccessible, and better solved with proper diagrams or SVG, making it a fun but divisive spectacle.

A Show HN post just turned GitHub into a neon arcade: a dev hacked GitHub‑Flavored Markdown (the way GitHub displays text) plus MathJax (the math tool that draws formulas) so plain old ASCII art can show up in color. Their tool, cheekily named “phart,” captures terminal colors (those ANSI escape codes, the signals that make text red, blue, etc.) and sneaks them into GitHub pages. It even spits out SVGs—picture files—but the real flex is getting rainbow text to live inside Markdown. Cue chaos. One camp is clapping like it’s fireworks night, calling it a “glorious misuse” and linking to Mermaid with a wink. The other camp says, “Please stop turning Markdown into a carnival,” pointing to weird bullet lists per row and the scrolling headache. There’s fretting about accessibility and copy‑paste nightmares, plus purists who want clean diagrams or proper SVGs. The jokes wrote themselves: endless giggles over the name “phart,” “terminal cosplay” memes, and people yelling “HTML crimes” like it’s the season finale. Some say it’s hacker spirit; others say it’s a hacky mess. The common ground? Everyone’s rubbernecking. If you’ve ever wanted color in GFM without screenshots, this is your circus—and your popcorn. Also: someone coined “Mermaid in a Manhole.” Internet, never change.

Key Points

  • The Python tool “phart” was extended to output SVGs that emulate a terminal framebuffer.
  • phart captures ANSI escape sequences and maps ANSI named colors to HTML color equivalents for web display.
  • GFM supports mermaid syntax and a subset of MathJax, but the author sought to preserve raw ASCII text output instead of generated diagrams.
  • A hack using GFM’s MathJax enables colored, fixed-width ASCII text to be pasted into GitHub Markdown documents.
  • The method currently requires rendering each row as a Markdown bullet to handle GFM–MathJax quirks, ensuring correct line-by-line display.

Hottest takes

“This is the most delightful abuse of MathJax I’ve seen” — bytebard
“Please stop turning Markdown into a carnival. Just use SVG” — plain_text_paladin
“You named it ‘phart’ and expect me not to giggle?” — ctrl_lol_del
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.