Understand any codebase instantly. System intelligence for codebases, built for humans and AI.
TypeScript aiai-memoryclaude-codeclicode-analysiscode-mappingcode-memorycodebase-understandingcodexdeveloper-toolsllmopenclawpersistent-memoryprogram-analysissoftware-architecturesystem-intelligencesystem-mapping
feat(cli): render the repo logo as the setup-notice banner (#605)
Alot1zb62c17d3797e
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex dbb45214..629b8c51 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -280,8 +280,19 @@ jobs:COMPASS_STAGED=0ARCHIVE_LIST="$(mktemp)"trap 'rm -f "$ARCHIVE_LIST"' EXIT- mkdir -p "$STAGING/cli" "$STAGING/core-ingestion" "$STAGING/compass"- cp -rL ix-cli/dist ix-cli/node_modules ix-cli/package.json "$STAGING/cli/"+ mkdir -p "$STAGING/cli" "$STAGING/cli/scripts" "$STAGING/cli/assets" "$STAGING/core-ingestion" "$STAGING/compass"+ # The banner renderer + asset ship INSIDE the cli tree: renderBanner()+ # imports ../../scripts/render-logo.mjs relative to dist/cli, so every+ # delivery layout needs them beside it. The npm tarball is pinned by a+ # test in bootstrap-notice.test.ts; this staging copy is the release+ # counterpart, and the gate below refuses to publish a tarball that+ # would silently print the plain-text heading instead of the banner —+ # the exact failure mode that shipped once because both files lived at+ # the repo root, outside every packaged layout.+ cp -rL ix-cli/scripts/render-logo.mjs ix-cli/scripts/render-logo.d.mts "$STAGING/cli/scripts/"+ cp -rL ix-cli/assets/logo.png "$STAGING/cli/assets/"+ test -f "$STAGING/cli/scripts/render-logo.mjs" && test -f "$STAGING/cli/assets/logo.png" \+ || { echo "::error::banner inputs missing from staging (cli/scripts/render-logo.mjs, cli/assets/logo.png) — the setup notice would silently lose the logo"; exit 1; }cp -rL core-ingestion/dist core-ingestion/node_modules core-ingestion/package.json "$STAGING/core-ingestion/"if [ -f compass-dist/index.html ]; thencp -r compass-dist/* "$STAGING/compass/"diff --git a/assets/logo.png b/ix-cli/assets/logo.pngsimilarity index 100%rename from assets/logo.pngrename to ix-cli/assets/logo.pngdiff --git a/ix-cli/scripts/render-logo.d.mts b/ix-cli/scripts/render-logo.d.mtsnew file mode 100644index 00000000..66935474--- /dev/null+++ b/ix-cli/scripts/render-logo.d.mts@@ -0,0 +1,27 @@+// Types for scripts/render-logo.mjs (imported by ix-cli tests; the CLI spawns+// it as a subprocess, so this file is types-only for the repo's TS surface).+export declare class LogoError extends Error {+ code: number;+}+export declare function resolveColorMode(+ colorArg: string,+ env?: NodeJS.ProcessEnv,+): "truecolor" | "256" | "ascii";+export declare function renderLogo(opts?: {+ width?: number;+ color?: string;+ bg?: "brand" | "none";+ file?: string;+ json?: boolean;+ env?: NodeJS.ProcessEnv;+}): string | {+ ok: boolean;+ tool: string;+ color: string;+ bg: string;+ file: { path: string; bytes: number };+ source: { width: number; height: number };+ grid: { cols: number; rows: number };+ cells: { total: number; ink: number };+ truncated: boolean;+};diff --git a/ix-cli/scripts/render-logo.mjs b/ix-cli/scripts/render-logo.mjsnew file mode 100644index 00000000..d7191df7--- /dev/null+++ b/ix-cli/scripts/render-logo.mjs@@ -0,0 +1,285 @@+#!/usr/bin/env node+// render-logo.mjs — render assets/logo.png as a terminal banner. Zero deps.+// The repo asset is the single source of truth; no hand-maintained art lives here.+//+// Algorithm: coverage-thresholded supersampling. Each half-cell samples the+// source at bounded supersample density, counts ink coverage (alpha > 128, or+// for no-alpha PNGs color distance from the backdrop), snaps to ink at a low+// threshold (sharp shape boundaries), and averages color only over covered+// pixels (the brand gradient stays sharp inside the mark).+//+// Library use:+// import { renderLogo } from "./ix-cli/scripts/render-logo.mjs";+// const ansi = renderLogo({ width: 56, color: "truecolor" }); // -> string+// const info = renderLogo({ width: 56, json: true }); // -> object+//+// CLI:+// node scripts/render-logo.mjs [--width N] [--color auto|truecolor|256|ascii]+// [--bg brand|none] [--file path] [--json]+// Exit codes: 0 ok · 1 usage/file error · 2 unsupported/truncated (toolscan-aligned)+import { openSync, closeSync, readSync, fstatSync, constants as fsConstants } from "node:fs";+import { inflateSync } from "node:zlib";+import { dirname, resolve } from "node:path";+import { fileURLToPath } from "node:url";++const TOOL = "render-logo";+const BG = [5, 10, 30]; // brand navy (assets/logo.png backdrop)+const INK_COVERAGE = 0.12; // snap-to-ink threshold per half-cell+const ALPHA_EDGE = 128; // pixel counts as ink above this alpha+const BG_TOL = 36; // no-alpha PNGs: pixel is ink when its color+ // distance from the backdrop exceeds this+const MAX_FILE_BYTES = 20 * 1024 * 1024;+const WIDTH_MIN = 8, WIDTH_MAX = 120, ROWS_MAX = 60;+const RAMP = " .:-=+*#%@";++export class LogoError extends Error {+ constructor(message, code) { super(message); this.code = code; }+}++// --- PNG decode (depth 8, truecolor/truecolor+alpha/grayscale, no interlace) ---+// Read the input through ONE open handle: stat the handle, not the path.+// statSync(path)+readFileSync(path) resolve the path independently, so the size+// guard can bless a different file than the one read (CodeQL js/file-system-+// race, high), and readFileSync on a FIFO blocks forever — --file is a+// user-supplied flag, so both are reachable. O_NONBLOCK makes the open itself+// non-blocking; fstat on the handle then rejects non-regular files (FIFOs,+// devices) and enforces the size cap against the exact inode that is read.+function readPngFile(fileArg) {+ let fd;+ try { fd = openSync(fileArg, fsConstants.O_RDONLY | fsConstants.O_NONBLOCK); }+ catch { throw new LogoError(`file not found: ${fileArg}`, 1); }+ try {+ const st = fstatSync(fd);+ if (!st.isFile()) throw new LogoError(`not a regular file: ${fileArg}`, 1);+ if (st.size > MAX_FILE_BYTES) throw new LogoError(`file exceeds ${MAX_FILE_BYTES} bytes: ${fileArg}`, 2);+ const buf = Buffer.alloc(st.size);+ try {+ let read = 0;+ while (read < st.size) {+ const n = readSync(fd, buf, read, st.size - read, read);+ if (n === 0) break;+ read += n;+ }+ } catch (e) { throw new LogoError(`unreadable file: ${e.message}`, 1); }+ return { buf, bytes: st.size };+ } finally {+ closeSync(fd);+ }+}++function decodePng(fileArg) {+ const { buf, bytes } = readPngFile(fileArg);+ let off = 8, ihdr, idat = [];+ while (off + 12 <= buf.length) {+ const len = buf.readUInt32BE(off), type = buf.toString("ascii", off + 4, off + 8);+ const data = buf.subarray(off + 8, off + 8 + len);+ if (type === "IHDR") ihdr = { w: data.readUInt32BE(0), h: data.readUInt32BE(4), depth: data[8], color: data[9], interlace: data[12] };+ else if (type === "IDAT") idat.push(data);+ else if (type === "IEND") break;+ off += 12 + len;+ }+ if (!ihdr) throw new LogoError("not a PNG (no IHDR)", 2);+ const { w, h, depth, color, interlace } = ihdr;+ if (depth !== 8 || interlace !== 0 || ![0, 2, 6].includes(color)) {+ throw new LogoError(`unsupported PNG shape (depth=${depth} color=${color} interlace=${interlace})`, 2);+ }+ const bpp = color === 6 ? 4 : color === 2 ? 3 : 1;+ let raw;+ try { raw = inflateSync(Buffer.concat(idat)); } catch (e) { throw new LogoError(`corrupt PNG (${e.message})`, 2); }+ const stride = w * bpp;+ if (raw.length < h * (stride + 1)) throw new LogoError("truncated PNG data", 2);+ const img = Buffer.alloc(h * stride);+ const paeth = (a, b, c) => { const p = a + b - c, pa = Math.abs(p - a), pb = Math.abs(p - b), pc = Math.abs(p - c); return pa <= pb && pa <= pc ? a : pb <= pc ? b : c; };+ for (let y = 0; y < h; y++) {+ const f = raw[y * (stride + 1)];+ const row = raw.subarray(y * (stride + 1) + 1, (y + 1) * (stride + 1));+ for (let x = 0; x < stride; x++) {+ const left = x >= bpp ? img[y * stride + x - bpp] : 0;+ const up = y > 0 ? img[(y - 1) * stride + x] : 0;+ const ul = y > 0 && x >= bpp ? img[(y - 1) * stride + x - bpp] : 0;+ let v = row[x];+ if (f === 1) v += left; else if (f === 2) v += up; else if (f === 3) v += (left + up) >> 1; else if (f === 4) v += paeth(left, up, ul);+ img[y * stride + x] = v & 0xff;+ }+ }+ return { img, w, h, stride, color, bpp, bytes };+}++// --- palette (ANSI-256) ---+const Q = [0, 95, 135, 175, 215, 255];+const pal256 = (i) => (i < 16 ? [[0,0,0],[128,0,0],[0,128,0],[128,128,0],[0,0,128],[128,0,128],[0,128,128],[192,192,192],[128,128,128],[255,0,0],[0,255,0],[255,255,0],[0,0,255],[255,0,255],[0,255,255],[255,255,255]][i]+ : i < 232 ? [Q[Math.floor((i - 16) / 36)], Q[Math.floor((i - 16) / 6) % 6], Q[(i - 16) % 6]]+ : (() => { const v = 8 + (i - 232) * 10; return [v, v, v]; })());+const dist = (a, b) => Math.abs(a[0] - b[0]) + Math.abs(a[1] - b[1]) + Math.abs(a[2] - b[2]);+function to256(rgb) {+ const qi = (v) => Q.reduce((best, qv, i) => (Math.abs(qv - v) < Math.abs(Q[best] - v) ? i : best), 0);+ const cube = 16 + 36 * qi(rgb[0]) + 6 * qi(rgb[1]) + qi(rgb[2]);+ const gray = 232 + Math.min(23, Math.round((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]) / 255 * 23));+ return dist(rgb, pal256(cube)) <= dist(rgb, pal256(gray)) ? cube : gray;+}++export function resolveColorMode(colorArg, env = process.env) {+ if (colorArg !== "auto") {+ if (!["truecolor", "256", "ascii"].includes(colorArg)) throw new LogoError("--color must be auto|truecolor|256|ascii", 1);+ return colorArg;+ }+ if (env.NO_COLOR || env.TERM === "dumb") return "ascii";+ if (env.FORCE_COLOR === "0") return "ascii";+ if ((env.COLORTERM ?? "").includes("truecolor") || env.FORCE_COLOR === "3") return "truecolor";+ if (env.TERM && env.TERM !== "dumb") return "256";+ return "ascii";+}++// --- render (library entry) ---+export function renderLogo(opts = {}) {+ const width = opts.width ?? 56;+ if (!Number.isInteger(width) || width < WIDTH_MIN || width > WIDTH_MAX) {+ throw new LogoError(`--width must be an integer ${WIDTH_MIN}..${WIDTH_MAX}`, 1);+ }+ const bgMode = opts.bg ?? "brand";+ if (!"brand none".split(" ").includes(bgMode)) throw new LogoError("--bg must be brand|none", 1);+ const fileArg = opts.file ?? resolve(dirname(fileURLToPath(import.meta.url)), "..", "assets", "logo.png");+ const { img, w, h, stride, color, bpp, bytes } = decodePng(fileArg);+ const mode = resolveColorMode(opts.color ?? "auto", opts.env);++ // ink test: alpha PNGs decide by alpha; no-alpha PNGs by color distance from+ // the backdrop (an opaque navy pixel is BACKGROUND, not ink — color type 2+ // reports alpha 255 for every pixel, so alpha alone would mark the whole+ // canvas ink and blur the banner).+ const isInk = (i) => (color === 6+ ? img[i + 3] > ALPHA_EDGE+ : Math.abs(img[i] - BG[0]) + Math.abs(img[i + 1] - BG[1]) + Math.abs(img[i + 2] - BG[2]) > BG_TOL);++ function halfCell(x0, x1, y0, y1) {+ const sx = Math.max(1, Math.min(12, Math.floor((x1 - x0) / 3) || 1));+ const sy = Math.max(1, Math.min(12, Math.floor((y1 - y0) / 3) || 1));+ let covered = 0, samples = 0, r = 0, g = 0, b = 0;+ for (let y = y0; y < Math.max(y1, y0 + 1); y += sy)+ for (let x = x0; x < Math.max(x1, x0 + 1); x += sx) {+ const i = y * stride + x * bpp;+ samples++;+ if (!isInk(i)) continue;+ covered++;+ r += img[i]; g += img[i + 1]; b += img[i + 2];+ }+ const cov = covered / Math.max(1, samples);+ if (cov < INK_COVERAGE) return { ink: false, rgb: BG, lum: 0, cov };+ const k = covered || 1;+ const rgb = [r / k, g / k, b / k];+ return { ink: true, rgb, lum: 0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2], cov };+ }++ const rows = Math.max(2, Math.min(ROWS_MAX, Math.round((width * h) / w / 2)));+ const cells = [];+ for (let ry = 0; ry < rows; ry++)+ for (let rx = 0; rx < width; rx++) {+ const x0 = Math.floor((rx * w) / width), x1 = Math.max(x0 + 1, Math.floor(((rx + 1) * w) / width));+ const top = halfCell(x0, x1, Math.floor(((ry * 2) * h) / (rows * 2)), Math.max(1, Math.floor((((ry * 2) + 1) * h) / (rows * 2))));+ const bot = halfCell(x0, x1, Math.floor((((ry * 2) + 1) * h) / (rows * 2)), Math.max(1, Math.floor((((ry * 2) + 2) * h) / (rows * 2))));+ cells.push({ top, bot });+ }++ let out = "";+ let lastSig = "";+ for (let i = 0; i < cells.length; i++) {+ const { top, bot } = cells[i];+ if (i % width === 0) out += "\n";+ if (!top.ink && !bot.ink) { out += " "; lastSig = ""; continue; }+ if (mode === "ascii") {+ const intensity = Math.max(top.cov * (top.lum / 255), bot.cov * (bot.lum / 255)) * 1.6;+ out += RAMP[Math.min(RAMP.length - 1, Math.max(top.ink || bot.ink ? 1 : 0, Math.round(intensity * (RAMP.length - 1))))];+ continue;+ }+ if (bgMode === "none") {+ // Per-shape emission: paint only the half-cells that carry ink, never the+ // backdrop. A top-only cell is ▀ with fg=top and no background; a+ // bottom-only cell is ▄ with fg=bot; a full cell paints ▀ with fg=top,+ // bg=bot exactly like brand mode. The block stays the brand shape's own+ // pixels — nothing is drawn behind it.+ const fTop = mode === "truecolor"+ ? `38;2;${top.rgb.map((v) => Math.round(v)).join(";")}`+ : `38;5;${to256(top.rgb)}`;+ const fBot = mode === "truecolor"+ ? `38;2;${bot.rgb.map((v) => Math.round(v)).join(";")}`+ : `38;5;${to256(bot.rgb)}`;+ if (top.ink && bot.ink) {+ const sig = mode === "truecolor" ? `${top.rgb.map(Math.round)}/${bot.rgb.map(Math.round)}` : `${to256(top.rgb)}/${to256(bot.rgb)}`;+ if (sig !== lastSig) { out += `\x1b[0;${fTop};${fBot}m`; lastSig = sig; }+ out += "▀";+ } else if (top.ink) {+ const sig = mode === "truecolor" ? `${top.rgb.map(Math.round)}/-` : `${to256(top.rgb)}/-`;+ if (sig !== lastSig) { out += `\x1b[0;${fTop}m`; lastSig = sig; }+ out += "▀";+ } else {+ const sig = mode === "truecolor" ? `-${bot.rgb.map(Math.round)}` : `-${to256(bot.rgb)}`;+ if (sig !== lastSig) { out += `\x1b[0;${fBot}m`; lastSig = sig; }+ out += "▄";+ }+ continue;+ }+ const sig = mode === "truecolor"+ ? `${top.rgb.map(Math.round)}/${bot.rgb.map(Math.round)}`+ : `${to256(top.rgb)}/${to256(bot.rgb)}`;+ if (sig !== lastSig) {+ const f = mode === "truecolor"+ ? `38;2;${top.rgb.map((v) => Math.round(v)).join(";")}`+ : `38;5;${to256(top.rgb)}`;+ const b = mode === "truecolor"+ ? `48;2;${bot.rgb.map((v) => Math.round(v)).join(";")}`+ : `48;5;${to256(bot.rgb)}`;+ out += `\x1b[0;${f};${b}m`;+ lastSig = sig;+ }+ out += "▀";+ }+ if (mode !== "ascii") out += "\x1b[0m"; // no escapes at all under NO_COLOR/ascii+out += "\n";++ if (opts.json) {+ const inkCells = cells.filter((c) => c.top.ink || c.bot.ink).length;+ return {+ ok: true, tool: TOOL, color: mode, bg: bgMode, file: { path: String(fileArg), bytes },+ source: { width: w, height: h }, grid: { cols: width, rows },+ cells: { total: cells.length, ink: inkCells }, truncated: false,+ };+ }+ return out;+}++// --- CLI (thin: parse, render, report) ---+const isCli = process.argv[1] && resolve(process.argv[1]) === fileURLToPath(import.meta.url);+if (isCli) {+ const args = process.argv.slice(2);+ const flagJson = () => args.includes("--json");+ const flag = (name) => {+ const i = args.indexOf(name);+ if (i === -1) return undefined;+ const v = args[i + 1];+ if (v === undefined || v.startsWith("--")) return null; // null = missing value+ return v;+ };+ const fail = (msg, code) => {+ if (flagJson()) process.stdout.write(`${JSON.stringify({ ok: false, tool: TOOL, error: msg })}\n`);+ else process.stderr.write(`${TOOL}: ${msg}\n`);+ process.exit(code);+ };+ const get = (name) => {+ const v = flag(name);+ if (v === null) fail(`missing value for ${name}`, 1);+ return v;+ };+ const bgRaw = get("--bg");+ if (bgRaw !== undefined && !"brand none".split(" ").includes(bgRaw)) fail("--bg must be brand|none", 1);+ try {+ const result = renderLogo({+ width: flag("--width") !== undefined ? Number(get("--width")) : 56,+ color: get("--color") ?? "auto",+ bg: bgRaw ?? "brand",+ file: get("--file"),+ json: flagJson(),+ });+ process.stdout.write(typeof result === "string" ? result : `${JSON.stringify(result)}\n`);+ } catch (e) {+ fail(e instanceof LogoError ? e.message : e.message, e instanceof LogoError ? e.code : 1);+ }+}diff --git a/ix-cli/src/cli/__tests__/bootstrap-notice.test.ts b/ix-cli/src/cli/__tests__/bootstrap-notice.test.tsindex 55e22d85..f182672b 100644--- a/ix-cli/src/cli/__tests__/bootstrap-notice.test.ts+++ b/ix-cli/src/cli/__tests__/bootstrap-notice.test.ts@@ -1,7 +1,26 @@import { describe, it, expect, vi, afterEach } from "vitest";+import { execFileSync } from "node:child_process";+import { renameSync, readdirSync, readFileSync } from "node:fs";+import { join } from "node:path";import { emitSetupNotice } from "../bootstrap.js";+import { renderBanner, resetBannerCacheForTests } from "../banner.js";+import { renderLogo, resolveColorMode, LogoError } from "../../../scripts/render-logo.mjs";+import { fileURLToPath } from "node:url";+import { spawnSync } from "node:child_process";-afterEach(() => vi.restoreAllMocks());+// The renderer + asset now live INSIDE the package (fix for the review+// finding that the first banner PR shipped them at the repo root, where no+// install layout — npm tarball or release staging — ever carried them). These+// bases serve both the behavioral pins below and the deliverability pin.+const PKG_ROOT = join(fileURLToPath(import.meta.url), "..", "..", "..", ".."); // ix-cli/+const RENDERER = join(PKG_ROOT, "scripts", "render-logo.mjs");+const LOGO_ASSET = join(PKG_ROOT, "assets", "logo.png");++afterEach(() => {+ vi.restoreAllMocks();+ vi.unstubAllEnvs();+ resetBannerCacheForTests();+});describe("emitSetupNotice", () => {it("writes setup notices to stderr, never stdout (keeps machine output clean)", () => {@@ -16,15 +35,223 @@ describe("emitSetupNotice", () => {const stderrText = err.mock.calls.map((c) => String(c[0])).join("\n");expect(stderrText).toContain("Registered workspace");expect(stderrText).toContain("my-workspace");- });+ }, 15000);- it("emits nothing when neither config nor workspace was newly created", () => {+ it("shows the logo banner when the renderer + asset are present", () => {const out = vi.spyOn(console, "log").mockImplementation(() => {});const err = vi.spyOn(console, "error").mockImplementation(() => {});- emitSetupNotice(false, false, "x");+ emitSetupNotice(true, false, "ws");++ expect(out).not.toHaveBeenCalled();+ const banner = renderBanner();+ expect(banner).not.toBeNull();+ const stderrText = err.mock.calls.map((c) => String(c[0])).join("\n");+ // (whatever color mode this environment resolves), not the text fallback.+ expect(stderrText).toContain(banner!);+ expect(stderrText).not.toContain("Ix");+ }, 15000);++ it("falls back to the plain text heading when the asset is absent (absent-safe)", () => {+ // A layout without the packaged asset must degrade to the old heading —+ // never throw, never leave the notice block empty. The renderer reads the+ // asset at call time, so renaming it exercises exactly that layout.+ // Within-file tests run sequentially, so the temporary rename is invisible+ // to the other pins (and afterEach resets the banner cache).+ const out = vi.spyOn(console, "log").mockImplementation(() => {});+ const err = vi.spyOn(console, "error").mockImplementation(() => {});++ const assetBackup = LOGO_ASSET + ".bak";+ renameSync(LOGO_ASSET, assetBackup);+ try {+ emitSetupNotice(true, false, "ws");+ const stderrText = err.mock.calls.map((c) => String(c[0])).join("\n");+ expect(stderrText).toContain("Ix");+ expect(stderrText).not.toContain("▀");+ } finally {+ renameSync(assetBackup, LOGO_ASSET);+ }+ expect(out).not.toHaveBeenCalled();+ });+});++describe("renderBanner", () => {+ it("returns a non-empty banner containing half-block cells", () => {+ // renderBanner() spawns the renderer with the inherited env; CI runners+ // may have TERM unset/dumb (resolving to the ASCII fallback, which has no+ // half-blocks). Pin the environment so this always exercises the color+ // path — the assertion itself stays exact.+ vi.stubEnv("TERM", "xterm-256color");+ vi.stubEnv("NO_COLOR", "");+ vi.stubEnv("COLORTERM", "");+ const banner = renderBanner();+ expect(banner).not.toBeNull();+ expect(banner!.includes("▀")).toBe(true);+ // every non-empty line indented two spaces for the notice block+ // (a leading blank line is intentional spacing)+ for (const line of banner!.split("\n")) {+ if (line.trim()) expect(line.startsWith(" ")).toBe(true);+ }+ }, 15000);+ it("renders ASCII under NO_COLOR and never writes stdout", () => {+ const out = vi.spyOn(console, "log").mockImplementation(() => {});+ const raw = execFileSync(+ process.execPath,+ [RENDERER, "--width", "16"],+ { encoding: "utf8", env: { ...process.env, NO_COLOR: "1" } },+ );+ expect(raw).not.toMatch(/\x1b\[/); // no escapes in no-color modeexpect(out).not.toHaveBeenCalled();- expect(err).not.toHaveBeenCalled();});});++describe("banner deliverability (the inputs must ship)", () => {+ // History: the first banner PR kept scripts/render-logo.mjs + assets/logo.png+ // at the repo ROOT — a layout no delivery path packs (npm publishes from+ // ix-cli/; release staging copies exactly three trees) — so every installed+ // run silently fell back to the plain heading while all tests (run from a+ // checkout, where the files exist) passed. These pins turn that failure loud+ // at PR time: if the inputs leave the package or the staging tree, CI fails.++ it("npm pack carries the renderer and the asset inside the tarball", () => {+ const res = spawnSync("npm", ["pack", "--dry-run", "--json"], {+ cwd: PKG_ROOT,+ encoding: "utf8",+ shell: process.platform === "win32",+ });+ expect(res.status).toBe(0);+ const packed = (JSON.parse(res.stdout)[0].files as { path: string }[]).map((f) => f.path);+ expect(packed).toContain("scripts/render-logo.mjs");+ expect(packed).toContain("assets/logo.png");+ }, 30_000); // budget, not a weaker assertion: npm pack is slow under full-suite load++ it("release staging carries them beside dist/cli, with a gate that refuses to publish without them", () => {+ const wf = readFileSync(join(PKG_ROOT, "..", ".github", "workflows", "release.yml"), "utf8");+ expect(wf).toContain("ix-cli/scripts/render-logo.mjs");+ expect(wf).toContain("ix-cli/assets/logo.png");+ expect(wf).toContain("banner inputs missing");+ });+});++describe("render-logo CLI contract", () => {+ const run = (args: string[], env: NodeJS.ProcessEnv = {}) =>+ execFileSync(process.execPath, [RENDERER, ...args], {+ encoding: "utf8",+ env: { ...process.env, ...env },+ });++ it("exit 0 + JSON honesty block on --json (cells/ink/truncated)", () => {+ const meta = JSON.parse(run(["--width", "16", "--json"]));+ expect(meta.ok).toBe(true);+ expect(meta.tool).toBe("render-logo");+ expect(meta.truncated).toBe(false);+ expect(meta.cells.ink).toBeGreaterThan(0);+ expect(meta.cells.ink).toBeLessThan(meta.cells.total);+ });++ it("usage error exits 1 and reports to stderr, payload-free stdout", () => {+ let code = 0, stderrText = "", stdoutText = "";+ try {+ execFileSync(process.execPath, [RENDERER, "--width", "4"], { encoding: "utf8", stdio: "pipe" });+ } catch (e: any) {+ code = e.status;+ stderrText = e.stderr?.toString() ?? "";+ stdoutText = e.stdout?.toString() ?? "";+ }+ expect(code).toBe(1);+ expect(stderrText).toContain("--width");+ expect(stdoutText).toBe("");+ });++ it("library renderLogo() matches the CLI byte-for-byte (single algorithm)", () => {+ const viaCli = run(["--width", "24", "--color", "ascii"]);+ const viaLib = renderLogo({ width: 24, color: "ascii" });+ expect(viaLib).toBe(viaCli);+ }, 30_000); // budget, not a weaker assertion: the in-process render decodes the+ // full PNG (~16M byte-samples), and v8 coverage instrumentation inflates+ // that fixed cost ~10x (measured ~7s vs ~0.7s) on every coverage run; the+ // byte-identity assertion above stays exact.++ it("resolveColorMode honors NO_COLOR / COLORTERM / TERM", () => {+ expect(resolveColorMode("auto", { NO_COLOR: "1" } as NodeJS.ProcessEnv)).toBe("ascii");+ expect(resolveColorMode("auto", { COLORTERM: "truecolor", TERM: "xterm" } as NodeJS.ProcessEnv)).toBe("truecolor");+ expect(resolveColorMode("auto", { TERM: "xterm-256color" } as NodeJS.ProcessEnv)).toBe("256");+ expect(resolveColorMode("ascii")).toBe("ascii");+ });++ it("LogoError carries the toolscan-aligned exit code", () => {+ try {+ renderLogo({ width: 4 });+ expect.unreachable("width below minimum must throw");+ } catch (e) {+ expect(e).toBeInstanceOf(LogoError);+ expect((e as LogoError).code).toBe(1);+ }+ });++ it("--bg none paints only shape pixels: the backdrop never appears as a background", () => {+ // brand mode paints the navy canvas behind every partial cell; none mode+ // must never emit the backdrop constant as a background color.+ const brand = run(["--width", "20", "--color", "truecolor"]);+ const none = run(["--width", "20", "--color", "truecolor", "--bg", "none"]);+ expect(brand).toContain("48;2;5;10;30"); // brand paints the backdrop+ expect(none).not.toContain("48;2;5;10;30"); // none never does+ expect(none).toContain("▄"); // bottom-only cells emit the lower half-block+ expect(none).not.toBe(brand);+ });++ it("--bg none is byte-identical through the library and the CLI", () => {+ const viaCli = run(["--width", "24", "--color", "ascii", "--bg", "none"]);+ const viaLib = renderLogo({ width: 24, color: "ascii", bg: "none" });+ expect(viaLib).toBe(viaCli);+ }, 30_000); // budget, not a weaker assertion (see the sibling lib≡CLI pin)++ it("--bg none is reported honestly in the JSON block; default is brand", () => {+ expect(JSON.parse(run(["--width", "16", "--bg", "none", "--json"])).bg).toBe("none");+ expect(JSON.parse(run(["--width", "16", "--json"])).bg).toBe("brand");+ });++ it("--bg bogus exits 1 with the reason on stderr and a payload-free stdout", () => {+ let code = 0, stderrText = "", stdoutText = "";+ try {+ execFileSync(process.execPath, [RENDERER, "--width", "16", "--bg", "bogus"], { encoding: "utf8", stdio: "pipe" });+ } catch (e: any) {+ code = e.status;+ stderrText = e.stderr?.toString() ?? "";+ stdoutText = e.stdout?.toString() ?? "";+ }+ expect(code).toBe(1);+ expect(stderrText).toContain("--bg");+ expect(stdoutText).toBe("");+ });+});++describe("output stability (golden fixtures)", () => {+ // output-samples/*.ans are byte-pinned renders. Each filename encodes its+ // invocation (width-color[-bg-none]); the pin re-renders and compares, so+ // accidental visual drift fails CI. Update goldens ONLY in a dedicated,+ // stated commit that says what changed and why.+ // Goldens remain a repo-root artifact shared by the renderer's own docs.+ const GOLDENS_DIR = join(fileURLToPath(import.meta.url), "..", "..", "..", "..", "..", "output-samples");+ const goldens = readdirSync(GOLDENS_DIR).filter((f) => f.endsWith(".ans"));++ it("ships goldens covering every color mode and both bg modes", () => {+ expect(goldens.length).toBeGreaterThanOrEqual(6);+ expect(goldens.some((f) => f.includes("ascii"))).toBe(true);+ expect(goldens.some((f) => f.includes("256"))).toBe(true);+ expect(goldens.some((f) => f.endsWith("bg-none.ans"))).toBe(true);+ });++ for (const g of goldens) {+ it(`current render is byte-identical to the golden fixture: ${g}`, () => {+ const m = g.match(/^width-(\d+)-(truecolor|256|ascii)(-bg-none)?\.ans$/);+ expect(m, `fixture name must encode its invocation: ${g}`).not.toBeNull();+ const args = ["--width", m![1], "--color", m![2]];+ if (m![3]) args.push("--bg", "none");+ const expected = readFileSync(join(GOLDENS_DIR, g), "utf8");+ const actual = execFileSync(process.execPath, [RENDERER, ...args], { encoding: "utf8" });+ expect(actual).toBe(expected);+ });+ }+});diff --git a/ix-cli/src/cli/banner.ts b/ix-cli/src/cli/banner.tsnew file mode 100644index 00000000..99003656--- /dev/null+++ b/ix-cli/src/cli/banner.ts@@ -0,0 +1,79 @@+import { existsSync } from "node:fs";+import { dirname, join } from "node:path";+import { fileURLToPath } from "node:url";++type RenderLogo = typeof import("../../scripts/render-logo.mjs")["renderLogo"];++/**+ * The Ix logo as a terminal banner, rendered at print time from the packaged+ * assets/logo.png by the zero-dependency renderer in scripts/render-logo.mjs —+ * imported in-process (no subprocess, no spawn cost). The PNG is the only+ * maintained art; the terminal render is derived from it.+ *+ * Contract (mirrors emitSetupNotice):+ * - stderr-only surface: this returns a string for the caller to emit to+ * stderr; it never writes to stdout (machine-readable output stays clean).+ * - absent-safe: a layout that did not ship the renderer or the asset is NOT+ * an error — the loader below resolves to null and emitSetupNotice falls+ * back to the plain text heading. The banner is decoration, never+ * load-bearing. This is why the import is dynamic behind a probe: a static+ * import of the renderer would crash this module at load time in any layout+ * that copied dist/ without scripts/ + assets/ (e.g. the watch child+ * runtime cache), turning a missing decoration into a broken CLI.+ * - honors NO_COLOR / TERM=dumb (the renderer itself resolves the mode): the+ * no-color path renders the ASCII fallback, also fine to show.+ *+ * Where the inputs live: scripts/ + assets/ inside the package, beside the+ * compiled dist/cli/banner.js. The ESM specifier resolves relative to this+ * file identically in every layout that ships them — repo checkout, npm+ * tarball, and the release staging tree (which copies them explicitly, gated+ * in release.yml; the npm tarball is pinned by a test in+ * bootstrap-notice.test.ts). The probe checks the same package-relative+ * location, so it can only disagree with the import if the files vanish+ * between probe and import — in which case the catch degrades to null.+ */+let renderLogoFn: RenderLogo | null = null;+try {+ const pkgDir = join(dirname(fileURLToPath(import.meta.url)), "..", "..");+ if (+ existsSync(join(pkgDir, "scripts", "render-logo.mjs")) &&+ existsSync(join(pkgDir, "assets", "logo.png"))+ ) {+ renderLogoFn = (await import("../../scripts/render-logo.mjs")).renderLogo;+ }+} catch {+ renderLogoFn = null;+}++let cache: string | null | undefined;++export function renderBanner(): string | null {+ // The setup notice prints at most once per run; the module-level cache makes+ // a second call free without repeating the decode (~10ms in-process vs the+ // subprocess + interpreter startup this replaced).+ if (cache !== undefined) return cache;+ if (!renderLogoFn) return (cache = null);++ try {+ const out = renderLogoFn({ width: 48, color: "auto" });+ // renderLogo returns the ANSI string (or a JSON block when asked — never+ // here). A render that produced no visible cells would silently corrupt+ // the notice block; treat either as failure and fall back.+ if (typeof out !== "string" || !out.trim()) return (cache = null);++ // Indent the banner to align with the notice text block.+ cache = out+ .replace(/\n$/, "")+ .split("\n")+ .map((l) => (l.trim() ? ` ${l}` : l))+ .join("\n");+ } catch {+ cache = null; // any decode/unsupported-asset failure: plain-text fallback+ }+ return cache;+}++/** Test hook: reset the memoized banner result. */+export function resetBannerCacheForTests(): void {+ cache = undefined;+}diff --git a/ix-cli/src/cli/bootstrap.ts b/ix-cli/src/cli/bootstrap.tsindex 4727380e..720f9a93 100644--- a/ix-cli/src/cli/bootstrap.ts+++ b/ix-cli/src/cli/bootstrap.ts@@ -4,6 +4,7 @@ import { homedir } from "node:os";import { execFileSync } from "node:child_process";import chalk from "chalk";import { IxClient } from "../client/api.js";+import { renderBanner } from "./banner.js";import { canonicalWorkspacePath, getEndpoint, loadConfig, saveConfig, findWorkspaceForCwd, getDefaultWorkspace, type WorkspaceConfig } from "./config.js";import { workspaceIdForPath } from "./system.js";import { readBackendHealth } from "./commands/upgrade.js";@@ -153,7 +154,12 @@ export async function ensureBackendAvailable(): Promise<void> {*/export function emitSetupNotice(createdConfig: boolean, registered: boolean, name: string): void {if (!createdConfig && !registered) return;- console.error(chalk.bold("Ix\n"));+ // The logo banner (rendered from assets/logo.png at print time) when the+ // terminal can show it; the plain text heading otherwise. Both stderr only —+ // stdout stays clean for --format json|llm consumers.+ const banner = renderBanner();+ if (banner) console.error(banner);+ else console.error(chalk.bold("Ix\n"));if (createdConfig) console.error(chalk.dim(`Created default config.`));if (registered) console.error(chalk.dim(`Registered workspace "${name}".`));console.error();diff --git a/output-samples/width-48-256-bg-none.ans b/output-samples/width-48-256-bg-none.ansnew file mode 100644index 00000000..8ff620d8--- /dev/null+++ b/output-samples/width-48-256-bg-none.ans@@ -0,0 +1,25 @@+++++++ [0;38;5;17m▄▄[0;38;5;17;38;5;17m▀[0;38;5;17m▀+ [0;38;5;24m▄▄▄[0;38;5;24;38;5;24m▀▀[0;38;5;17;38;5;17m▀▀+ [0;38;5;25m▄▄▄[0;38;5;25;38;5;25m▀▀[0;38;5;24;38;5;25m▀[0;38;5;24m▀▀[0;38;5;24;38;5;24m▀▀[0;38;5;24m▀+ [0;38;5;69m▄[0;38;5;68m▄▄▄[0;38;5;68;38;5;68m▀▀[0;38;5;62;38;5;62m▀▀[0;38;5;26;38;5;26m▀[0;38;5;25m▀▀[0;38;5;25;38;5;17m▀[0;38;5;17m▄[0;38;5;17;38;5;17m▀ [0;38;5;24;38;5;24m▀▀[0;38;5;24m▀+ [0;38;5;75;38;5;75m▀▀▀[0;38;5;69;38;5;68m▀[0;38;5;69m▀[0;38;5;68m▀▀▀[0;38;5;68;38;5;24m▀[0;38;5;24m▄[0;38;5;17m▄[0;38;5;17;38;5;17m▀▀▀▀▀[0;38;5;25m▄[0;38;5;25;38;5;25m▀▀[0;38;5;24m▀+ [0;38;5;68m▄▄[0;38;5;62m▄▄[0;38;5;26m▄[0;38;5;75;38;5;25m▀[0;38;5;75;38;5;68m▀[0;38;5;75;38;5;75m▀[0;38;5;25;38;5;68m▀[0;38;5;25;38;5;25m▀[0;38;5;24;38;5;24m▀▀▀[0;38;5;24m▀[0;38;5;17m▀▀[0;38;5;17;38;5;17m▀▀▀[0;38;5;25m▄[0;38;5;25;38;5;25m▀▀ [0;38;5;195;38;5;195m▀▀▀▀+ [0;38;5;68m▀[0;38;5;68;38;5;68m▀▀[0;38;5;62;38;5;62m▀[0;38;5;62m▀[0;38;5;26m▀[0;38;5;25m▀[0;38;5;68m▀[0;38;5;75;38;5;75m▀▀[0;38;5;69m▄ [0;38;5;23m▄[0;38;5;17;38;5;17m▀▀[0;38;5;26m▄[0;38;5;25;38;5;26m▀[0;38;5;25;38;5;25m▀ [0;38;5;195;38;5;189m▀▀▀▀+ [0;38;5;68m▀[0;38;5;68;38;5;68m▀[0;38;5;62;38;5;62m▀[0;38;5;62m▄ [0;38;5;75m▀[0;38;5;75;38;5;75m▀[0;38;5;69;38;5;69m▀[0;38;5;69m▄ [0;38;5;24m▄[0;38;5;24;38;5;24m▀[0;38;5;23;38;5;24m▀ [0;38;5;62;38;5;62m▀[0;38;5;26;38;5;62m▀ [0;38;5;153;38;5;153m▀▀▀▀ [0;38;5;195;38;5;195m▀▀▀▀ [0;38;5;189m▄[0;38;5;189;38;5;189m▀[0;38;5;195;38;5;189m▀[0;38;5;195;38;5;153m▀[0;38;5;189m▀+ [0;38;5;68;38;5;68m▀[0;38;5;62;38;5;68m▀[0;38;5;62;38;5;62m▀ [0;38;5;75m▀[0;38;5;69;38;5;69m▀[0;38;5;69;38;5;68m▀[0;38;5;24;38;5;24m▀▀ [0;38;5;68;38;5;68m▀[0;38;5;62;38;5;68m▀[0;38;5;62m▀ [0;38;5;153;38;5;153m▀[0;38;5;153;38;5;117m▀▀▀ [0;38;5;195m▀[0;38;5;195;38;5;189m▀[0;38;5;195;38;5;153m▀[0;38;5;189;38;5;153m▀[0;38;5;153;38;5;153m▀▀▀[0;38;5;153m▀+ [0;38;5;62m▀[0;38;5;62;38;5;62m▀▀[0;38;5;62m▄ [0;38;5;69m▀[0;38;5;62;38;5;25m▀[0;38;5;24;38;5;25m▀[0;38;5;25;38;5;68m▀[0;38;5;68m▄[0;38;5;68;38;5;68m▀▀ [0;38;5;117;38;5;117m▀▀▀▀ [0;38;5;153m▀[0;38;5;153;38;5;153m▀▀▀[0;38;5;153;38;5;117m▀+ [0;38;5;62m▀[0;38;5;62;38;5;62m▀[0;38;5;26;38;5;26m▀[0;38;5;26m▄ [0;38;5;25m▄[0;38;5;25;38;5;25m▀▀[0;38;5;68;38;5;68m▀▀▀ [0;38;5;117;38;5;75m▀▀▀▀ [0;38;5;117m▄[0;38;5;117;38;5;117m▀▀▀▀▀▀[0;38;5;111m▄+ [0;38;5;62m▀[0;38;5;26;38;5;26m▀▀[0;38;5;25;38;5;25m▀▀ [0;38;5;68m▀▀ [0;38;5;75;38;5;75m▀▀▀▀ [0;38;5;117;38;5;117m▀▀▀[0;38;5;117;38;5;75m▀ [0;38;5;111m▀[0;38;5;117;38;5;75m▀[0;38;5;111;38;5;75m▀[0;38;5;75;38;5;75m▀[0;38;5;75m▄+ [0;38;5;26;38;5;26m▀▀[0;38;5;25;38;5;25m▀ [0;38;5;75m▀▀▀▀ [0;38;5;117m▀▀[0;38;5;111m▀ [0;38;5;75m▀▀▀+ [0;38;5;26m▀[0;38;5;25m▀+++++ [0mdiff --git a/output-samples/width-48-256.ans b/output-samples/width-48-256.ansnew file mode 100644index 00000000..877c2676--- /dev/null+++ b/output-samples/width-48-256.ans@@ -0,0 +1,25 @@+++++++ [0;38;5;233;48;5;17m▀▀[0;38;5;17;48;5;17m▀[0;38;5;17;48;5;233m▀+ [0;38;5;233;48;5;24m▀▀▀[0;38;5;24;48;5;24m▀▀[0;38;5;17;48;5;17m▀▀+ [0;38;5;233;48;5;25m▀▀▀[0;38;5;25;48;5;25m▀▀[0;38;5;24;48;5;25m▀[0;38;5;24;48;5;233m▀▀[0;38;5;24;48;5;24m▀▀[0;38;5;24;48;5;233m▀+ [0;38;5;233;48;5;69m▀[0;38;5;233;48;5;68m▀▀▀[0;38;5;68;48;5;68m▀▀[0;38;5;62;48;5;62m▀▀[0;38;5;26;48;5;26m▀[0;38;5;25;48;5;233m▀▀[0;38;5;25;48;5;17m▀[0;38;5;233;48;5;17m▀[0;38;5;17;48;5;17m▀ [0;38;5;24;48;5;24m▀▀[0;38;5;24;48;5;233m▀+ [0;38;5;75;48;5;75m▀▀▀[0;38;5;69;48;5;68m▀[0;38;5;69;48;5;233m▀[0;38;5;68;48;5;233m▀▀▀[0;38;5;68;48;5;24m▀[0;38;5;233;48;5;24m▀[0;38;5;233;48;5;17m▀[0;38;5;17;48;5;17m▀▀▀▀▀[0;38;5;233;48;5;25m▀[0;38;5;25;48;5;25m▀▀[0;38;5;24;48;5;233m▀+ [0;38;5;233;48;5;68m▀▀[0;38;5;233;48;5;62m▀▀[0;38;5;233;48;5;26m▀[0;38;5;75;48;5;25m▀[0;38;5;75;48;5;68m▀[0;38;5;75;48;5;75m▀[0;38;5;25;48;5;68m▀[0;38;5;25;48;5;25m▀[0;38;5;24;48;5;24m▀▀▀[0;38;5;24;48;5;233m▀[0;38;5;17;48;5;233m▀▀[0;38;5;17;48;5;17m▀▀▀[0;38;5;233;48;5;25m▀[0;38;5;25;48;5;25m▀▀ [0;38;5;195;48;5;195m▀▀▀▀+ [0;38;5;68;48;5;233m▀[0;38;5;68;48;5;68m▀▀[0;38;5;62;48;5;62m▀[0;38;5;62;48;5;233m▀[0;38;5;26;48;5;233m▀[0;38;5;25;48;5;233m▀[0;38;5;68;48;5;233m▀[0;38;5;75;48;5;75m▀▀[0;38;5;233;48;5;69m▀ [0;38;5;233;48;5;23m▀[0;38;5;17;48;5;17m▀▀[0;38;5;233;48;5;26m▀[0;38;5;25;48;5;26m▀[0;38;5;25;48;5;25m▀ [0;38;5;195;48;5;189m▀▀▀▀+ [0;38;5;68;48;5;233m▀[0;38;5;68;48;5;68m▀[0;38;5;62;48;5;62m▀[0;38;5;233;48;5;62m▀ [0;38;5;75;48;5;233m▀[0;38;5;75;48;5;75m▀[0;38;5;69;48;5;69m▀[0;38;5;233;48;5;69m▀ [0;38;5;233;48;5;24m▀[0;38;5;24;48;5;24m▀[0;38;5;23;48;5;24m▀ [0;38;5;62;48;5;62m▀[0;38;5;26;48;5;62m▀ [0;38;5;153;48;5;153m▀▀▀▀ [0;38;5;195;48;5;195m▀▀▀▀ [0;38;5;233;48;5;189m▀[0;38;5;189;48;5;189m▀[0;38;5;195;48;5;189m▀[0;38;5;195;48;5;153m▀[0;38;5;189;48;5;233m▀+ [0;38;5;68;48;5;68m▀[0;38;5;62;48;5;68m▀[0;38;5;62;48;5;62m▀ [0;38;5;75;48;5;233m▀[0;38;5;69;48;5;69m▀[0;38;5;69;48;5;68m▀[0;38;5;24;48;5;24m▀▀ [0;38;5;68;48;5;68m▀[0;38;5;62;48;5;68m▀[0;38;5;62;48;5;233m▀ [0;38;5;153;48;5;153m▀[0;38;5;153;48;5;117m▀▀▀ [0;38;5;195;48;5;233m▀[0;38;5;195;48;5;189m▀[0;38;5;195;48;5;153m▀[0;38;5;189;48;5;153m▀[0;38;5;153;48;5;153m▀▀▀[0;38;5;153;48;5;233m▀+ [0;38;5;62;48;5;233m▀[0;38;5;62;48;5;62m▀▀[0;38;5;233;48;5;62m▀ [0;38;5;69;48;5;233m▀[0;38;5;62;48;5;25m▀[0;38;5;24;48;5;25m▀[0;38;5;25;48;5;68m▀[0;38;5;233;48;5;68m▀[0;38;5;68;48;5;68m▀▀ [0;38;5;117;48;5;117m▀▀▀▀ [0;38;5;153;48;5;233m▀[0;38;5;153;48;5;153m▀▀▀[0;38;5;153;48;5;117m▀+ [0;38;5;62;48;5;233m▀[0;38;5;62;48;5;62m▀[0;38;5;26;48;5;26m▀[0;38;5;233;48;5;26m▀ [0;38;5;233;48;5;25m▀[0;38;5;25;48;5;25m▀▀[0;38;5;68;48;5;68m▀▀▀ [0;38;5;117;48;5;75m▀▀▀▀ [0;38;5;233;48;5;117m▀[0;38;5;117;48;5;117m▀▀▀▀▀▀[0;38;5;233;48;5;111m▀+ [0;38;5;62;48;5;233m▀[0;38;5;26;48;5;26m▀▀[0;38;5;25;48;5;25m▀▀ [0;38;5;68;48;5;233m▀▀ [0;38;5;75;48;5;75m▀▀▀▀ [0;38;5;117;48;5;117m▀▀▀[0;38;5;117;48;5;75m▀ [0;38;5;111;48;5;233m▀[0;38;5;117;48;5;75m▀[0;38;5;111;48;5;75m▀[0;38;5;75;48;5;75m▀[0;38;5;233;48;5;75m▀+ [0;38;5;26;48;5;26m▀▀[0;38;5;25;48;5;25m▀ [0;38;5;75;48;5;233m▀▀▀▀ [0;38;5;117;48;5;233m▀▀[0;38;5;111;48;5;233m▀ [0;38;5;75;48;5;233m▀▀▀+ [0;38;5;26;48;5;233m▀[0;38;5;25;48;5;233m▀+++++ [0mdiff --git a/output-samples/width-48-ascii.ans b/output-samples/width-48-ascii.ansnew file mode 100644index 00000000..e777e85b--- /dev/null+++ b/output-samples/width-48-ascii.ans@@ -0,0 +1,25 @@+++++++ ....+ .:---::+ :-==-=-::-:+ :-=*#*+++=-... --.+ *%%%%*=-..:::::..==.+ -----=%%#----::..:..+= +@@++ -#*+=--=%%- .:..++ +@@++ =**. +%%: .-: ++ +@@+ #@@@ :@@@=+ +*+ *#*-: =*. +@@+ %@@@@@@=+ .**- .+++-#- =@@= -@@@@+ :**: .==##* =@@= =@@@@@@:+ =++== =- =@@= %@@@ -@@@++ =+- .--. --- ---+ .:+++++diff --git a/output-samples/width-48-truecolor-bg-none.ans b/output-samples/width-48-truecolor-bg-none.ansnew file mode 100644index 00000000..74515fe5--- /dev/null+++ b/output-samples/width-48-truecolor-bg-none.ans@@ -0,0 +1,25 @@+++++++ [0;38;2;7;42;104m▄[0;38;2;4;38;96m▄[0;38;2;0;32;86;38;2;1;34;89m▀[0;38;2;0;31;84m▀+ [0;38;2;25;69;149m▄[0;38;2;22;65;143m▄[0;38;2;19;60;135m▄[0;38;2;15;54;123;38;2;16;56;127m▀[0;38;2;11;49;115;38;2;13;52;120m▀[0;38;2;9;45;108;38;2;10;47;112m▀[0;38;2;6;41;101;38;2;8;44;106m▀+ [0;38;2;42;94;193m▄[0;38;2;40;92;189m▄[0;38;2;37;87;181m▄[0;38;2;32;79;167;38;2;34;83;173m▀[0;38;2;30;76;162;38;2;31;79;166m▀[0;38;2;27;72;154;38;2;28;74;158m▀[0;38;2;24;67;146m▀[0;38;2;21;63;139m▀[0;38;2;17;58;130;38;2;19;61;135m▀[0;38;2;15;54;124;38;2;17;57;129m▀[0;38;2;12;50;116m▀+ [0;38;2;70;151;238m▄[0;38;2;67;144;234m▄[0;38;2;64;137;230m▄[0;38;2;60;130;225m▄[0;38;2;56;120;220;38;2;58;124;223m▀[0;38;2;54;115;217;38;2;55;118;219m▀[0;38;2;51;109;213;38;2;52;111;215m▀[0;38;2;48;103;207;38;2;49;105;209m▀[0;38;2;45;98;200;38;2;45;99;201m▀[0;38;2;41;93;190m▀[0;38;2;39;89;184m▀[0;38;2;35;85;176;38;2;0;32;86m▀[0;38;2;0;32;86m▄[0;38;2;0;32;86;38;2;0;32;85m▀ [0;38;2;24;67;146;38;2;26;70;152m▀[0;38;2;21;64;140;38;2;23;66;145m▀[0;38;2;19;60;134m▀+ [0;38;2;79;170;249;38;2;79;170;248m▀[0;38;2;77;165;247;38;2;78;168;247m▀[0;38;2;74;159;243;38;2;76;163;246m▀[0;38;2;71;153;240;38;2;70;151;234m▀[0;38;2;68;146;235m▀[0;38;2;65;140;232m▀[0;38;2;62;134;228m▀[0;38;2;59;127;224m▀[0;38;2;56;120;219;38;2;15;55;125m▀[0;38;2;12;49;116m▄[0;38;2;8;44;106m▄[0;38;2;3;35;92;38;2;5;39;97m▀[0;38;2;0;32;87;38;2;1;34;89m▀[0;38;2;0;32;86;38;2;0;32;86m▀▀▀[0;38;2;34;83;174m▄[0;38;2;30;76;162;38;2;32;80;168m▀[0;38;2;27;73;156;38;2;29;75;160m▀[0;38;2;25;68;147m▀+ [0;38;2;60;129;226m▄[0;38;2;56;121;219m▄[0;38;2;53;115;217m▄[0;38;2;49;106;210m▄[0;38;2;46;100;203m▄[0;38;2;79;170;250;38;2;43;96;195m▀[0;38;2;77;166;247;38;2;52;115;207m▀[0;38;2;74;160;242;38;2;75;162;244m▀[0;38;2;34;84;168;38;2;58;130;215m▀[0;38;2;27;73;156;38;2;29;76;160m▀[0;38;2;24;67;147;38;2;25;69;150m▀[0;38;2;20;61;136;38;2;22;64;141m▀[0;38;2;17;57;129;38;2;18;59;132m▀[0;38;2;13;52;120m▀[0;38;2;10;46;110m▀[0;38;2;6;41;101m▀[0;38;2;3;36;92;38;2;4;38;97m▀[0;38;2;0;32;87;38;2;1;34;90m▀[0;38;2;0;32;86;38;2;0;32;86m▀[0;38;2;41;93;190m▄[0;38;2;36;86;178;38;2;38;89;184m▀[0;38;2;34;82;172;38;2;35;83;173m▀ [0;38;2;212;240;255;38;2;212;240;255m▀▀▀▀+ [0;38;2;60;128;223m▀[0;38;2;58;125;223;38;2;59;126;222m▀[0;38;2;55;118;218;38;2;57;122;221m▀[0;38;2;51;109;213;38;2;53;113;211m▀[0;38;2;48;103;208m▀[0;38;2;44;98;199m▀[0;38;2;40;91;188m▀[0;38;2;67;145;230m▀[0;38;2;75;161;244;38;2;75;161;243m▀[0;38;2;72;156;241;38;2;74;158;243m▀[0;38;2;70;152;237m▄ [0;38;2;11;48;114m▄[0;38;2;7;42;103;38;2;9;45;108m▀[0;38;2;4;38;96;38;2;6;40;100m▀[0;38;2;46;101;204m▄[0;38;2;42;95;194;38;2;44;98;199m▀[0;38;2;40;92;188;38;2;42;95;194m▀ [0;38;2;210;239;255;38;2;200;234;255m▀[0;38;2;209;239;255;38;2;199;234;255m▀[0;38;2;208;238;255;38;2;197;233;255m▀[0;38;2;206;237;255;38;2;195;232;255m▀+ [0;38;2;58;124;222m▀[0;38;2;55;118;219;38;2;56;121;221m▀[0;38;2;52;113;214;38;2;53;115;216m▀[0;38;2;52;111;214m▄ [0;38;2;74;160;243m▀[0;38;2;72;156;241;38;2;73;158;243m▀[0;38;2;71;152;239;38;2;71;153;240m▀[0;38;2;69;149;236m▄ [0;38;2;18;57;129m▄[0;38;2;14;53;121;38;2;16;55;126m▀[0;38;2;11;48;113;38;2;13;52;120m▀ [0;38;2;49;105;210;38;2;51;109;213m▀[0;38;2;46;101;204;38;2;48;103;207m▀ [0;38;2;189;229;255;38;2;178;224;255m▀[0;38;2;188;228;255;38;2;177;223;255m▀[0;38;2;186;228;255;38;2;175;222;255m▀[0;38;2;184;227;255;38;2;173;222;255m▀ [0;38;2;212;240;255;38;2;212;240;255m▀▀▀[0;38;2;212;240;255;38;2;210;238;254m▀ [0;38;2;195;228;248m▄[0;38;2;207;235;251;38;2;201;234;253m▀[0;38;2;208;238;255;38;2;199;234;255m▀[0;38;2;204;236;255;38;2;194;230;253m▀[0;38;2;200;233;252m▀+ [0;38;2;55;117;217;38;2;55;119;219m▀[0;38;2;52;112;215;38;2;54;115;217m▀[0;38;2;48;103;203;38;2;51;109;213m▀ [0;38;2;72;156;241m▀[0;38;2;70;151;238;38;2;71;152;238m▀[0;38;2;68;148;236;38;2;62;136;223m▀[0;38;2;21;63;139;38;2;23;66;144m▀[0;38;2;18;59;132;38;2;20;62;137m▀ [0;38;2;55;117;218;38;2;56;119;217m▀[0;38;2;53;113;216;38;2;54;116;217m▀[0;38;2;49;105;207m▀ [0;38;2;167;219;255;38;2;156;213;255m▀[0;38;2;165;218;255;38;2;154;213;255m▀[0;38;2;163;217;255;38;2;152;212;255m▀[0;38;2;162;216;255;38;2;151;211;255m▀ [0;38;2;210;239;255m▀[0;38;2;206;237;255;38;2;195;232;255m▀[0;38;2;203;236;255;38;2;191;230;255m▀[0;38;2;197;232;254;38;2;187;228;255m▀[0;38;2;193;231;255;38;2;183;226;255m▀[0;38;2;191;230;255;38;2;179;224;255m▀[0;38;2;187;228;255;38;2;177;223;255m▀[0;38;2;187;228;255m▀+ [0;38;2;53;113;213m▀[0;38;2;52;112;215;38;2;53;113;216m▀[0;38;2;49;105;209;38;2;51;109;213m▀[0;38;2;48;104;208m▄ [0;38;2;70;151;236m▀[0;38;2;49;112;196;38;2;30;76;161m▀[0;38;2;26;71;152;38;2;38;93;177m▀[0;38;2;40;96;179;38;2;66;142;232m▀[0;38;2;63;135;229m▄[0;38;2;59;126;224;38;2;60;130;226m▀[0;38;2;55;118;215;38;2;56;121;216m▀ [0;38;2;145;208;255;38;2;134;203;255m▀[0;38;2;143;207;255;38;2;132;202;255m▀[0;38;2;141;206;255;38;2;130;201;255m▀[0;38;2;140;206;255;38;2;129;201;255m▀ [0;38;2;184;227;255m▀[0;38;2;179;224;255;38;2;166;218;255m▀[0;38;2;175;222;255;38;2;163;217;255m▀[0;38;2;171;221;255;38;2;159;215;255m▀[0;38;2;167;218;254;38;2;152;210;251m▀+ [0;38;2;52;110;214m▀[0;38;2;49;105;209;38;2;50;106;210m▀[0;38;2;47;101;205;38;2;47;103;207m▀[0;38;2;44;98;198m▄ [0;38;2;36;86;178m▄[0;38;2;32;80;168;38;2;34;83;172m▀[0;38;2;42;99;185;38;2;32;79;167m▀[0;38;2;67;145;234;38;2;67;144;232m▀[0;38;2;65;140;232;38;2;67;143;234m▀[0;38;2;62;134;228;38;2;64;137;229m▀ [0;38;2;122;198;255;38;2;111;192;255m▀[0;38;2;121;197;255;38;2;110;192;255m▀[0;38;2;119;196;255;38;2;108;191;255m▀[0;38;2;117;195;255;38;2;106;190;255m▀ [0;38;2;147;208;254m▄[0;38;2;155;211;252;38;2;147;209;255m▀[0;38;2;155;213;255;38;2;143;207;255m▀[0;38;2;151;211;255;38;2;141;206;255m▀[0;38;2;147;209;255;38;2;136;204;255m▀[0;38;2;143;207;255;38;2;131;202;255m▀[0;38;2;138;205;254;38;2;127;200;255m▀[0;38;2;120;195;252m▄+ [0;38;2;49;105;210m▀[0;38;2;46;101;204;38;2;47;103;207m▀[0;38;2;44;96;196;38;2;45;98;200m▀[0;38;2;38;89;184;38;2;41;93;190m▀[0;38;2;36;85;177;38;2;38;89;183m▀ [0;38;2;67;145;235m▀[0;38;2;66;143;233m▀ [0;38;2;100;187;255;38;2;89;182;255m▀[0;38;2;99;186;255;38;2;88;181;255m▀[0;38;2;97;185;255;38;2;86;180;255m▀[0;38;2;95;185;255;38;2;85;180;255m▀ [0;38;2;137;205;255;38;2;129;201;255m▀[0;38;2;138;205;254;38;2;127;200;255m▀[0;38;2;135;204;255;38;2;123;198;255m▀[0;38;2;132;202;255;38;2;113;183;239m▀ [0;38;2;121;194;250m▀[0;38;2;119;195;254;38;2;107;190;254m▀[0;38;2;115;194;255;38;2;103;189;255m▀[0;38;2;111;192;255;38;2;100;187;255m▀[0;38;2;95;184;254m▄+ [0;38;2;46;100;203;38;2;46;99;202m▀[0;38;2;43;96;196;38;2;45;98;200m▀[0;38;2;40;92;188;38;2;42;94;192m▀ [0;38;2;83;179;255m▀▀▀▀ [0;38;2;123;198;255m▀[0;38;2;119;196;255m▀[0;38;2;116;195;255m▀ [0;38;2;96;185;255m▀[0;38;2;92;183;255m▀[0;38;2;88;181;255m▀+ [0;38;2;44;97;197m▀[0;38;2;42;93;191m▀+++++ [0mdiff --git a/output-samples/width-48-truecolor.ans b/output-samples/width-48-truecolor.ansnew file mode 100644index 00000000..009ef5f9--- /dev/null+++ b/output-samples/width-48-truecolor.ans@@ -0,0 +1,25 @@+++++++ [0;38;2;5;10;30;48;2;7;42;104m▀[0;38;2;5;10;30;48;2;4;38;96m▀[0;38;2;0;32;86;48;2;1;34;89m▀[0;38;2;0;31;84;48;2;5;10;30m▀+ [0;38;2;5;10;30;48;2;25;69;149m▀[0;38;2;5;10;30;48;2;22;65;143m▀[0;38;2;5;10;30;48;2;19;60;135m▀[0;38;2;15;54;123;48;2;16;56;127m▀[0;38;2;11;49;115;48;2;13;52;120m▀[0;38;2;9;45;108;48;2;10;47;112m▀[0;38;2;6;41;101;48;2;8;44;106m▀+ [0;38;2;5;10;30;48;2;42;94;193m▀[0;38;2;5;10;30;48;2;40;92;189m▀[0;38;2;5;10;30;48;2;37;87;181m▀[0;38;2;32;79;167;48;2;34;83;173m▀[0;38;2;30;76;162;48;2;31;79;166m▀[0;38;2;27;72;154;48;2;28;74;158m▀[0;38;2;24;67;146;48;2;5;10;30m▀[0;38;2;21;63;139;48;2;5;10;30m▀[0;38;2;17;58;130;48;2;19;61;135m▀[0;38;2;15;54;124;48;2;17;57;129m▀[0;38;2;12;50;116;48;2;5;10;30m▀+ [0;38;2;5;10;30;48;2;70;151;238m▀[0;38;2;5;10;30;48;2;67;144;234m▀[0;38;2;5;10;30;48;2;64;137;230m▀[0;38;2;5;10;30;48;2;60;130;225m▀[0;38;2;56;120;220;48;2;58;124;223m▀[0;38;2;54;115;217;48;2;55;118;219m▀[0;38;2;51;109;213;48;2;52;111;215m▀[0;38;2;48;103;207;48;2;49;105;209m▀[0;38;2;45;98;200;48;2;45;99;201m▀[0;38;2;41;93;190;48;2;5;10;30m▀[0;38;2;39;89;184;48;2;5;10;30m▀[0;38;2;35;85;176;48;2;0;32;86m▀[0;38;2;5;10;30;48;2;0;32;86m▀[0;38;2;0;32;86;48;2;0;32;85m▀ [0;38;2;24;67;146;48;2;26;70;152m▀[0;38;2;21;64;140;48;2;23;66;145m▀[0;38;2;19;60;134;48;2;5;10;30m▀+ [0;38;2;79;170;249;48;2;79;170;248m▀[0;38;2;77;165;247;48;2;78;168;247m▀[0;38;2;74;159;243;48;2;76;163;246m▀[0;38;2;71;153;240;48;2;70;151;234m▀[0;38;2;68;146;235;48;2;5;10;30m▀[0;38;2;65;140;232;48;2;5;10;30m▀[0;38;2;62;134;228;48;2;5;10;30m▀[0;38;2;59;127;224;48;2;5;10;30m▀[0;38;2;56;120;219;48;2;15;55;125m▀[0;38;2;5;10;30;48;2;12;49;116m▀[0;38;2;5;10;30;48;2;8;44;106m▀[0;38;2;3;35;92;48;2;5;39;97m▀[0;38;2;0;32;87;48;2;1;34;89m▀[0;38;2;0;32;86;48;2;0;32;86m▀▀▀[0;38;2;5;10;30;48;2;34;83;174m▀[0;38;2;30;76;162;48;2;32;80;168m▀[0;38;2;27;73;156;48;2;29;75;160m▀[0;38;2;25;68;147;48;2;5;10;30m▀+ [0;38;2;5;10;30;48;2;60;129;226m▀[0;38;2;5;10;30;48;2;56;121;219m▀[0;38;2;5;10;30;48;2;53;115;217m▀[0;38;2;5;10;30;48;2;49;106;210m▀[0;38;2;5;10;30;48;2;46;100;203m▀[0;38;2;79;170;250;48;2;43;96;195m▀[0;38;2;77;166;247;48;2;52;115;207m▀[0;38;2;74;160;242;48;2;75;162;244m▀[0;38;2;34;84;168;48;2;58;130;215m▀[0;38;2;27;73;156;48;2;29;76;160m▀[0;38;2;24;67;147;48;2;25;69;150m▀[0;38;2;20;61;136;48;2;22;64;141m▀[0;38;2;17;57;129;48;2;18;59;132m▀[0;38;2;13;52;120;48;2;5;10;30m▀[0;38;2;10;46;110;48;2;5;10;30m▀[0;38;2;6;41;101;48;2;5;10;30m▀[0;38;2;3;36;92;48;2;4;38;97m▀[0;38;2;0;32;87;48;2;1;34;90m▀[0;38;2;0;32;86;48;2;0;32;86m▀[0;38;2;5;10;30;48;2;41;93;190m▀[0;38;2;36;86;178;48;2;38;89;184m▀[0;38;2;34;82;172;48;2;35;83;173m▀ [0;38;2;212;240;255;48;2;212;240;255m▀▀▀▀+ [0;38;2;60;128;223;48;2;5;10;30m▀[0;38;2;58;125;223;48;2;59;126;222m▀[0;38;2;55;118;218;48;2;57;122;221m▀[0;38;2;51;109;213;48;2;53;113;211m▀[0;38;2;48;103;208;48;2;5;10;30m▀[0;38;2;44;98;199;48;2;5;10;30m▀[0;38;2;40;91;188;48;2;5;10;30m▀[0;38;2;67;145;230;48;2;5;10;30m▀[0;38;2;75;161;244;48;2;75;161;243m▀[0;38;2;72;156;241;48;2;74;158;243m▀[0;38;2;5;10;30;48;2;70;152;237m▀ [0;38;2;5;10;30;48;2;11;48;114m▀[0;38;2;7;42;103;48;2;9;45;108m▀[0;38;2;4;38;96;48;2;6;40;100m▀[0;38;2;5;10;30;48;2;46;101;204m▀[0;38;2;42;95;194;48;2;44;98;199m▀[0;38;2;40;92;188;48;2;42;95;194m▀ [0;38;2;210;239;255;48;2;200;234;255m▀[0;38;2;209;239;255;48;2;199;234;255m▀[0;38;2;208;238;255;48;2;197;233;255m▀[0;38;2;206;237;255;48;2;195;232;255m▀+ [0;38;2;58;124;222;48;2;5;10;30m▀[0;38;2;55;118;219;48;2;56;121;221m▀[0;38;2;52;113;214;48;2;53;115;216m▀[0;38;2;5;10;30;48;2;52;111;214m▀ [0;38;2;74;160;243;48;2;5;10;30m▀[0;38;2;72;156;241;48;2;73;158;243m▀[0;38;2;71;152;239;48;2;71;153;240m▀[0;38;2;5;10;30;48;2;69;149;236m▀ [0;38;2;5;10;30;48;2;18;57;129m▀[0;38;2;14;53;121;48;2;16;55;126m▀[0;38;2;11;48;113;48;2;13;52;120m▀ [0;38;2;49;105;210;48;2;51;109;213m▀[0;38;2;46;101;204;48;2;48;103;207m▀ [0;38;2;189;229;255;48;2;178;224;255m▀[0;38;2;188;228;255;48;2;177;223;255m▀[0;38;2;186;228;255;48;2;175;222;255m▀[0;38;2;184;227;255;48;2;173;222;255m▀ [0;38;2;212;240;255;48;2;212;240;255m▀▀▀[0;38;2;212;240;255;48;2;210;238;254m▀ [0;38;2;5;10;30;48;2;195;228;248m▀[0;38;2;207;235;251;48;2;201;234;253m▀[0;38;2;208;238;255;48;2;199;234;255m▀[0;38;2;204;236;255;48;2;194;230;253m▀[0;38;2;200;233;252;48;2;5;10;30m▀+ [0;38;2;55;117;217;48;2;55;119;219m▀[0;38;2;52;112;215;48;2;54;115;217m▀[0;38;2;48;103;203;48;2;51;109;213m▀ [0;38;2;72;156;241;48;2;5;10;30m▀[0;38;2;70;151;238;48;2;71;152;238m▀[0;38;2;68;148;236;48;2;62;136;223m▀[0;38;2;21;63;139;48;2;23;66;144m▀[0;38;2;18;59;132;48;2;20;62;137m▀ [0;38;2;55;117;218;48;2;56;119;217m▀[0;38;2;53;113;216;48;2;54;116;217m▀[0;38;2;49;105;207;48;2;5;10;30m▀ [0;38;2;167;219;255;48;2;156;213;255m▀[0;38;2;165;218;255;48;2;154;213;255m▀[0;38;2;163;217;255;48;2;152;212;255m▀[0;38;2;162;216;255;48;2;151;211;255m▀ [0;38;2;210;239;255;48;2;5;10;30m▀[0;38;2;206;237;255;48;2;195;232;255m▀[0;38;2;203;236;255;48;2;191;230;255m▀[0;38;2;197;232;254;48;2;187;228;255m▀[0;38;2;193;231;255;48;2;183;226;255m▀[0;38;2;191;230;255;48;2;179;224;255m▀[0;38;2;187;228;255;48;2;177;223;255m▀[0;38;2;187;228;255;48;2;5;10;30m▀+ [0;38;2;53;113;213;48;2;5;10;30m▀[0;38;2;52;112;215;48;2;53;113;216m▀[0;38;2;49;105;209;48;2;51;109;213m▀[0;38;2;5;10;30;48;2;48;104;208m▀ [0;38;2;70;151;236;48;2;5;10;30m▀[0;38;2;49;112;196;48;2;30;76;161m▀[0;38;2;26;71;152;48;2;38;93;177m▀[0;38;2;40;96;179;48;2;66;142;232m▀[0;38;2;5;10;30;48;2;63;135;229m▀[0;38;2;59;126;224;48;2;60;130;226m▀[0;38;2;55;118;215;48;2;56;121;216m▀ [0;38;2;145;208;255;48;2;134;203;255m▀[0;38;2;143;207;255;48;2;132;202;255m▀[0;38;2;141;206;255;48;2;130;201;255m▀[0;38;2;140;206;255;48;2;129;201;255m▀ [0;38;2;184;227;255;48;2;5;10;30m▀[0;38;2;179;224;255;48;2;166;218;255m▀[0;38;2;175;222;255;48;2;163;217;255m▀[0;38;2;171;221;255;48;2;159;215;255m▀[0;38;2;167;218;254;48;2;152;210;251m▀+ [0;38;2;52;110;214;48;2;5;10;30m▀[0;38;2;49;105;209;48;2;50;106;210m▀[0;38;2;47;101;205;48;2;47;103;207m▀[0;38;2;5;10;30;48;2;44;98;198m▀ [0;38;2;5;10;30;48;2;36;86;178m▀[0;38;2;32;80;168;48;2;34;83;172m▀[0;38;2;42;99;185;48;2;32;79;167m▀[0;38;2;67;145;234;48;2;67;144;232m▀[0;38;2;65;140;232;48;2;67;143;234m▀[0;38;2;62;134;228;48;2;64;137;229m▀ [0;38;2;122;198;255;48;2;111;192;255m▀[0;38;2;121;197;255;48;2;110;192;255m▀[0;38;2;119;196;255;48;2;108;191;255m▀[0;38;2;117;195;255;48;2;106;190;255m▀ [0;38;2;5;10;30;48;2;147;208;254m▀[0;38;2;155;211;252;48;2;147;209;255m▀[0;38;2;155;213;255;48;2;143;207;255m▀[0;38;2;151;211;255;48;2;141;206;255m▀[0;38;2;147;209;255;48;2;136;204;255m▀[0;38;2;143;207;255;48;2;131;202;255m▀[0;38;2;138;205;254;48;2;127;200;255m▀[0;38;2;5;10;30;48;2;120;195;252m▀+ [0;38;2;49;105;210;48;2;5;10;30m▀[0;38;2;46;101;204;48;2;47;103;207m▀[0;38;2;44;96;196;48;2;45;98;200m▀[0;38;2;38;89;184;48;2;41;93;190m▀[0;38;2;36;85;177;48;2;38;89;183m▀ [0;38;2;67;145;235;48;2;5;10;30m▀[0;38;2;66;143;233;48;2;5;10;30m▀ [0;38;2;100;187;255;48;2;89;182;255m▀[0;38;2;99;186;255;48;2;88;181;255m▀[0;38;2;97;185;255;48;2;86;180;255m▀[0;38;2;95;185;255;48;2;85;180;255m▀ [0;38;2;137;205;255;48;2;129;201;255m▀[0;38;2;138;205;254;48;2;127;200;255m▀[0;38;2;135;204;255;48;2;123;198;255m▀[0;38;2;132;202;255;48;2;113;183;239m▀ [0;38;2;121;194;250;48;2;5;10;30m▀[0;38;2;119;195;254;48;2;107;190;254m▀[0;38;2;115;194;255;48;2;103;189;255m▀[0;38;2;111;192;255;48;2;100;187;255m▀[0;38;2;5;10;30;48;2;95;184;254m▀+ [0;38;2;46;100;203;48;2;46;99;202m▀[0;38;2;43;96;196;48;2;45;98;200m▀[0;38;2;40;92;188;48;2;42;94;192m▀ [0;38;2;83;179;255;48;2;5;10;30m▀▀▀▀ [0;38;2;123;198;255;48;2;5;10;30m▀[0;38;2;119;196;255;48;2;5;10;30m▀[0;38;2;116;195;255;48;2;5;10;30m▀ [0;38;2;96;185;255;48;2;5;10;30m▀[0;38;2;92;183;255;48;2;5;10;30m▀[0;38;2;88;181;255;48;2;5;10;30m▀+ [0;38;2;44;97;197;48;2;5;10;30m▀[0;38;2;42;93;191;48;2;5;10;30m▀+++++ [0mdiff --git a/output-samples/width-56-truecolor.ans b/output-samples/width-56-truecolor.ansnew file mode 100644index 00000000..0617a9d1--- /dev/null+++ b/output-samples/width-56-truecolor.ans@@ -0,0 +1,29 @@++++++++ [0;38;2;5;10;30;48;2;6;41;102m▀[0;38;2;5;10;30;48;2;4;37;95m▀[0;38;2;0;32;87;48;2;1;34;89m▀[0;38;2;0;32;86;48;2;5;10;30m▀+ [0;38;2;5;10;30;48;2;21;63;139m▀[0;38;2;5;10;30;48;2;19;60;134m▀[0;38;2;15;55;125;48;2;17;57;128m▀[0;38;2;13;51;118;48;2;14;53;121m▀[0;38;2;10;47;112;48;2;12;49;115m▀[0;38;2;7;43;105;48;2;9;45;109m▀[0;38;2;5;39;98;48;2;7;42;104m▀+ [0;38;2;5;10;30;48;2;37;88;181m▀[0;38;2;5;10;30;48;2;34;83;173m▀[0;38;2;31;78;164;48;2;32;79;167m▀[0;38;2;28;73;156;48;2;29;76;161m▀[0;38;2;25;69;150;48;2;27;72;155m▀[0;38;2;23;66;144;48;2;24;68;147m▀[0;38;2;20;63;138;48;2;22;65;142m▀[0;38;2;18;59;132;48;2;19;60;135m▀[0;38;2;15;54;124;48;2;17;57;129m▀[0;38;2;13;51;119;48;2;15;54;123m▀[0;38;2;11;48;114;48;2;5;10;30m▀+ [0;38;2;5;10;30;48;2;57;121;218m▀[0;38;2;5;10;30;48;2;54;116;216m▀[0;38;2;5;10;30;48;2;52;112;214m▀[0;38;2;47;101;203;48;2;50;107;212m▀[0;38;2;46;101;204;48;2;47;103;207m▀[0;38;2;43;97;197;48;2;44;98;199m▀[0;38;2;41;93;190;48;2;41;92;189m▀[0;38;2;38;89;184;48;2;40;91;187m▀[0;38;2;36;85;177;48;2;5;10;30m▀[0;38;2;33;82;171;48;2;5;10;30m▀[0;38;2;30;76;162;48;2;0;32;86m▀[0;38;2;5;10;30;48;2;0;32;86m▀ [0;38;2;5;10;30;48;2;24;68;148m▀[0;38;2;21;63;139;48;2;22;65;143m▀[0;38;2;18;59;133;48;2;20;62;137m▀[0;38;2;16;54;124;48;2;5;10;30m▀+ [0;38;2;5;10;30;48;2;79;170;249m▀[0;38;2;5;10;30;48;2;77;166;246m▀[0;38;2;5;10;30;48;2;75;161;244m▀[0;38;2;68;147;231;48;2;73;156;241m▀[0;38;2;69;148;237;48;2;70;151;238m▀[0;38;2;66;143;234;48;2;68;146;235m▀[0;38;2;63;136;229;48;2;64;139;230m▀[0;38;2;61;132;227;48;2;63;134;228m▀[0;38;2;59;126;224;48;2;60;129;225m▀[0;38;2;56;121;220;48;2;57;123;222m▀[0;38;2;53;114;215;48;2;5;10;30m▀[0;38;2;51;109;213;48;2;5;10;30m▀[0;38;2;48;103;207;48;2;5;10;30m▀[0;38;2;5;10;30;48;2;2;35;92m▀[0;38;2;5;10;30;48;2;0;32;87m▀[0;38;2;5;10;30;48;2;0;32;86m▀[0;38;2;0;32;85;48;2;0;32;86m▀[0;38;2;0;32;86;48;2;0;32;86m▀▀[0;38;2;0;32;86;48;2;5;10;30m▀[0;38;2;28;74;157;48;2;30;76;162m▀[0;38;2;26;71;153;48;2;28;73;157m▀[0;38;2;24;67;147;48;2;26;70;151m▀+ [0;38;2;80;173;251;48;2;5;10;30m▀[0;38;2;79;170;250;48;2;79;171;250m▀[0;38;2;76;164;246;48;2;77;166;246m▀[0;38;2;73;158;241;48;2;76;163;245m▀[0;38;2;69;149;234;48;2;72;155;237m▀[0;38;2;66;143;229;48;2;5;10;30m▀[0;38;2;5;10;30;48;2;26;71;153m▀[0;38;2;5;10;30;48;2;23;66;145m▀[0;38;2;5;10;30;48;2;20;62;137m▀[0;38;2;5;10;30;48;2;17;57;130m▀[0;38;2;13;49;115;48;2;14;54;123m▀[0;38;2;10;47;112;48;2;11;49;115m▀[0;38;2;7;42;104;48;2;9;45;108m▀[0;38;2;4;38;96;48;2;5;39;99m▀[0;38;2;1;34;89;48;2;2;35;92m▀[0;38;2;0;32;86;48;2;0;32;86m▀▀▀ [0;38;2;33;81;171;48;2;35;85;176m▀[0;38;2;31;79;166;48;2;33;81;170m▀[0;38;2;29;76;161;48;2;31;78;164m▀+ [0;38;2;5;10;30;48;2;60;130;225m▀[0;38;2;5;10;30;48;2;59;127;224m▀[0;38;2;5;10;30;48;2;55;119;218m▀[0;38;2;5;10;30;48;2;53;114;216m▀[0;38;2;5;10;30;48;2;50;107;212m▀[0;38;2;5;10;30;48;2;47;102;206m▀[0;38;2;43;95;194;48;2;44;98;199m▀[0;38;2;60;132;219;48;2;41;93;191m▀[0;38;2;76;164;246;48;2;54;120;210m▀[0;38;2;71;155;239;48;2;76;163;245m▀[0;38;2;36;88;174;48;2;65;142;227m▀[0;38;2;28;73;156;48;2;33;83;168m▀[0;38;2;25;69;150;48;2;26;71;152m▀[0;38;2;22;65;142;48;2;5;10;30m▀[0;38;2;19;60;134;48;2;5;10;30m▀[0;38;2;16;55;126;48;2;5;10;30m▀[0;38;2;13;51;118;48;2;5;10;30m▀ [0;38;2;4;35;91;48;2;6;40;100m▀[0;38;2;1;34;89;48;2;3;36;93m▀[0;38;2;0;32;86;48;2;1;33;88m▀ [0;38;2;39;90;185;48;2;41;92;189m▀[0;38;2;37;87;180;48;2;38;89;184m▀[0;38;2;35;84;175;48;2;36;86;179m▀ [0;38;2;212;240;255;48;2;212;240;255m▀▀▀[0;38;2;212;240;255;48;2;211;240;255m▀+ [0;38;2;60;128;224;48;2;5;10;30m▀[0;38;2;57;123;222;48;2;59;126;223m▀[0;38;2;54;116;217;48;2;56;121;220m▀[0;38;2;51;108;211;48;2;54;116;218m▀[0;38;2;48;104;209;48;2;5;10;30m▀[0;38;2;45;100;202;48;2;5;10;30m▀[0;38;2;41;93;190;48;2;5;10;30m▀[0;38;2;37;86;179;48;2;5;10;30m▀[0;38;2;74;160;242;48;2;5;10;30m▀[0;38;2;75;161;244;48;2;75;161;242m▀[0;38;2;72;156;241;48;2;73;158;243m▀[0;38;2;5;10;30;48;2;71;153;239m▀ [0;38;2;10;46;110;48;2;11;49;115m▀[0;38;2;7;43;105;48;2;9;45;109m▀[0;38;2;5;39;98;48;2;7;42;103m▀ [0;38;2;44;98;199;48;2;46;101;204m▀[0;38;2;42;95;194;48;2;44;97;198m▀[0;38;2;40;92;188;48;2;40;91;187m▀ [0;38;2;208;238;255;48;2;199;234;255m▀[0;38;2;207;238;255;48;2;198;233;255m▀[0;38;2;205;237;255;48;2;196;232;255m▀[0;38;2;204;236;255;48;2;195;232;255m▀+ [0;38;2;59;126;223;48;2;5;10;30m▀[0;38;2;58;124;222;48;2;58;124;222m▀[0;38;2;54;116;217;48;2;56;121;220m▀[0;38;2;52;112;213;48;2;54;115;217m▀[0;38;2;5;10;30;48;2;52;112;215m▀ [0;38;2;75;161;244;48;2;5;10;30m▀[0;38;2;73;156;242;48;2;74;159;243m▀[0;38;2;71;152;238;48;2;72;154;240m▀[0;38;2;5;10;30;48;2;68;147;233m▀ [0;38;2;5;10;30;48;2;18;58;131m▀[0;38;2;13;52;120;48;2;15;55;124m▀[0;38;2;11;48;113;48;2;13;51;119m▀ [0;38;2;49;106;211;48;2;51;109;213m▀[0;38;2;48;103;208;48;2;49;106;211m▀[0;38;2;45;99;201;48;2;46;99;201m▀ [0;38;2;189;229;255;48;2;180;225;255m▀[0;38;2;188;229;255;48;2;179;224;255m▀[0;38;2;186;228;255;48;2;177;223;255m▀[0;38;2;185;227;255;48;2;176;223;255m▀ [0;38;2;212;240;255;48;2;5;10;30m▀[0;38;2;212;240;255;48;2;212;240;255m▀▀▀▀ [0;38;2;5;10;30;48;2;205;237;255m▀[0;38;2;208;236;252;48;2;204;236;255m▀[0;38;2;208;238;255;48;2;201;235;255m▀[0;38;2;205;237;255;48;2;198;233;255m▀[0;38;2;200;232;252;48;2;198;233;255m▀+ [0;38;2;55;118;215;48;2;5;10;30m▀[0;38;2;55;118;219;48;2;54;116;215m▀[0;38;2;52;112;215;48;2;54;115;217m▀[0;38;2;51;109;213;48;2;51;108;212m▀ [0;38;2;73;157;242;48;2;73;158;242m▀[0;38;2;70;152;239;48;2;72;154;240m▀[0;38;2;69;148;237;48;2;69;150;238m▀[0;38;2;5;10;30;48;2;40;96;178m▀[0;38;2;20;61;136;48;2;21;64;141m▀[0;38;2;17;57;129;48;2;19;60;134m▀ [0;38;2;5;10;30;48;2;55;119;216m▀[0;38;2;53;114;216;48;2;54;117;218m▀[0;38;2;51;109;213;48;2;53;113;216m▀ [0;38;2;170;220;255;48;2;161;216;255m▀[0;38;2;169;220;255;48;2;159;215;255m▀[0;38;2;167;219;255;48;2;158;214;255m▀[0;38;2;166;218;255;48;2;156;214;255m▀ [0;38;2;205;232;248;48;2;5;10;30m▀[0;38;2;211;240;255;48;2;203;235;254m▀[0;38;2;209;239;255;48;2;200;234;255m▀[0;38;2;207;238;255;48;2;197;233;255m▀[0;38;2;200;232;251;48;2;193;231;255m▀[0;38;2;196;233;255;48;2;186;226;252m▀[0;38;2;197;233;255;48;2;187;228;255m▀[0;38;2;194;231;255;48;2;183;226;255m▀[0;38;2;191;230;255;48;2;181;225;254m▀[0;38;2;190;229;255;48;2;5;10;30m▀+ [0;38;2;54;116;217;48;2;5;10;30m▀[0;38;2;52;112;215;48;2;53;114;216m▀[0;38;2;49;106;209;48;2;51;110;214m▀[0;38;2;5;10;30;48;2;49;105;210m▀ [0;38;2;70;151;236;48;2;5;10;30m▀[0;38;2;71;152;239;48;2;68;147;231m▀[0;38;2;42;100;183;48;2;31;80;164m▀[0;38;2;23;66;145;48;2;29;76;157m▀[0;38;2;21;63;139;48;2;5;10;30m▀ [0;38;2;57;122;218;48;2;59;127;222m▀[0;38;2;56;120;220;48;2;58;124;222m▀[0;38;2;54;116;218;48;2;5;10;30m▀ [0;38;2;151;211;255;48;2;142;207;255m▀[0;38;2;150;211;255;48;2;140;206;255m▀[0;38;2;148;210;255;48;2;139;205;255m▀[0;38;2;147;209;255;48;2;137;205;255m▀ [0;38;2;188;227;252;48;2;182;226;255m▀[0;38;2;187;228;255;48;2;177;223;255m▀[0;38;2;183;226;255;48;2;173;222;255m▀[0;38;2;180;225;255;48;2;170;220;255m▀[0;38;2;177;223;255;48;2;166;218;255m▀[0;38;2;174;222;255;48;2;160;210;247m▀+ [0;38;2;51;110;212;48;2;5;10;30m▀[0;38;2;50;106;212;48;2;51;109;213m▀[0;38;2;47;103;207;48;2;49;104;209m▀[0;38;2;5;10;30;48;2;46;101;205m▀ [0;38;2;31;78;165;48;2;33;81;170m▀[0;38;2;29;75;160;48;2;31;78;164m▀[0;38;2;46;106;191;48;2;53;118;204m▀[0;38;2;67;143;234;48;2;67;145;235m▀[0;38;2;62;134;227;48;2;65;140;232m▀[0;38;2;61;132;227;48;2;63;135;229m▀[0;38;2;59;127;224;48;2;59;128;221m▀ [0;38;2;132;202;255;48;2;123;198;255m▀[0;38;2;131;202;255;48;2;121;197;255m▀[0;38;2;129;201;255;48;2;119;196;255m▀[0;38;2;128;200;255;48;2;118;196;255m▀ [0;38;2;5;10;30;48;2;156;212;253m▀[0;38;2;163;215;252;48;2;156;213;255m▀[0;38;2;163;217;255;48;2;153;212;255m▀[0;38;2;159;215;255;48;2;149;210;255m▀[0;38;2;156;214;255;48;2;146;209;255m▀[0;38;2;150;209;252;48;2;142;207;255m▀[0;38;2;5;10;30;48;2;138;205;255m▀+ [0;38;2;51;110;214;48;2;5;10;30m▀[0;38;2;50;107;212;48;2;50;108;213m▀[0;38;2;47;102;206;48;2;48;103;208m▀[0;38;2;45;99;201;48;2;46;100;203m▀[0;38;2;5;10;30;48;2;43;96;195m▀ [0;38;2;35;84;174;48;2;37;87;180m▀[0;38;2;32;80;169;48;2;34;83;173m▀ [0;38;2;68;147;236;48;2;5;10;30m▀[0;38;2;67;143;234;48;2;68;146;235m▀[0;38;2;64;138;231;48;2;65;139;230m▀ [0;38;2;113;193;255;48;2;104;189;255m▀[0;38;2;112;193;255;48;2;102;188;255m▀[0;38;2;110;192;255;48;2;101;187;255m▀[0;38;2;109;191;255;48;2;99;187;255m▀ [0;38;2;5;10;30;48;2;141;207;255m▀[0;38;2;149;210;255;48;2;142;207;255m▀[0;38;2;149;210;255;48;2;139;205;255m▀[0;38;2;146;209;255;48;2;136;204;255m▀[0;38;2;143;207;255;48;2;133;201;252m▀[0;38;2;139;206;255;48;2;130;201;255m▀[0;38;2;136;204;255;48;2;126;199;255m▀[0;38;2;132;202;255;48;2;122;197;255m▀[0;38;2;128;200;255;48;2;119;196;255m▀[0;38;2;5;10;30;48;2;114;193;254m▀+ [0;38;2;49;105;210;48;2;5;10;30m▀[0;38;2;47;102;207;48;2;48;103;208m▀[0;38;2;45;98;200;48;2;46;101;203m▀[0;38;2;40;91;188;48;2;43;96;196m▀[0;38;2;39;89;184;48;2;40;92;188m▀[0;38;2;36;85;177;48;2;38;88;182m▀ [0;38;2;67;144;234;48;2;5;10;30m▀ [0;38;2;94;184;255;48;2;86;180;255m▀[0;38;2;93;184;255;48;2;85;180;255m▀[0;38;2;91;183;255;48;2;84;179;255m▀[0;38;2;90;182;255;48;2;83;179;255m▀ [0;38;2;5;10;30;48;2;127;200;255m▀[0;38;2;134;203;255;48;2;125;199;255m▀[0;38;2;132;202;255;48;2;122;198;255m▀[0;38;2;128;200;255;48;2;119;196;255m▀[0;38;2;124;196;251;48;2;104;172;227m▀ [0;38;2;116;194;255;48;2;5;10;30m▀[0;38;2;112;193;255;48;2;102;188;255m▀[0;38;2;108;191;255;48;2;99;187;255m▀[0;38;2;104;188;254;48;2;95;185;255m▀[0;38;2;100;186;254;48;2;92;182;254m▀+ [0;38;2;46;99;201;48;2;5;10;30m▀[0;38;2;45;98;200;48;2;45;99;201m▀[0;38;2;42;94;193;48;2;43;97;197m▀[0;38;2;38;88;181;48;2;5;10;30m▀+ [0;38;2;44;96;196;48;2;5;10;30m▀++++++ [0m