[ C O D E ]
02.10.2026 · 5 min
TITLE..........Notes on building an ANSI theme
DATE..........02.10.2026
TAGS..........ansi, nfo, css
SIZE..........5 min

Box-drawing characters, dithered blocks and a strict 80-column grid.

The logo is converted pixel by pixel into half-block cells using the classic 16-color palette.

[ src/halfblock.js ]
js · 13L
1// two pixels per cell: ▀ = fg on top, bg below
2function toHalfBlocks(img, cols) {
3 const rows = [];
4 for (let y = 0; y < img.height; y += 2) {
5 let line = '';
6 for (let x = 0; x < cols; x++) {
7 const top = img.get(x, y), bot = img.get(x, y + 1);
8 line += '\x1b[38;2;' + top + 'm\x1b[48;2;' + bot + 'm▀';
9 }
10 rows.push(line + '\x1b[0m');
11 }
12 return rows.join('\n'); // 0x1b: still the best escape
13}
-- READ ONLY -- utf-8 · js · 13 lines
(c) 2026 yearone.cloud · root@yearone.cloud