New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@tomtev/termtype

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tomtev/termtype

Block-based text art generator for terminal and SVG.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

termtype

Block-based text art generator for terminal and SVG.

Install

npm install termtype

Examples

Solid colors

Hello
termtype "Hello" --font=sans --color=white
ARCADE
termtype "ARCADE" --font=block --color=lime
Quiz.ai
termtype "Quiz.ai" --font=block --color=gold
hack
termtype "hack" --font=block --color=lime

Gradients

sunset
termtype "sunset" --font=bold --gradient=orange,pink,purple
NEON
termtype "NEON" --font=block --gradient=purple,cyan,lime
fire
termtype "fire" --font=block --gradient=red,yellow
ice
termtype "ice" --font=block --gradient=white,cyan,blue

Rainbow

rainbow
termtype "rainbow" --font=bold --rainbow

Per-word colors

opencode
termtype "open|code" --font=block --color=cyan,gray

Use | as a zero-width color separator (no space between words). Use commas to assign colors to words.

Effects

RETRO
termtype "RETRO" --font=block --color=coral --shadow
outline
termtype "outline" --font=bold --color=cyan --outline

Fonts

sans
termtype "Hello" --font=sans
serif
termtype "GOLD" --font=serif --color=gold
slim
termtype "slim" --font=slim --color=pink
narrow
termtype "NARROW" --font=narrow --color=violet
block
termtype "ARCADE" --font=block --color=lime
FontStyleWidth
sansClean default5px
serifDecorative serifs5px
slimThin strokes5px
boldHeavy weight6px
narrowCondensed3px
blockChunky geometric7px

CLI

termtype <text> [options]

Options:
  --color=<color>       Text color (name or hex, default: white)
                        Use commas for per-word colors (e.g. cyan,gray)
  --gradient=<a,b>      Gradient from color A to B (e.g. red,yellow)
                        Supports 3-stop: --gradient=red,yellow,green
  --rainbow             Rainbow color mode
  --font=<name>         Font: sans (default), serif, slim, bold, narrow, block
  --size=<size>         Size: sm, md (default), lg
  --compact             Half-block mode (sm is always compact)
  --shadow              Add drop shadow
  --shadow-color=<c>    Shadow color (default: gray)
  --outline             Add outline around text
  --border              Add pixel-art border frame
  --padding=<n>         Padding around text (default: 1)
  --svg                 Output SVG instead of terminal
  --size-px=<n>         SVG pixel size (default: 16)
  --out=<file>          Write output to file
  -h, --help            Show this help

API

import { composeText, renderTerminal, renderSVG, applyPadding, applyShadow } from "termtype";

const grid = composeText("Hello", { font: "block" });
const padded = applyPadding(grid, 1);

// Terminal output
const lines = renderTerminal(padded, {
  colorMode: { type: "solid", color: [0, 220, 220] },
});
console.log(lines.join("\n"));

// SVG output
const svg = renderSVG(grid, {
  colorMode: { type: "rainbow" },
  pixelSize: 16,
});

Color modes

// Solid
{ type: "solid", color: [255, 0, 0] }

// Gradient (2 or 3 stops)
{ type: "gradient", from: [255, 0, 0], to: [255, 255, 0], direction: "horizontal" }
{ type: "gradient", from: [255, 0, 0], via: [255, 255, 0], to: [0, 255, 0], direction: "horizontal" }

// Rainbow
{ type: "rainbow" }

// Per-segment
{ type: "segments", segments: [{ endX: 20, mode: { type: "solid", color: [0, 220, 220] } }] }

Named colors

white black red green blue yellow cyan magenta orange pink purple lime teal navy gold gray coral violet silver darkgray lightgray

SVG output

SVGs render as flat pixel art on a transparent background, ready to use on websites. Same-color pixels are merged into single <path> elements for minimal file size.

termtype "Logo" --svg --color=cyan --out=logo.svg

License

MIT

Keywords

text-art

FAQs

Package last updated on 26 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts